You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

To use these functions, the Matrix Feature is required.

The matrix feature provides arbitrary functions to work with matrices in a data stream and provides algebraic operator (+, *, -, ^) to perform matrix addition, subtraction, multiplication, and exponentiation.

Matrix Example
SELECT [1.0,2.0,3.0;4.0,5.0,6.0]+[1.0,2.0,3.0;4.0,5.0,6.0] FROM stream
SELECT [1.0,2.0,3.0;4.0,5.0,6.0]-[1.0,2.0,3.0;4.0,5.0,6.0] FROM stream
SELECT [1.0,2.0,3.0;4.0,5.0,6.0]*[1.0,2.0,3.0;4.0,5.0,6.0] FROM stream
SELECT [1.0,2.0,3.0;4.0,5.0,6.0]^3 FROM stream

Tr(Matrix m)

Computes the trace of the matrix

Det(Matrix m)

Computes the determinant of the given matrix

Inv(Matrix m)

Computes the inverse of the given matrix

Trans(Matrix m)

Computes the transpose of the given matrix

Identity(Number size)

Creates a N x N identity matrix

SubMatrix(Matrix m, Number startRow, Number endRow, Number startColumn, Number endColumn)

Returns the submatrix of the given matrix starting at row StartRow and column StartColumn to EndRow and EndColumn (inclusive)

sMin(Matrix|Vector m)

Return the minimum element in the given matrix.

sMax(Matrix|Vector m)

Returns the maximum element in the given matrix.

sCount(Matrix|Vector m)

Counts all elements in the given matrix.

sSum(Matrix|Vector m)

Computes the sum of all elements of the given matrix.

sAVG(Matrix|Vector m)

Compute the average of all elements of the given matrix.

sMedian(Matrix|Vector m)

Compute the median of all elements of the given matrix.

  • No labels