-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Environment,java.io.Serializable,kotlin.collections.Iterable,kotlin.collections.MutableIterable
public interface EuclideanEnvironment<T extends Object, P extends Position<P>, Vector<P>> implements Environment<T, P>
-
-
Method Summary
Modifier and Type Method Description UnitmoveNode(Node<T> node, P direction)This method moves a node in the environment toward some direction. abstract PmakePosition(Double coordinates)Creates a Position compatible with this environment given its coordinates. PgetOrigin()-
Methods inherited from class it.unibo.alchemist.model.interfaces.EuclideanEnvironment
addLayer, addNode, addTerminator, getDimensions, getDistanceBetweenNodes, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getNodesWithinRange, getOffset, getPosition, getSimulation, getSize, getSizeInDistanceUnits, isTerminated, makePosition, moveNodeToPosition, removeNode, setLinkingRule, setSimulation -
Methods inherited from class it.unibo.alchemist.model.interfaces.Environment
iterator -
Methods inherited from class kotlin.collections.MutableIterable
forEach, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
moveNode
Unit moveNode(Node<T> node, P direction)
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.
-
makePosition
abstract P makePosition(Double coordinates)
Creates a Position compatible with this environment given its coordinates.
-
-
-
-