Class GenericVector<E>

java.lang.Object
com.singularsys.extensions.matrix.genericmat.GenericVector<E>
Type Parameters:
E - Base type for elements of the matrix.
All Implemented Interfaces:
VectorI, Serializable, Iterable<Object>
Direct Known Subclasses:
ComplexVector, ObjectVector, RationalMatrixFactory.RationalVector

public class GenericVector<E> extends Object implements VectorI, Serializable
Generic implementation of a matrix when all elements are of the base type E. Subclasses just need to provide a constructor and the 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());
                }

        }
 
See Also: