Environment
Interface for an environment. Every environment must implement this specification. T is the Concentration type, P is the Position type.
Inheritors
Properties
The number of dimensions of this environment.
Get the Environment's GlobalReactions.
Return the Incarnation used to initialize the entities of this Environment, if it has been set.
Return true if all the terminators are true.
Returns the current LinkingRule.
Returns the number of Nodes currently in the Environment.
This method allows to know which are the smallest coordinates represented. Return an array of length dimensions containing the smallest coordinates for each dimension.
Return the current Simulation, if present, or throws an IllegalStateException otherwise.
Return the current Simulation, if present, or null
otherwise.
The size of the environment as an array of length getDimensions(). This method must return distance measured with the same unit used by the positions. No non-euclidean distance metrics are allowed.
This method returns the size of the environment as an array of length .getDimensions. This method must return distance measured with the same unit used for measuring distances. It may or may not return the same result of .getSize.
Functions
Add a GlobalReaction to the Environment.
Add a terminator indicating whether the simulation should be considered finished.
Given a node, this method returns its neighborhood.
Allows to access a Node in this Environment known its id. Depending on the implementation, this method may or not be optimized (namely, id could run in constant or linear time with the number of nodes).
Given a position this method returns a list of all the surroundings nodes within the given range. Note that this method (depending on the implementation) might be not optimized.
Given a node this method returns a list of all the surroundings 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.
Given the coordinates of the point, returns a Position compatible with this environment.
Remove a GlobalReaction from the Environment.
This method allows to remove a node. If node removal is unsupported, it does nothing.