ch.javasoft.smx.impl
Class AbstractVector<N extends Number>

java.lang.Object
  extended by ch.javasoft.smx.impl.AbstractVector<N>
All Implemented Interfaces:
MatrixBase<N>, ReadableMatrix<N>, ReadableVector<N>, VectorBase<N>, WritableMatrix<N>, WritableVector<N>, Cloneable

public abstract class AbstractVector<N extends Number>
extends Object
implements ReadableVector<N>, WritableVector<N>

Abstract superclass with default implementations which might be common for most vector classes for specific data types.


Constructor Summary
AbstractVector(boolean columnVector)
           
 
Method Summary
abstract  AbstractVector<N> clone()
           
 int getColumnCount()
           
protected  int getIndexForMatrixAccess(int row, int col)
           
 int getRowCount()
           
 boolean isColumnVector()
           
 boolean isRowVector()
           
 void swapColumns(int colA, int colB)
           
 void swapRows(int rowA, int rowB)
           
abstract  AbstractVector<N> transpose()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.javasoft.smx.iface.ReadableVector
getNumberValueAt, toWritableVector
 
Methods inherited from interface ch.javasoft.smx.iface.ReadableMatrix
getNumberRows, getNumberValueAt, getSignumAt, newInstance, newInstance, toWritableMatrix
 
Methods inherited from interface ch.javasoft.smx.iface.WritableVector
setValueAt, swapValues, toReadableVector
 
Methods inherited from interface ch.javasoft.smx.iface.VectorBase
getSize, toString, writeTo, writeTo
 
Methods inherited from interface ch.javasoft.smx.iface.WritableMatrix
negate, newInstance, newInstance, setValueAt, toReadableMatrix
 
Methods inherited from interface ch.javasoft.smx.iface.MatrixBase
getMatrixOperations, getNumberOperations, toMultilineString, writeToMultiline, writeToMultiline
 

Constructor Detail

AbstractVector

public AbstractVector(boolean columnVector)
Method Detail

isColumnVector

public boolean isColumnVector()
Specified by:
isColumnVector in interface VectorBase<N extends Number>

isRowVector

public boolean isRowVector()
Specified by:
isRowVector in interface VectorBase<N extends Number>

getIndexForMatrixAccess

protected int getIndexForMatrixAccess(int row,
                                      int col)

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface MatrixBase<N extends Number>

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface MatrixBase<N extends Number>

swapRows

public void swapRows(int rowA,
                     int rowB)
Specified by:
swapRows in interface WritableMatrix<N extends Number>

swapColumns

public void swapColumns(int colA,
                        int colB)
Specified by:
swapColumns in interface WritableMatrix<N extends Number>

transpose

public abstract AbstractVector<N> transpose()
Specified by:
transpose in interface MatrixBase<N extends Number>
Specified by:
transpose in interface ReadableMatrix<N extends Number>
Specified by:
transpose in interface ReadableVector<N extends Number>
Specified by:
transpose in interface WritableMatrix<N extends Number>
Specified by:
transpose in interface WritableVector<N extends Number>

clone

public abstract AbstractVector<N> clone()
Specified by:
clone in interface MatrixBase<N extends Number>
Specified by:
clone in interface ReadableMatrix<N extends Number>
Specified by:
clone in interface VectorBase<N extends Number>
Specified by:
clone in interface WritableMatrix<N extends Number>
Overrides:
clone in class Object