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.
-
Algebra()
-
-
add(MatrixI, MatrixI)
- Add two matrices.
-
add(VectorI, VectorI)
- Add two vectors.
-
invert(MatrixI)
- Invert a matrix.
-
multiply(MatrixI, MatrixI)
- Multiply two matrices.
-
multiply(MatrixI, VectorI)
- Multiply a matrix by column vector.
-
multiply(VectorI, MatrixI)
- Multiply a row vector by matrix.
-
multiply(VectorI, VectorI)
- Multiply two vectors.
-
subtract(MatrixI, MatrixI)
- Subtract two matrices.
-
subtract(VectorI, VectorI)
- Subtract two vectors.
-
transpose(MatrixI)
- Transpose a matrix.
Algebra
public Algebra()
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.
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.
multiply
public MatrixI multiply(MatrixI a,
MatrixI b) throws AlgebraException
- Multiply two matrices.
return a DenseMatrix.
multiply
public VectorI multiply(VectorI a,
MatrixI b) throws AlgebraException
- Multiply a row vector by matrix.
- Returns:
- a column vector.
multiply
public VectorI multiply(MatrixI a,
VectorI b) throws AlgebraException
- Multiply a matrix by column vector.
- Returns:
- a row vector.
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.
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.
multiply
public double multiply(VectorI a,
VectorI b) throws AlgebraException
- Multiply two vectors.
return a scaler.
transpose
public MatrixI transpose(MatrixI a)
- Transpose a matrix.
- Returns:
- a SparseMatrix if the argument is sparse, a DenseMatrix otherwise.
invert
public MatrixI invert(MatrixI a) throws AlgebraException
- Invert a matrix.
- Returns:
- a DenseMatrix.
All Packages Class Hierarchy This Package Previous Next Index