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
-
Constructor Summary
Constructors Constructor Description CommunityRelativeMeasure(String marker)
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. -
Method Summary
Modifier and Type Method Description abstract void
compute()
Run the algorithm.void
nodeAdded(String graphId, long timeId, String nodeId)
void
nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)
void
nodeRemoved(String graphId, long timeId, String nodeId)
Methods inherited from class org.graphstream.algorithm.measure.CommunityMeasure
edgeAdded, edgeRemoved, getLastComputedValue, getMeasure, graphCleared, init, nodeAttributeAdded, terminate
-
Constructor Details
-
CommunityRelativeMeasure
-
CommunityRelativeMeasure
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
-
-
Method Details
-
compute
public abstract void compute()Description copied from interface:Algorithm
Run the algorithm. TheAlgorithm.init(Graph)
method has to be called before computing.- Specified by:
compute
in interfaceAlgorithm
- Specified by:
compute
in classCommunityMeasure
- See Also:
Algorithm.init(Graph)
-
nodeAdded
- Specified by:
nodeAdded
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
nodeAdded
in classCommunityMeasure
-
nodeRemoved
- Specified by:
nodeRemoved
in interfaceorg.graphstream.stream.ElementSink
- Overrides:
nodeRemoved
in classCommunityMeasure
-
nodeAttributeChanged
public void nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)- Specified by:
nodeAttributeChanged
in interfaceorg.graphstream.stream.AttributeSink
- Overrides:
nodeAttributeChanged
in classCommunityMeasure
-