ru.sscc.matrix
Class TransposedMatrix

java.lang.Object
  |
  +--ru.sscc.matrix.TransposedMatrix

public final class TransposedMatrix
extends java.lang.Object
implements RealAlgebraicMatrix

The decorator class treating an algebraic matrix as the transposed matrix.

See Also:
Serialized Form

Constructor Summary
TransposedMatrix(RealAlgebraicMatrix matrix)
          Constructs logically transposed matrix upon an algebraic matrix.
 
Method Summary
 int columnsNumber()
          Returns the number of columns in the transposed matrix.
 RealAlgebraicMatrix getOriginalMatrix()
          Returns the original matrix, the instance was constructed on.
 void multiply(RealVector source, RealVector target)
          Multiplies this matrix by a vector: the same as multiplyT() for underlying matrix.
 void multiplyT(RealVector source, RealVector target)
          Multiplies the transposed matrix by a vector: the same as multiply() for underlying matrix.
 double relativeAccuracy()
          Returns the relative accuracy for underlying matrix.
 int rowsNumber()
          Returns the number of rows in the transposed matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransposedMatrix

public TransposedMatrix(RealAlgebraicMatrix matrix)
Constructs logically transposed matrix upon an algebraic matrix.
Method Detail

getOriginalMatrix

public RealAlgebraicMatrix getOriginalMatrix()
Returns the original matrix, the instance was constructed on.

rowsNumber

public int rowsNumber()
Returns the number of rows in the transposed matrix.
Tags copied from interface: Matrix
Returns:
a number of matrix rows.

columnsNumber

public int columnsNumber()
Returns the number of columns in the transposed matrix.
Tags copied from interface: Matrix
Returns:
a number of matrix columns.

relativeAccuracy

public double relativeAccuracy()
Returns the relative accuracy for underlying matrix.
Specified by:
relativeAccuracy in interface RealAlgebraicMatrix

multiply

public void multiply(RealVector source,
                     RealVector target)
Multiplies this matrix by a vector: the same as multiplyT() for underlying matrix.
Specified by:
multiply in interface RealAlgebraicMatrix
Tags copied from interface: RealAlgebraicMatrix
Parameters:
source - a source vector to multiply
target - a target vector to write the result
Throws:
java.lang.IllegalStateException - is thrown when the matrix isn't algebraic

multiplyT

public void multiplyT(RealVector source,
                      RealVector target)
Multiplies the transposed matrix by a vector: the same as multiply() for underlying matrix.
Specified by:
multiplyT in interface RealAlgebraicMatrix
Tags copied from interface: RealAlgebraicMatrix
Parameters:
source - a source vector to multiply
target - a target vector to write the result
Throws:
java.lang.IllegalStateException - is thrown when the matrix isn't algebraic