Interface NodeWeighting<V,​E>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  NodeWeighting.LabelNodeWeighting<V,​E>
      A trivial and not particularly useful node weighting approach that assigns the current node label as the weight.
      static class  NodeWeighting.LinearNodeWeighting<V,​E>
      The node weighting approach that chooses the label with the highest total edge weight in the neighborhood divided by the neighbor node degree.
      static class  NodeWeighting.LogNodeWeighting<V,​E>
      The node weighting approach that chooses the label with the highest total edge weight in the neighborhood divided by the logarithm of the neighbor node degree.
      static class  NodeWeighting.TopNodeWeighting<V,​E>
      The node weighting approach that chooses the label with the highest total edge weight in the neighborhood.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double apply​(org.jgrapht.Graph<V,​E> graph, Map<V,​Integer> labels, V node, V neighbor)
      Compute the weight of the node in the neighborhood graph.
      static <V,​E>
      NodeWeighting<V,​E>
      label()
      A static factory method providing a convenient way to create an instance of LabelNodeWeighting.
      static <V,​E>
      NodeWeighting<V,​E>
      linear()
      A static factory method providing a convenient way to create an instance of LinearNodeWeighting.
      static <V,​E>
      NodeWeighting<V,​E>
      log()
      A static factory method providing a convenient way to create an instance of LogNodeWeighting.
      static <V,​E>
      NodeWeighting<V,​E>
      top()
      A static factory method providing a convenient way to create an instance of TopNodeWeighting.
    • Method Detail

      • apply

        double apply​(org.jgrapht.Graph<V,​E> graph,
                     Map<V,​Integer> labels,
                     V node,
                     V neighbor)
        Compute the weight of the node in the neighborhood graph.
        Parameters:
        graph - the neighborhood graph
        labels - the map of graph nodes to their labels
        node - the target node
        neighbor - the neighboring node
        Returns:
        the weight of the node in the neighborhood
      • label

        static <V,​E> NodeWeighting<V,​E> label()
        A static factory method providing a convenient way to create an instance of LabelNodeWeighting.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Returns:
        an instance of LabelNodeWeighting
      • top

        static <V,​E> NodeWeighting<V,​E> top()
        A static factory method providing a convenient way to create an instance of TopNodeWeighting.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Returns:
        an instance of TopNodeWeighting
      • log

        static <V,​E> NodeWeighting<V,​E> log()
        A static factory method providing a convenient way to create an instance of LogNodeWeighting.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Returns:
        an instance of LogNodeWeighting
      • linear

        static <V,​E> NodeWeighting<V,​E> linear()
        A static factory method providing a convenient way to create an instance of LinearNodeWeighting.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Returns:
        an instance of LinearNodeWeighting