public abstract class AbstractConnectivityModel extends Model
Constructor and Description |
---|
AbstractConnectivityModel() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
isConnected(Node from,
Node to)
This method should tell when two close nodes are connected.
|
boolean |
isNear(Node n1,
Node n2) |
boolean |
updateConnection(Node n,
AbstractNodesList[] nodesLists)
Update a node connections using an array of AbstractNodesList.
|
boolean |
updateConnection(Node n,
AbstractNodesPositionMatrix nodesMatrix)
Update a node connections using an unic AbstractNodesPositionMatrix.
|
boolean |
updateConnection(Node n,
AbstractNodesPositionMatrix[] nodesMatrix)
Update a node connections using an array of AbstractNodesPositionMatrix.
|
boolean |
updateConnection(Node n,
ConcurrentNodesPositionHashMap nodesHash)
Update a node connections using a single ConcurrentHashMap (faster implementation).
|
getModelType, setModelType
public final boolean updateConnection(Node n, AbstractNodesList[] nodesLists)
n
- - the node whose connection might be updatednodesLists
- - the array of lists used to get the node's neighbourspublic final boolean updateConnection(Node n, AbstractNodesPositionMatrix[] nodesMatrix)
n
- - the node whose connection might be updatednodesMatrix
- - the array of matrices used to get the node's neighbourspublic final boolean updateConnection(Node n, AbstractNodesPositionMatrix nodesMatrix)
n
- - the node whose connection might be updatednodesMatrix
- - the matrix used to get the node's neighbourspublic final boolean updateConnection(Node n, ConcurrentNodesPositionHashMap nodesHash)
n
- - the node whose connection might be updatednodesHash
- - the map of all nodes to update the nodes connectionspublic abstract boolean isConnected(Node from, Node to)
from
- - the first nodeto
- - the node who is in from's communication range