Interface VectorI
-
- All Known Implementing Classes:
ComplexVector
,DoubleVector
,GenericVector
,ObjectVector
,RationalMatrixFactory.RationalVector
public interface VectorI
Defines the basic interface implemented by all matrix types.- Since:
- Jep 3.5 / Extensions 2.0
- Author:
- Richard Morris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Dimensions
getDimensions()
Gets the dimensions of the Vector or Matrixjava.lang.Object
getEle(int i)
Gets the i-th element of a vectorint
getNEles()
Gets the number of elements of a vectorvoid
setEle(int i, java.lang.Object val)
Sets an element of a vector.java.lang.Object[]
toArray(java.lang.Object[] vec)
-
-
-
Method Detail
-
getEle
java.lang.Object getEle(int i)
Gets the i-th element of a vector- Parameters:
i
- index (starts from 0)- Returns:
- the i-th element
-
setEle
void setEle(int i, java.lang.Object val) throws EvaluationException
Sets an element of a vector.- Parameters:
i
-val
-- Throws:
EvaluationException
-
getNEles
int getNEles()
Gets the number of elements of a vector- Returns:
- the number of elements
-
getDimensions
Dimensions getDimensions()
Gets the dimensions of the Vector or Matrix- Returns:
- the dimensions
-
toArray
java.lang.Object[] toArray(java.lang.Object[] vec) throws EvaluationException
- Throws:
EvaluationException
-
-