class RealVector: Any

Real vector of double values, whereby the number of provided values defines the dimension of the vector.

Fields

Name Description
val dimension: /** dimension of the vector */

dimension of the vector

val norm: /** L_2 norm of the vector */

L_2 norm of the vector

Constructors

<init>

constructor(entries: List<Double>)

Parameters

Name Description
entries: List<Double>

<init>

constructor(entries: DoubleArray)

Real vector of double values, whereby the number of provided values defines the dimension of the vector.

Parameters

Name Description
entries: DoubleArray

entry values of the real vector

Methods

get

operator fun get(index: Int): Double

Parameters

Name Description
index: Int

ReturnValue

Name Description
Double

plus

operator fun plus(v: RealVector): (v: RealVector)

Parameters

Name Description
v: RealVector

ReturnValue

Name Description
(v: RealVector)

minus

operator fun minus(v: RealVector): (v: RealVector)

Parameters

Name Description
v: RealVector

ReturnValue

Name Description
(v: RealVector)

containsNaN

fun containsNaN(): Boolean

Returns true, if any entry of this vector is NaN.

ReturnValue

Name Description
Boolean

containsInfinite

fun containsInfinite(): Boolean

Returns true, if any entry of this vector is Infinite.

ReturnValue

Name Description
Boolean

dotProduct

fun dotProduct(other: RealVector): Double

Returns the dot product of this with the other.

Parameters

Name Description
other: RealVector

ReturnValue

Name Description
Double

mapMultiply

fun mapMultiply(factor: Double): (factor: Double)

Multiplies each entry with factor and returns the RealVector.

Parameters

Name Description
factor: Double

ReturnValue

Name Description
(factor: Double)

ebeMultiply

fun ebeMultiply(other: RealVector): (other: RealVector)

Returns the element-by-element product of this with the other.

Parameters

Name Description
other: RealVector

ReturnValue

Name Description
(other: RealVector)

ebeDivide

fun ebeDivide(other: RealVector): (other: RealVector)

Returns the element-by-element division of this with the other.

Parameters

Name Description
other: RealVector

ReturnValue

Name Description
(other: RealVector)

normalize

fun normalize(): ()

Returns the normalized vector.

ReturnValue

Name Description
()

equals

fun equals(other: Any?): Boolean

Parameters

Name Description
other: Any?

ReturnValue

Name Description
Boolean

hashCode

fun hashCode(): Int

ReturnValue

Name Description
Int

toDoubleArray

fun toDoubleArray(): DoubleArray

ReturnValue

Name Description
DoubleArray

toDoubleList

fun toDoubleList(): List<Double>

ReturnValue

Name Description
List<Double>

toVectorCM

fun toVectorCM(): CMArrayRealVector

Conversion to adapted Real Vector class from Apache Commons Math.

ReturnValue

Name Description
CMArrayRealVector

CompanionObject

RealVector

class RealVector: Any

Real vector of double values, whereby the number of provided values defines the dimension of the vector.

Methods

of

fun of(vararg entries: Double): RealVector

Parameters

Name Description
vararg entries: Double

ReturnValue

Name Description
RealVector