public abstract class CommunityMeasure extends org.graphstream.stream.SinkAdapter implements DynamicAlgorithm
| Constructor and Description |
|---|
CommunityMeasure(String marker)
New measure algorithm with a given marker for communities.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
compute()
Run the algorithm.
|
void |
edgeAdded(String graphId,
long timeId,
String edgeId,
String fromNodeId,
String toNodeId,
boolean directed) |
void |
edgeRemoved(String graphId,
long timeId,
String edgeId) |
double |
getLastComputedValue()
The last computed measure.
|
double |
getMeasure()
Compute the measure (if the graph changed since the last computation).
|
void |
graphCleared(String graphId,
long timeId) |
void |
init(org.graphstream.graph.Graph graph)
Initialization of the algorithm.
|
void |
nodeAdded(String graphId,
long timeId,
String nodeId) |
void |
nodeAttributeAdded(String graphId,
long timeId,
String nodeId,
String attribute,
Object value) |
void |
nodeAttributeChanged(String graphId,
long timeId,
String nodeId,
String attribute,
Object oldValue,
Object newValue) |
void |
nodeRemoved(String graphId,
long timeId,
String nodeId) |
void |
terminate()
Terminate the dynamic algorithm.
|
public CommunityMeasure(String marker)
marker - name of the attribute marking the communities.public double getLastComputedValue()
public double getMeasure()
public void init(org.graphstream.graph.Graph graph)
AlgorithmAlgorithm.compute() method to initialize or reset the algorithm according
to the new given graph.public abstract void compute()
AlgorithmAlgorithm.init(Graph) method has to be called
before computing.compute in interface AlgorithmAlgorithm.init(Graph)public void terminate()
DynamicAlgorithmterminate in interface DynamicAlgorithmAlgorithm.init(org.graphstream.graph.Graph)public void nodeAdded(String graphId, long timeId, String nodeId)
nodeAdded in interface org.graphstream.stream.ElementSinknodeAdded in class org.graphstream.stream.SinkAdapterpublic void nodeRemoved(String graphId, long timeId, String nodeId)
nodeRemoved in interface org.graphstream.stream.ElementSinknodeRemoved in class org.graphstream.stream.SinkAdapterpublic void edgeAdded(String graphId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
edgeAdded in interface org.graphstream.stream.ElementSinkedgeAdded in class org.graphstream.stream.SinkAdapterpublic void edgeRemoved(String graphId, long timeId, String edgeId)
edgeRemoved in interface org.graphstream.stream.ElementSinkedgeRemoved in class org.graphstream.stream.SinkAdapterpublic void graphCleared(String graphId, long timeId)
graphCleared in interface org.graphstream.stream.ElementSinkgraphCleared in class org.graphstream.stream.SinkAdapterpublic void nodeAttributeAdded(String graphId, long timeId, String nodeId, String attribute, Object value)
nodeAttributeAdded in interface org.graphstream.stream.AttributeSinknodeAttributeAdded in class org.graphstream.stream.SinkAdapterpublic void nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)
nodeAttributeChanged in interface org.graphstream.stream.AttributeSinknodeAttributeChanged in class org.graphstream.stream.SinkAdapterCopyright © 2015. All rights reserved.