public class NodeMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
nodes_ids |
Constructor and Description |
---|
NodeMap(java.util.LinkedList<Tuple<java.lang.Integer,Position>> list,
int communicationRadio) |
Modifier and Type | Method and Description |
---|---|
void |
addNode(Tuple<java.lang.Integer,Position> node)
Add a node to the Map.
|
boolean |
changeNodePosition(java.lang.Integer n,
Position oldPosition,
Position newPosition)
Changes the node position inside the Hash.
|
void |
get_in_range(int init,
int end) |
java.util.List<java.lang.Integer> |
possibleNeighbours(java.lang.Integer n,
Position p) |
public void addNode(Tuple<java.lang.Integer,Position> node)
node
- - the node to be addedpublic void get_in_range(int init, int end)
public boolean changeNodePosition(java.lang.Integer n, Position oldPosition, Position newPosition)
n
- - the node which position may change.oldPosition
- - the node's old positionnewPosition
- - the node's new positionpublic java.util.List<java.lang.Integer> possibleNeighbours(java.lang.Integer n, Position p)