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 voidcompute()Run the algorithm.voidnodeAdded(String graphId, long timeId, String nodeId)voidnodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)voidnodeRemoved(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:AlgorithmRun the algorithm. TheAlgorithm.init(Graph)method has to be called before computing.- Specified by:
computein interfaceAlgorithm- Specified by:
computein classCommunityMeasure- See Also:
Algorithm.init(Graph)
-
nodeAdded
- Specified by:
nodeAddedin interfaceorg.graphstream.stream.ElementSink- Overrides:
nodeAddedin classCommunityMeasure
-
nodeRemoved
- Specified by:
nodeRemovedin interfaceorg.graphstream.stream.ElementSink- Overrides:
nodeRemovedin classCommunityMeasure
-
nodeAttributeChanged
public void nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)- Specified by:
nodeAttributeChangedin interfaceorg.graphstream.stream.AttributeSink- Overrides:
nodeAttributeChangedin classCommunityMeasure
-