alchemist-interfaces / it.unibo.alchemist.model.interfaces.geometry / Vector

Vector

interface Vector<S : Vector<S>>

A generic vector in a multidimensional space

Parameters

Properties

dimensions

The dimensions of the space this vector belongs to.

abstract val dimensions: Int

Functions

getCoordinate

The coordinate of this vector in the specified dimension relatively to the basis its space is described with.

abstract fun getCoordinate(dim: Int): Double

minus

Support for subtraction. Note: the dimensions must coincide.

abstract operator fun minus(other: S): S

plus

Support for sum. Note: the dimensions must coincide.

abstract operator fun plus(other: S): S