All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class drasys.or.linear.algebra.Algebra

drasys.or.linear.algebra.Algebra

public class Algebra
implements AlgebraI
A class that implements the default linear algebraic operators.
Copyright (C) 1997 by DRA Systems all rights reserved.


Constructor Index

 o Algebra()

Method Index

 o add(MatrixI, MatrixI)
Add two matrices.
 o add(VectorI, VectorI)
Add two vectors.
 o invert(MatrixI)
Invert a matrix.
 o multiply(MatrixI, MatrixI)
Multiply two matrices.
 o multiply(MatrixI, VectorI)
Multiply a matrix by column vector.
 o multiply(VectorI, MatrixI)
Multiply a row vector by matrix.
 o multiply(VectorI, VectorI)
Multiply two vectors.
 o subtract(MatrixI, MatrixI)
Subtract two matrices.
 o subtract(VectorI, VectorI)
Subtract two vectors.
 o transpose(MatrixI)
Transpose a matrix.

Constructors

 o Algebra
 public Algebra()

Methods

 o add
 public MatrixI add(MatrixI a,
                    MatrixI b) throws AlgebraException
Add two matrices.

Returns:
a SparseMatrix if both arguments are sparse and a DenseMatrix otherwise.
 o subtract
 public MatrixI subtract(MatrixI a,
                         MatrixI b) throws AlgebraException
Subtract two matrices.

Returns:
a SparseMatrix if both arguments are sparse and a DenseMatrix otherwise.
 o multiply
 public MatrixI multiply(MatrixI a,
                         MatrixI b) throws AlgebraException
Multiply two matrices. return a DenseMatrix.

 o multiply
 public VectorI multiply(VectorI a,
                         MatrixI b) throws AlgebraException
Multiply a row vector by matrix.

Returns:
a column vector.
 o multiply
 public VectorI multiply(MatrixI a,
                         VectorI b) throws AlgebraException
Multiply a matrix by column vector.

Returns:
a row vector.
 o add
 public VectorI add(VectorI a,
                    VectorI b) throws AlgebraException
Add two vectors.

Returns:
a SparseMatrix if both arguments are sparse and a DenseMatrix otherwise.
 o subtract
 public VectorI subtract(VectorI a,
                         VectorI b) throws AlgebraException
Subtract two vectors.

Returns:
a SparseMatrix if both arguments are sparse and a DenseMatrix otherwise.
 o multiply
 public double multiply(VectorI a,
                        VectorI b) throws AlgebraException
Multiply two vectors. return a scaler.

 o transpose
 public MatrixI transpose(MatrixI a)
Transpose a matrix.

Returns:
a SparseMatrix if the argument is sparse, a DenseMatrix otherwise.
 o invert
 public MatrixI invert(MatrixI a) throws AlgebraException
Invert a matrix.

Returns:
a DenseMatrix.

All Packages  Class Hierarchy  This Package  Previous  Next  Index