|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.stream.SinkAdapter
org.graphstream.algorithm.measure.CommunityMeasure
public abstract class CommunityMeasure
Computes and updates an absolute measure based on the current community assignment on a given graph as it evolves.
Constructor Summary | |
---|---|
CommunityMeasure(String marker)
New measure algorithm with a given marker for communities. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.graphstream.stream.SinkAdapter |
---|
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeRemoved, stepBegins |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommunityMeasure(String marker)
marker
- name of the attribute marking the communities.Method Detail |
---|
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.
init
in interface Algorithm
graph
- The graph this algorithm is using.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |