org.graphstream.algorithm.measure
Class CommunityRelativeMeasure
java.lang.Object
org.graphstream.stream.SinkAdapter
org.graphstream.algorithm.measure.CommunityMeasure
org.graphstream.algorithm.measure.CommunityRelativeMeasure
- All Implemented Interfaces:
- Algorithm, DynamicAlgorithm, org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.Sink
- Direct Known Subclasses:
- NormalizedMutualInformation
public abstract class CommunityRelativeMeasure
- extends CommunityMeasure
Computes and updates a relative measure based on the comparison between the
current community assignment and a reference assignment on a given graph.
- Author:
- Guillaume-Jean Herbiet
Methods inherited from class org.graphstream.stream.SinkAdapter |
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeRemoved, stepBegins |
CommunityRelativeMeasure
public CommunityRelativeMeasure(String marker)
CommunityRelativeMeasure
public CommunityRelativeMeasure(String marker,
String referenceMarker)
- New comparative measure using "marker" as attribute name for each node
current community assignment and "referenceMarker" as attribute name for
each node reference assignment.
- Parameters:
marker
- Current community assignment attribute namereferenceMarker
- Reference community assignment attribute name
compute
public abstract void compute()
- Description copied from interface:
Algorithm
- Run the algorithm. The
Algorithm.init(Graph)
method has to be called
before computing.
- Specified by:
compute
in interface Algorithm
- Specified by:
compute
in class CommunityMeasure
- See Also:
Algorithm.init(Graph)
nodeAdded
public void nodeAdded(String graphId,
long timeId,
String nodeId)
- Specified by:
nodeAdded
in interface org.graphstream.stream.ElementSink
- Overrides:
nodeAdded
in class CommunityMeasure
nodeRemoved
public void nodeRemoved(String graphId,
long timeId,
String nodeId)
- Specified by:
nodeRemoved
in interface org.graphstream.stream.ElementSink
- Overrides:
nodeRemoved
in class CommunityMeasure
nodeAttributeChanged
public void nodeAttributeChanged(String graphId,
long timeId,
String nodeId,
String attribute,
Object oldValue,
Object newValue)
- Specified by:
nodeAttributeChanged
in interface org.graphstream.stream.AttributeSink
- Overrides:
nodeAttributeChanged
in class CommunityMeasure
Copyright © 2011. All Rights Reserved.