|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.util.mantissa.linalg.Matrix
sim.util.mantissa.linalg.SquareMatrix
sim.util.mantissa.linalg.GeneralSquareMatrix
sim.util.mantissa.linalg.SymetricalMatrix
public class SymetricalMatrix
This class implements symetrical matrices of linear algebra.
This file is from the "Mantissa" Java software package found at http://www.spaceroots.org/software/mantissa/index.html. The license is included at the end of the source file.
Field Summary |
---|
Fields inherited from class sim.util.mantissa.linalg.Matrix |
---|
columns, data, rows |
Constructor Summary | |
---|---|
SymetricalMatrix(double w,
double[] a)
Build the symetrical matrix resulting from the product w.A.At. |
|
SymetricalMatrix(int order)
Simple constructor. |
|
SymetricalMatrix(int order,
double[] data)
Simple constructor. |
|
SymetricalMatrix(SymetricalMatrix s)
Copy constructor. |
Method Summary | |
---|---|
Matrix |
duplicate()
Polymorphic copy operator. |
void |
selfAdd(SymetricalMatrix s)
Add a matrix to the instance. |
void |
selfAddWAAt(double w,
double[] a)
Add the symetrical matrix resulting from the product w.A.At to the instance. |
void |
selfSub(SymetricalMatrix s)
Substract a matrix from the instance. |
void |
setElement(int i,
int j,
double value)
Set a matrix element. |
void |
setElementAndSymetricalElement(int i,
int j,
double value)
Set both a matrix element and its symetrical element. |
Methods inherited from class sim.util.mantissa.linalg.GeneralSquareMatrix |
---|
getDeterminant, getRangeForColumn, getRangeForRow, selfAdd, selfSub, solve |
Methods inherited from class sim.util.mantissa.linalg.SquareMatrix |
---|
getInverse, solve |
Methods inherited from class sim.util.mantissa.linalg.Matrix |
---|
add, getColumns, getElement, getRows, getTranspose, mul, mul, selfMul, sub, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SymetricalMatrix(int order)
order
- order of the matrixpublic SymetricalMatrix(int order, double[] data)
order
- order of the matrixdata
- table of the matrix elements (stored row after row)public SymetricalMatrix(SymetricalMatrix s)
s
- square matrix to copypublic SymetricalMatrix(double w, double[] a)
w
- multiplicative factor (weight)a
- base vector used to compute the symetrical contributionMethod Detail |
---|
public Matrix duplicate()
Matrix
Object.clone()
method, except that it has public access, it doesn't throw any
specific exception and it returns a Matrix.
duplicate
in class GeneralSquareMatrix
Object.clone()
public void setElement(int i, int j, double value)
setElementAndSymetricalElement(int, int, double)
can be used to set both elements
simultaneously.
setElement
in class GeneralSquareMatrix
i
- row index, from 0 to rows - 1j
- column index, from 0 to cols - 1value
- value of the element
java.lang.ArrayIndexOutOfBoundsException
- if the indices are wrongsetElementAndSymetricalElement(int, int, double)
,
Matrix.getElement(int, int)
public void setElementAndSymetricalElement(int i, int j, double value)
i
- row index of first element (column index of second
element), from 0 to order - 1j
- column index of first element (row index of second
element), from 0 to order - 1value
- value of the elements
java.lang.ArrayIndexOutOfBoundsException
- if the indices are wrongsetElement(int, int, double)
,
Matrix.getElement(int, int)
public void selfAdd(SymetricalMatrix s)
s
- symetrical matrix to add
java.lang.IllegalArgumentException
- if there is a dimension mismatchpublic void selfSub(SymetricalMatrix s)
s
- symetrical matrix to substract
java.lang.IllegalArgumentException
- if there is a dimension mismatchpublic void selfAddWAAt(double w, double[] a)
w
- multiplicative factor (weight)a
- base vector used to compute the symetrical contribution
java.lang.IllegalArgumentException
- if there is a dimension mismatch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |