Class KMeans.SelectNearestCenter

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.MapFunction<KMeans.Point,​org.apache.flink.api.java.tuple.Tuple2<Integer,​KMeans.Point>>, org.apache.flink.api.common.functions.RichFunction
    Enclosing class:
    KMeans

    public static final class KMeans.SelectNearestCenter
    extends org.apache.flink.api.common.functions.RichMapFunction<KMeans.Point,​org.apache.flink.api.java.tuple.Tuple2<Integer,​KMeans.Point>>
    Determines the closest cluster center for a data point.
    See Also:
    Serialized Form
    • Constructor Detail

      • SelectNearestCenter

        public SelectNearestCenter()
    • Method Detail

      • open

        public void open​(org.apache.flink.api.common.functions.OpenContext openContext)
                  throws Exception
        Reads the centroid values from a broadcast variable into a collection.
        Throws:
        Exception