Package com.algo.models
Class SingleSourceShortestPathModel
- java.lang.Object
-
- com.algo.plugins.XmlMarshallable
-
- com.algo.models.SingleSourceShortestPathModel
-
public class SingleSourceShortestPathModel extends XmlMarshallable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSingleSourceShortestPathModel.ShortestPathEntry
-
Field Summary
Fields Modifier and Type Field Description static doubleINF
-
Constructor Summary
Constructors Constructor Description SingleSourceShortestPathModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int v, java.util.List<java.lang.Double> distances, java.util.Map<java.lang.Integer,java.lang.Integer> predecessor)java.util.List<SingleSourceShortestPathModel.ShortestPathEntry>getShortestPaths()java.util.List<java.lang.Integer>getVertexList()voidsetVertexList(java.util.List<java.lang.Integer> vertexList)java.lang.StringtoString()org.w3c.dom.ElementtoXml(org.w3c.dom.Document doc)voidwriteToFile(java.lang.String filename)voidwriteToStream(javax.xml.transform.stream.StreamResult stream)-
Methods inherited from class com.algo.plugins.XmlMarshallable
xmlName
-
-
-
-
Field Detail
-
INF
public static final double INF
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
public void add(int v, java.util.List<java.lang.Double> distances, java.util.Map<java.lang.Integer,java.lang.Integer> predecessor)
-
getShortestPaths
public java.util.List<SingleSourceShortestPathModel.ShortestPathEntry> getShortestPaths()
-
getVertexList
public java.util.List<java.lang.Integer> getVertexList()
-
setVertexList
public void setVertexList(java.util.List<java.lang.Integer> vertexList)
-
writeToFile
public void writeToFile(java.lang.String filename) throws java.lang.Exception- Throws:
java.lang.Exception
-
writeToStream
public void writeToStream(javax.xml.transform.stream.StreamResult stream) throws java.lang.Exception- Throws:
java.lang.Exception
-
toXml
public org.w3c.dom.Element toXml(org.w3c.dom.Document doc) throws java.lang.Exception- Overrides:
toXmlin classXmlMarshallable- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-