InfiniteHalls

class InfiniteHalls<T> @JvmOverloads constructor(incarnation: Incarnation<T, Euclidean2DPosition>, hallSize: Double = DEFAULT_SIZE, val openDoors: Boolean = true) : AbstractLimitedContinuous2D<T> (source)

An environment made of an infinite grid of halls, each one with a room connected to corridors through doors.

Parameters

incarnation

the incarnation to be used.

hallSize

the size of a single hall.

openDoors

if true, every room has four open accesses, otherwise only two.

Type Parameters

T

concentration type

Constructors

Link copied to clipboard
constructor(incarnation: Incarnation<T, Euclidean2DPosition>, hallSize: Double = DEFAULT_SIZE, openDoors: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
override val dimensions: Int
Link copied to clipboard
Link copied to clipboard
open override val isTerminated: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var networkModel: NetworkModel<T>
Link copied to clipboard
override val nodeCount: Observable<Int>
Link copied to clipboard
open override val nodes: ObservableList<Node<T>>
Link copied to clipboard
override val offset: DoubleArray
Link copied to clipboard
Link copied to clipboard
open override val origin: Euclidean2DPosition
Link copied to clipboard
Link copied to clipboard
open override val reactions: ObservableList<Reaction<T>>
Link copied to clipboard

A factory of shapes compatible with this environment.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override val size: DoubleArray
Link copied to clipboard
open override val sizeInDistanceUnits: DoubleArray

Functions

Link copied to clipboard
open override fun addLayer(molecule: Molecule, layer: Layer<T, Euclidean2DPosition>)
Link copied to clipboard
open override fun addNode(node: Node<T>, position: Euclidean2DPosition): Boolean
Link copied to clipboard
open override fun addReaction(reaction: Reaction<T>)
Link copied to clipboard
Link copied to clipboard
open operator override fun contains(node: Node<T>): Boolean
Link copied to clipboard
open override fun currentPositionOf(node: Node<T>): Euclidean2DPosition
Link copied to clipboard
open override fun distanceBetween(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
open fun Node<T>.distanceTo(other: Node<T>): Double
Link copied to clipboard

The farthest position reachable by the node towards the desired one, stopping at the walls of the halls.

Link copied to clipboard
open override fun getHeading(node: Node<T>): Euclidean2DPosition

Gets the heading of a node as a direction vector.

Link copied to clipboard
open override fun getNodesWithin(shape: Euclidean2DShape): List<Node<T>>

Gets all nodes whose shape.intersect is true for the given shape.

Link copied to clipboard
open override fun getShape(node: Node<T>): Euclidean2DShape

Gets the shape of a node relatively to its position and heading in the environment.

Link copied to clipboard
open override fun layerFor(molecule: Molecule): Layer<T, Euclidean2DPosition>?
Link copied to clipboard
open fun makePosition(coordinates: List<Number>): Euclidean2DPosition

open override fun makePosition(vararg coordinates: Number): Euclidean2DPosition

Creates an euclidean position from the given coordinates.

Link copied to clipboard
open fun Node<T>.moveBy(displacement: Euclidean2DPosition)
Link copied to clipboard
open fun moveNodeBy(node: Node<T>, displacement: Euclidean2DPosition)
Link copied to clipboard
open override fun moveNodeTo(node: Node<T>, position: Euclidean2DPosition)
Link copied to clipboard
open fun Node<T>.moveTo(position: Euclidean2DPosition)
Link copied to clipboard
open override fun neighborhoodOf(node: Node<T>): Observable<Neighborhood<T>>
Link copied to clipboard
open override fun nodesAround(position: Euclidean2DPosition, range: Double): List<Node<T>>
open override fun nodesAround(node: Node<T>, range: Double): List<Node<T>>
Link copied to clipboard
open fun Node<T>.nodesInRange(range: Double): List<Node<T>>
Link copied to clipboard
open override fun nodeWithId(id: Int): Node<T>
Link copied to clipboard
open override fun observeLayerValue(molecule: Molecule, node: Node<T>): Observable<T?>
Link copied to clipboard
open override fun observeNodesAround(position: Euclidean2DPosition, range: Double): ObservableSet<Node<T>>
open override fun observeNodesAround(node: Node<T>, range: Double): ObservableSet<Node<T>>
Link copied to clipboard
open override fun positionOf(node: Node<T>): Observable<Euclidean2DPosition>
Link copied to clipboard
open fun Node<T>.remove()
open fun Reaction<T>.remove()
Link copied to clipboard
open override fun removeNode(node: Node<T>)
Link copied to clipboard
open override fun removeReaction(reaction: Reaction<T>)
Link copied to clipboard
open override fun setHeading(node: Node<T>, direction: Euclidean2DPosition)

Sets the heading of a node.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String