|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.hawaii.ics.yucheng.Matrix<java.lang.Boolean>
edu.hawaii.ics.yucheng.JadeSolver.SolutionMatrix
class JadeSolver.SolutionMatrix
A solution matrix, which is a matrix with v rows and v columns that holds booleans indicating whether or not vertices are connected.
Constructor Summary | |
---|---|
|
JadeSolver.SolutionMatrix(JadeSolver.GraphData g)
Initializes a new instance of the class based on the number of vertices in a graph. |
private |
JadeSolver.SolutionMatrix(JadeSolver.SolutionMatrix m)
Initializes a new instance of the class based on the specified matrix. |
Method Summary | |
---|---|
JadeSolver.SolutionMatrix |
clone()
Returns a clone of the solution matrix. |
private java.util.Collection<Edge> |
getEdges()
Returns the edges in the collection. |
GraphSolution |
getSolution()
Returns a partial solution, i.e. |
GraphSolution |
getSolution(JadeSolver.VertexNode root,
float weight)
Returns a solution with a root vertex selection and a weight. |
boolean |
isMarked(int a,
int b)
Returns true if an item in the matrix is marked true. |
void |
mark(int a,
int b)
Marks two vertices to define an edge. |
void |
mark(JadeSolver.VertexNode a,
JadeSolver.VertexNode b)
Marks two vertices to define an edge. |
void |
reset()
Un-marks all vertices. |
void |
set(int a,
int b,
java.lang.Boolean value)
Sets a value in the matrix. |
Methods inherited from class edu.hawaii.ics.yucheng.Matrix |
---|
columns, get, rows, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JadeSolver.SolutionMatrix(JadeSolver.GraphData g)
g
- A graph.private JadeSolver.SolutionMatrix(JadeSolver.SolutionMatrix m)
m
- The matrix.Method Detail |
---|
public JadeSolver.SolutionMatrix clone()
clone
in class Matrix<java.lang.Boolean>
private java.util.Collection<Edge> getEdges()
public GraphSolution getSolution()
public GraphSolution getSolution(JadeSolver.VertexNode root, float weight)
root
- The root vertex.weight
- The total weight.
public boolean isMarked(int a, int b)
a
- The first vertex.b
- The second vertex.
public void mark(int a, int b)
a
- One vertex.b
- Another vertex.public void mark(JadeSolver.VertexNode a, JadeSolver.VertexNode b)
a
- One vertex.b
- Another vertex.public void reset()
public void set(int a, int b, java.lang.Boolean value)
set
in class Matrix<java.lang.Boolean>
a
- One vertexb
- Another vertex.value
- The value.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |