E - Base type for elements of the matrix.public class GenericVector<E> extends java.lang.Object implements VectorI
setEle(int, Object) method. Both of these take a standard form.
class ComplexVector extends GenericVector<Complex> {
protected ComplexVector(Complex[][] data) {
super(data);
}
@Override
public void setEle(int row, int col, Object val) throws EvaluationException {
if(val instanceof Complex)
this.setEleG(row, col, (Complex) val);
else
throw new EvaluationException("Complex Vector setEle: element should Complex. It was "+val.toString());
}
}
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object[] |
data |
| Constructor and Description |
|---|
GenericVector(java.lang.Object[] data) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests equality using the Arrays.equals method.
|
Dimensions |
getDimensions()
Gets the dimensions of the Vector or Matrix
|
E |
getEle(int i)
Gets the i-th element of a vector
|
int |
getNEles()
Gets the number of elements of a vector
|
int |
hashCode() |
void |
setEle(int i,
java.lang.Object val)
Sets an element of a vector.
|
void |
setEleG(int i,
E val) |
java.lang.Object[] |
toArray(java.lang.Object[] vec) |
java.lang.String |
toString() |
public E getEle(int i)
VectorIpublic void setEleG(int i,
E val)
throws EvaluationException
EvaluationExceptionpublic void setEle(int i,
java.lang.Object val)
throws EvaluationException
VectorIsetEle in interface VectorIEvaluationExceptionpublic int getNEles()
VectorIpublic Dimensions getDimensions()
VectorIgetDimensions in interface VectorIpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object[] toArray(java.lang.Object[] vec)
throws EvaluationException
toArray in interface VectorIEvaluationExceptionCopyright © 2018 Singular Systems http://www.singularsys.com/jep