Class NodeWeightings.LogNodeWeighting<V,​E>

  • Type Parameters:
    V - the type of nodes in the graph
    E - the type of edges in the graph
    All Implemented Interfaces:
    NodeWeighting<V,​E>
    Enclosing class:
    NodeWeightings

    public static class NodeWeightings.LogNodeWeighting<V,​E>
    extends Object
    implements NodeWeighting<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.
    • Constructor Detail

      • LogNodeWeighting

        public LogNodeWeighting()
    • Method Detail

      • apply

        public double apply​(org.jgrapht.Graph<V,​E> graph,
                            Map<V,​Integer> labels,
                            V node,
                            V neighbor)
        Description copied from interface: NodeWeighting
        Compute the weight of the node in the neighborhood graph.
        Specified by:
        apply in interface NodeWeighting<V,​E>
        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