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)
Algorithm
Algorithm.compute()
method to initialize or reset the algorithm according
to the new given graph.public abstract void compute()
Algorithm
Algorithm.init(Graph)
method has to be called
before computing.compute
in interface Algorithm
Algorithm.init(Graph)
public void terminate()
DynamicAlgorithm
terminate
in interface DynamicAlgorithm
Algorithm.init(org.graphstream.graph.Graph)
public void nodeAdded(String graphId, long timeId, String nodeId)
nodeAdded
in interface org.graphstream.stream.ElementSink
nodeAdded
in class org.graphstream.stream.SinkAdapter
public void nodeRemoved(String graphId, long timeId, String nodeId)
nodeRemoved
in interface org.graphstream.stream.ElementSink
nodeRemoved
in class org.graphstream.stream.SinkAdapter
public void edgeAdded(String graphId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
edgeAdded
in interface org.graphstream.stream.ElementSink
edgeAdded
in class org.graphstream.stream.SinkAdapter
public void edgeRemoved(String graphId, long timeId, String edgeId)
edgeRemoved
in interface org.graphstream.stream.ElementSink
edgeRemoved
in class org.graphstream.stream.SinkAdapter
public void graphCleared(String graphId, long timeId)
graphCleared
in interface org.graphstream.stream.ElementSink
graphCleared
in class org.graphstream.stream.SinkAdapter
public void nodeAttributeAdded(String graphId, long timeId, String nodeId, String attribute, Object value)
nodeAttributeAdded
in interface org.graphstream.stream.AttributeSink
nodeAttributeAdded
in class org.graphstream.stream.SinkAdapter
public void nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)
nodeAttributeChanged
in interface org.graphstream.stream.AttributeSink
nodeAttributeChanged
in class org.graphstream.stream.SinkAdapter
Copyright © 2015. All rights reserved.