Interface MatrixI
- All Known Implementing Classes:
ComplexMatrix,DoubleMatrix,GenericMatrix,ObjectMatrix,RationalMatrixFactory.RationalMatrix,SequenceMatrix
public interface MatrixI
Defines the basic interface implemented by all types of matrix.
- Since:
- Jep 3.5 / Extensions 2.0
- Author:
- Richard Morris
-
Method Details
-
getEle
Gets an element of a matrix- Parameters:
row- the rowcol- the column- Returns:
- the element
- Throws:
EvaluationException- if the index is out of range. Since Jep 4.1 extensions 2.2 this now throws an EvaluationException
-
setEle
Set an element of a matrix- Parameters:
row-col-val- value to set- Throws:
EvaluationException
-
getNRows
int getNRows()The number of rows- Returns:
- number of rows
-
getNCols
int getNCols()The number of columns- Returns:
- number of columns
-
getDimensions
Dimensions getDimensions()Gets the dimensions of the Vector or Matrix- Returns:
- the dimensions
-
toArray
Copies the data to an array- Parameters:
mat-- Returns:
- mat with the elements filled in
- Throws:
EvaluationException- if mat is not a matrix of the correct size
-