Class: Matrix
Prev
Next

Class: Matrix

Represents a matrix of any type in Kst. Some matrices are editable, while others are not.

Inherits: Object

Collection class: MatrixCollection

Constructors:

Methods:

Properties:

Matrix ( )

Default constructor creates an empty matrix.

void resize ( number columns, number rows )

  • number columns - The new number of rows in the matrix. Should be >= 1.

  • number rows - The new number of columns in the matrix. Should be >= 1.

Resizes the matrix.
  • Throws: GeneralError - Throws this exception if the matrix is not editable.

void zero ( )

Sets all values in the matrix to zero.

  • Throws: GeneralError - Throws this exception if the matrix is not editable.

number value ( number column, number row )

  • number column - The column index of the matrix position to be read.

  • number row - The row index of the matrix position to be read.

Gets the value of a matrix at the given column and row indices.
  • Throws: GeneralError - Throws this exception if the indices are out of range.

void setValue ( number column, number row, number value )

  • number column - The column index of the matrix position to be set.

  • number row - The row index of the matrix position to be set.

  • number value - The value to set the specified matrix position to.

Sets the value of a matrix at the given column and row indices.
  • Throws: GeneralError - Throws this exception if the matrix is not editable or the indices are out of range.

void update ( )

Updates the statistical values associated with a matrix.

  • Throws: GeneralError - Throws this exception if the matrix is not editable.

number editable [Read-Only]

True if the matrix is editable by the user. This should be checked before attempting to modify a matrix in any way.

number min [Read-Only]

The value of the smallest sample in the matrix.

number max [Read-Only]

The value of the largest sample in the matrix.

number mean [Read-Only]

The mean value of all samples in the matrix.

number numNew [Read-Only]

The number of new samples.

number rows [Read-Only]

The number of rows in the matrix.

number columns [Read-Only]

The number of coluns in the matrix.

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team