|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectNeighList
public class NeighList
| Constructor Summary | |
|---|---|
NeighList(int nbNodes)
Initialisation constructor |
|
| Method Summary | |
|---|---|
void |
addNeighbor(int node1,
int node2)
Add a new neighbor to a node |
void |
addNode()
|
int |
chooseNeighbor(int node)
Return a random node of a node neighborhood |
void |
deleteNeighbor(int node1,
int node2)
Delete a neighbor of a node |
int |
getNbNeighbor(int node1)
Return the number of neighbor of a node |
int |
getNbNodes()
Return the number of nodes |
boolean |
isNeighbor(int node1,
int node2)
Return if a node is neighbor of an other node |
java.lang.String |
toString()
Return a string which represent the content of the list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NeighList(int nbNodes)
nbNodes - number of nodes| Method Detail |
|---|
public int getNbNodes()
public int getNbNeighbor(int node1)
node1 - node which you want the neighbor number
public void addNode()
public void addNeighbor(int node1,
int node2)
node1 - node which has the new neighbornode2 - the new neighbor
public void deleteNeighbor(int node1,
int node2)
node1 - the node that we want retrive the neighbornode2 - the neighbor
public boolean isNeighbor(int node1,
int node2)
node1 - node that we observe the neighborhoodnode2 - node which you want to search into the neighborhood of node1public int chooseNeighbor(int node)
node - neighborhood of this node
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 | |||||||