Advanced Mathematics Methods

This package deals with methods used to manipulate matrices.

This page discusses:

Matrix.Determinant()

Method used to compute a matrix determinant.

Signature

Matrix.Determinant() : Real

ReturnType

Real

Matrix.Dump()

Method used to return the matrix representation in the form of a string.

Signature

Matrix.Dump() : String

ReturnType

String

Matrix.Get()

Method used to return the item x or y of the matrix.

Signature

Matrix.Get(x : Integer, y : Integer) : Real

Arguments

NameInput / OutputRequired?TypeComment
xInYesInteger-
yInYesInteger-

ReturnType

Real

Matrix.GetColumn()

Method used to return a column of a given matrix according to an index.

Signature

Matrix.GetColumn(Index : Integer) : Vector

Arguments

NameInput/OutputRequired?TypeComment
IndexInYesIntegerIndex of the returned column.

ReturnType

Vector

Example

let M (Matrix)
let V (Vector)
M = [0, 1, 5; 2, 1, 4; 3, 2, 0]
V = M.GetLine(2) // now V = [2, 1, 4]
V = M.GetColumn(3) // now V = [5, 4, 0]

Matrix.GetLine()

Method used to return a line of a given matrix according to an index.

Signature

Matrix.GetLine(Index : Integer) : Vector

Arguments

NameInput/OutputRequired?TypeComment
IndexInYesIntegerIndex of the returned line.

ReturnType

Vector

Example

let M (Matrix)
let V (Vector)
M = [0, 1, 5; 2, 1, 4; 3, 2, 0]
V = M.GetLine(2) // now V = [2, 1, 4]
V = M.GetColumn(3) // now V = [5, 4, 0]

Matrix.Invert()

Method used to invert the matrix.

Signature

Matrix.Invert() : Matrix

ReturnType

Matrix

Matrix.Set()

Method used to modify the value of the x or y item of the matrix.

Signature

Matrix.Set(x : Integer, y : Integer, value : Real)

Arguments

NameInput / OutputRequired?TypeComment
xInYesInteger-
yInYesInteger-
valueInYesReal-

Matrix.SetColumn()

Method used to set a column of a given matrix according to an index and a vector.

Signature

Matrix.SetColumn(Index : Integer, ValueVector : Vector)

Arguments

NameInput/OutputRequired?TypeComment
IndexInYesIntegerPosition of the column in the matrix.
ValueVectorInYesVectorValue used for the column of the matrix.

Example

let M (Matrix)
let V (Vector)
M = [0, 1, 5; 2, 1, 4; 3, 2, 0]
V = [2, 2, 2]
M.SetLine(2, V) // now M = [0, 1, 5; 2, 2, 2; 3, 2, 0]
V = [3; 3; 3]
M.SetColumn(3, V) // now M = [0, 1, 3; 2, 2, 3; 3, 2, 3]

Matrix.SetLine()

Method used to set a line of a given matrix according to an index and a vector.

Signature

Matrix.SetLine(Index : Integer, ValueVector : Vector)

Arguments

NameInput/OutputRequired?TypeComment
IndexInYesIntegerPosition of the line in the matrix.
ValueVectorInYesVectorValue used for the line of the matrix.

Example

let M (Matrix)
let V (Vector)
M = [0, 1, 5; 2, 1, 4; 3, 2, 0]
V = [2, 2, 2]
M.SetLine(2, V) // now M = [0, 1, 5; 2, 2, 2; 3, 2, 0]
V = [3; 3; 3]
M.SetColumn(3, V) // now M = [0, 1, 3; 2, 2, 3; 3, 2, 3]

Matrix.ToString()

-

Signature

Matrix.ToString() : String

ReturnType

String

Matrix.Transpose()

Method used to transpose a matrix.

Signature

Matrix.Transpose() : Matrix

ReturnType

Matrix

Vector.Norm()

Method used to compute the vector norm.

Signature

Vector.Norm() : Real

ReturnType

Real