Package-level declarations

Types

Link copied to clipboard
@SerialName(value = "EmptyConcentration")
@Serializable
object EmptyConcentrationSurrogate

An object that represents an Empty Concentration.

Link copied to clipboard
@Serializable
@SerialName(value = "Environment")
data class EnvironmentSurrogate<out TS : Any, out PS : PositionSurrogate>(val dimensions: Int, val nodes: List<NodeSurrogate<TS, PS>>)

Surrogate class for the it.unibo.alchemist.model.Environment interface.

Link copied to clipboard
@Serializable
@SerialName(value = "Position")
data class GeneralPositionSurrogate(val coordinates: DoubleArray, val dimensions: Int) : PositionSurrogate

Surrogate class for the it.unibo.alchemist.model.Position interface. This implementation is valid for any type of position.

Link copied to clipboard
data class MoleculeSurrogate(val name: String)

Surrogate class for the Molecule interface.

Link copied to clipboard

Custom serializer to map a molecule to a string, as in JSON non-primitive types aren't allowed in Map key position.

Link copied to clipboard
@Serializable
@SerialName(value = "Node")
data class NodeSurrogate<out TS : Any, out PS : PositionSurrogate>(val id: Int, val contents: Map<MoleculeSurrogate, TS>, val position: PS)

Surrogate class for the it.unibo.alchemist.model.Node interface. Note: The position is kept by the Environment in the original structure. To improve performance and reduce the serialized String size, the position was moved to the node.

Link copied to clipboard
@Serializable
@SerialName(value = "Position2D")
data class Position2DSurrogate(val x: Double, val y: Double) : PositionSurrogate

Surrogate class for the it.unibo.alchemist.model.Position2D interface.

Link copied to clipboard
@Serializable
sealed interface PositionSurrogate

Surrogate interface for the it.unibo.alchemist.model.Position interface. Note: by using the sealed keyword any subclass of PositionSurrogate can be serialized and deserialized automatically using a polymorphic serializer.

Link copied to clipboard
@SerialName(value = "Status")
@Serializable
enum StatusSurrogate : Enum<StatusSurrogate>

Multiplatform enum to use the it.unibo.alchemist.core.Status outside a jvm.