|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
fr.inria.opengve.bridge.algorithms.StepAlgo<V,E>
fr.inria.opengve.bridge.algorithms.undirected.PrimST<V,E>
V - the type of vertices.E - the type of edges.public abstract class PrimST<V,E extends Edge<V>>
This class computes the Minimum Spanning Tree of a graph
setLengthName(String)setLengthContext(Object)run()getMST()getMSTWeight()
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class fr.inria.opengve.bridge.algorithms.StepAlgo |
|---|
StepAlgo.StepAlgoMessage, StepAlgo.StepAlgoMessageType |
| Field Summary | |
|---|---|
static java.lang.String |
VERTEX_WEIGHT_NAME
This is the name used to store weight of vertex in demoMode only. |
| Constructor Summary | |
|---|---|
PrimST(Graph<V,E> g,
Map map)
|
|
PrimST(Graph<V,E> g,
Map m,
boolean demoMode)
|
|
| Method Summary | |
|---|---|
protected abstract Graph<V,E> |
createGraph(Graph<V,E> g)
Create a new empty graph sub graph of a given garph. |
Graph<V,E> |
getMST()
Return the computed minimum spanning tree. |
AbstractScalar |
getMSTWeight()
Return the weight of the computed MST. |
void |
run()
Compute the MST. |
void |
setInfiniteValue(AbstractScalar infinity)
Set the value used as infinity. |
void |
setInitialVertex(V initialVertex)
This method can be used to set the root of the resulting MST. |
void |
setLengthContext(java.lang.Object context)
Set the context used to load edge length in the map. |
void |
setLengthName(java.lang.String name)
Set the name used to load edge length in the map. |
| Methods inherited from class fr.inria.opengve.bridge.algorithms.StepAlgo |
|---|
ends, getDemoMode, getStepMode, isEnded, nextStep, notifyGraphDisplayRequest, notifyGraphDisplayRequest, notifyLabelEdgesRequest, notifyLabelVerticesRequest, pause, setPauseMode, setTime, start |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VERTEX_WEIGHT_NAME
| Constructor Detail |
|---|
public PrimST(Graph<V,E> g,
Map map)
public PrimST(Graph<V,E> g,
Map m,
boolean demoMode)
| Method Detail |
|---|
protected abstract Graph<V,E> createGraph(Graph<V,E> g)
g - The super graph.
public void setInitialVertex(V initialVertex)
initialVertex - The root of the resulting MST.
java.lang.IllegalArgumentException - If the given vertex doesn't belong to the graph.public void setLengthName(java.lang.String name)
name - The new name used to load length.public void setLengthContext(java.lang.Object context)
context - The new context used to load edge length in the map or
null to specify that no context must be used.public void setInfiniteValue(AbstractScalar infinity)
Double.MAX_VALUE.
infinity - The value used as infinity.public void run()
run in interface java.lang.Runnablerun in class StepAlgo<V,E extends Edge<V>>public Graph<V,E> getMST()
public AbstractScalar getMSTWeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||