Class EdgeMergeFunctions


  • public final class EdgeMergeFunctions
    extends Object
    A set of common edge merge functions.
    Author:
    David B. Bracewell
    • Constructor Detail

      • EdgeMergeFunctions

        public EdgeMergeFunctions()
    • Method Detail

      • keepOriginal

        public static <V> EdgeMergeFunction<V> keepOriginal()
        A merge function that keeps the original edge and ignores the duplicate.
        Type Parameters:
        V - The vertex type
        Returns:
        An EdgeMergeFunction
      • keepDuplicate

        public static <V> EdgeMergeFunction<V> keepDuplicate()
        A merge function that keeps the duplicate edge and ignores the original.
        Type Parameters:
        V - The vertex type
        Returns:
        An EdgeMergeFunction
      • averageWeight

        public static <V> EdgeMergeFunction<V> averageWeight()
        A merge function that creates a new edge whose weight is the average of the two edges.
        Type Parameters:
        V - The vertex type
        Returns:
        An EdgeMergeFunction
      • minWeight

        public static <V> EdgeMergeFunction<V> minWeight()
        A merge function that creates a new edge whose weight is the minimum of the two edges.
        Type Parameters:
        V - The vertex type
        Returns:
        An EdgeMergeFunction
      • maxWeight

        public static <V> EdgeMergeFunction<V> maxWeight()
        A merge function that creates a new edge whose weight is the maximum of the two edges.
        Type Parameters:
        V - The vertex type
        Returns:
        An EdgeMergeFunction