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 class
SingleSourceShortestPathModel.ShortestPathEntry
-
Field Summary
Fields Modifier and Type Field Description static double
INF
-
Constructor Summary
Constructors Constructor Description SingleSourceShortestPathModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(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()
void
setVertexList(java.util.List<java.lang.Integer> vertexList)
java.lang.String
toString()
org.w3c.dom.Element
toXml(org.w3c.dom.Document doc)
void
writeToFile(java.lang.String filename)
void
writeToStream(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:
toXml
in classXmlMarshallable
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-