|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDASOR_AdjMatrix
public class DASOR_AdjMatrix
| Constructor Summary | |
|---|---|
DASOR_AdjMatrix(int size)
Default constructor |
|
| Method Summary | |
|---|---|
void |
addNode()
|
void |
delNode(int node)
Delete the node. |
void |
empty()
Empty the matrix |
DASOR_Link |
getLink(int node1,
int node2)
|
DASOR_Link |
getLinkClicked(double x,
double y)
|
int |
getSize()
Return the size |
int |
getWeight(int node1,
int node2)
Return the weight between node 1 and node 2. |
boolean |
isLink(int node1,
int node2)
Return true if a link exists between the node1 and the node2, false otherwise. |
void |
setPos(DASOR_Node node1,
DASOR_Node node2)
|
void |
setWeight(int node1,
int node2,
int weight)
Set a weight between two nodes |
java.lang.String |
toString()
Return a string which contains the matrix |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DASOR_AdjMatrix(int size)
size - is the size of the matrix| Method Detail |
|---|
public int getSize()
public int getWeight(int node1,
int node2)
node1 - the first nodenode2 - the second node
public DASOR_Link getLink(int node1,
int node2)
public DASOR_Link getLinkClicked(double x,
double y)
public void setWeight(int node1,
int node2,
int weight)
node1 - first nodenode2 - second nodeweight - the weight
public void setPos(DASOR_Node node1,
DASOR_Node node2)
public void addNode()
public boolean isLink(int node1,
int node2)
node1 - first nodenode2 - second nodepublic void delNode(int node)
node - : the node to be deleted.public void empty()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||