Continuous2DEnvironment
Implementation of Euclidean2DEnvironment.
Inheritors
Properties
Create a position corresponding to the origin of this environment.
Functions
Add a GlobalReaction to the Environment.
Add a Layer to the Environment.
Add a terminator indicating whether the simulation should be considered finished.
Add a terminator indicating whether the simulation should be considered finished.
Calculates the shortest paths using the Floyd-Warshall algorithm calculating the Hop Distance between nodes.
Computes all the minimum distances with the provided metric using the Floyd–Warshall algorithm.
Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes. Returns a Set containing the SubNetworks.
Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes. Returns a Set containing the SubNetworks.
Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes, evaluated using the allShortestHopPaths method. Returns a Set containing the SubNetworks.
Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes, evaluated using the allShortestHopPaths method. Returns a Set containing the SubNetworks.
Given a node, this method returns its neighborhood.
Allows accessing a Node in this Environment known its id. Depending on the implementation, this method may or may not be optimized (namely, id could run in constant or linear time with the number of nodes).
Given a node this method returns a list of all the surrounding nodes within the given range. Note that this method (depending on the implementation) might be not optimized, and it's consequently much better to use Environment.getNeighborhood and filter the neighborhood if you are sure that all the nodes within the range are connected to the center.
Calculates the position of a node.
Returns true the network is segmented, false otherwise.
Given the coordinates of the point, returns a Position compatible with this environment.
Creates a new Euclidean2DPosition.
This method moves a node in the environment toward some direction. If node move is unsupported, it does nothing. Subclasses may override this method if they want to change the way a node moves towards some direction. The current implementation internally calls {@link #moveNodeToPosition(Node, Position2D)}, as such, overriding that method may suffice.
Returns the diameter of the network in environment units if it is not segmented, and NaN otherwise.
Returns a random element of the Iterable using the provided randomGenerator.
Remove a GlobalReaction from the Environment.
Removes node. If node removal is unsupported, it does nothing.
Returns the EnvironmentSubscriptionMonitor of this Environment.
A function that maps an Environment to its surrogate class (EnvironmentSurrogate). Use the toSuitablePositionSurrogate strategy for PositionSurrogate mapping.
A function that maps an Environment to its surrogate class (EnvironmentSurrogate).
Converts an Environment to a EnvironmentSurrogate.