|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.hawaii.ics.yucheng.JadeSolver.GraphData
class JadeSolver.GraphData
A class that encapsulates the graph file conveniently for the algorithm.
Field Summary | |
---|---|
private Matrix<java.lang.Boolean> |
myConnections
|
private Graph |
myData
|
private java.util.ArrayList<JadeSolver.VertexNode> |
myVertices
|
Constructor Summary | |
---|---|
JadeSolver.GraphData(Graph graph)
Initializes a new instance of the class. |
Method Summary | |
---|---|
boolean |
isConnected(int first,
int second)
Returns true if the specified vertices are connected. |
java.util.Iterator<JadeSolver.VertexNode> |
iterator()
Returns a vertex node iterator. |
JadeSolver.VertexNode |
nodeAt(int index)
Returns the vertex node at the specified index. |
java.lang.String |
toString()
Returns the string representation of the class data. |
int |
vertices()
Returns the number of vertices. |
float |
weightAt(int index)
Returns the weight of the specified vertex. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final Matrix<java.lang.Boolean> myConnections
private final Graph myData
private final java.util.ArrayList<JadeSolver.VertexNode> myVertices
Constructor Detail |
---|
public JadeSolver.GraphData(Graph graph)
graph
- The graph file data.Method Detail |
---|
public boolean isConnected(int first, int second)
first
- The first vertex.second
- The second vertex.
public java.util.Iterator<JadeSolver.VertexNode> iterator()
iterator
in interface java.lang.Iterable<JadeSolver.VertexNode>
public JadeSolver.VertexNode nodeAt(int index)
index
- The index.
public java.lang.String toString()
toString
in class java.lang.Object
public int vertices()
public float weightAt(int index)
index
- The vertex index.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |