|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfhm.edu.fem.calc.objects.matrix.MatrixHull
public class MatrixHull
Class Description: HullMatrix extends the basic matrix. It offers a hull-oriented memory management to safe memory. ONLY WORKS ON SYMMETRIC MATRICES
Field Summary | |
---|---|
protected int[] |
diagPointer
|
protected int |
difference
|
protected ENVHullMatrix |
env
|
protected int |
hullDiagElementIndex
|
protected static Logger |
localLogger
|
protected java.lang.String |
name
|
protected int |
prevHullDiagElementIndex
|
protected int |
size
|
protected int |
targetHullElementIndex
|
Constructor Summary | |
---|---|
protected |
MatrixHull()
|
|
MatrixHull(MatrixHull m)
Copy Constructor |
|
MatrixHull(java.lang.String name,
double[][] values)
Matrix with the given name, filled with the given values |
|
MatrixHull(java.lang.String name,
int size)
Create a new HullMatrix with the size (x rows and x columns) (all fields are initialized with zeros) |
Method Summary | |
---|---|
Matrix |
add(Matrix m)
Add a given matrix to this matrix |
double[][] |
asArray()
Convert all data in the matrix to a quadratic double array |
Matrix |
cholesky()
Do the cholesky for this matrix |
java.lang.Object |
clone()
Clone the matrix |
int[] |
getDiagPointer()
Retrieve the diag pointer from the outside (used by the copy constructor) |
ENVHullMatrix |
getENV()
Retrieve the ENVHullMatrix object from the outside (used by the copy constructor) |
protected int |
getFirstNonZeroIndexForRow(int row)
Retrieve the first index in the given row where we have a valid value (means ! |
java.lang.String |
getName()
Retrieve the name of this matrix |
long |
getRequiredMemory()
Retrieve the amount of required memory in this matrix (in byte) |
double |
getValue(int row,
int column)
Retrieve a value from the HullMatrix |
boolean |
isMainDiagonalNotZero()
Test if the main diagonal of this matrix is not zero |
boolean |
isSymmetric()
Test if the Matrix is symmetric |
Matrix |
mult(double multiplicator)
Multiply all values in the matrix by the given value |
Matrix |
mult(Matrix m)
Multiply this Matrix with the given Matrix (have to be the same size) |
Vector |
mult(Vector m)
Multiply this Matrix with the given vector (have to be the same size) |
void |
setLineAndColumn(int index,
double value)
Set a whole column to the given value in the matrix at the given column number |
void |
setName(java.lang.String name)
Set a new name for this matrix |
void |
setValue(int row,
int column,
double value)
Set a value in the HullMatrix |
int |
size()
Get the number of rows and columns in the matrix (square matrix only!) |
void |
storeLine(int lineNumber,
double[] line)
Store a whole line in the matrix at the given line number |
java.lang.String |
toString()
|
java.lang.String |
toString(int number)
Variable toString method |
Matrix |
transponate()
Transponate the Matrix |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] diagPointer
protected int difference
protected ENVHullMatrix env
protected int hullDiagElementIndex
protected static Logger localLogger
protected java.lang.String name
protected int prevHullDiagElementIndex
protected int size
protected int targetHullElementIndex
Constructor Detail |
---|
protected MatrixHull()
public MatrixHull(MatrixHull m)
m,
- the hull matrix to copypublic MatrixHull(java.lang.String name, double[][] values)
name,
- namevalues,
- quadraticpublic MatrixHull(java.lang.String name, int size)
name,
- the name of the matrixsize,
- the number of rows and columns (square matrix only!)Method Detail |
---|
public Matrix add(Matrix m)
add
in interface Matrix
m,
- the matrix to add
public double[][] asArray()
asArray
in interface Matrix
public Matrix cholesky() throws CholeskyFailedException
cholesky
in interface Matrix
CholeskyFailedException
public java.lang.Object clone()
clone
in interface Matrix
clone
in class java.lang.Object
public int[] getDiagPointer()
public ENVHullMatrix getENV()
protected int getFirstNonZeroIndexForRow(int row) throws java.lang.IndexOutOfBoundsException
row,
- the row index (starting at 1)
java.lang.IndexOutOfBoundsException
public java.lang.String getName()
getName
in interface Matrix
public long getRequiredMemory()
getRequiredMemory
in interface Matrix
public double getValue(int row, int column) throws java.lang.IndexOutOfBoundsException
getValue
in interface Matrix
row,
- the row index (starting at 1)column,
- the column index (starting at 1)
java.lang.IndexOutOfBoundsException
public boolean isMainDiagonalNotZero()
isMainDiagonalNotZero
in interface Matrix
public boolean isSymmetric()
isSymmetric
in interface Matrix
public Matrix mult(double multiplicator)
mult
in interface Matrix
multiplicator,
- the value to multiply the matrix with
public Matrix mult(Matrix m)
mult
in interface Matrix
m,
- the matrix
public Vector mult(Vector m)
mult
in interface Matrix
m,
- the vector
public void setLineAndColumn(int index, double value)
setLineAndColumn
in interface Matrix
columnNumber,
- where to store the columnvalue,
- the sole value we want to fill the column withpublic void setName(java.lang.String name)
setName
in interface Matrix
name
- public void setValue(int row, int column, double value) throws java.lang.IndexOutOfBoundsException
setValue
in interface Matrix
row,
- the row index (starting at 1)column,
- the column index (starting at 1)value,
- the value to set at the specified position in the matrix
java.lang.IndexOutOfBoundsException
public int size()
size
in interface Matrix
public void storeLine(int lineNumber, double[] line)
storeLine
in interface Matrix
lineNumber,
- where to store the lineline,
- the array holding the line's datapublic java.lang.String toString()
toString
in interface Matrix
toString
in class java.lang.Object
public java.lang.String toString(int number)
toString
in interface Matrix
number,
- the number of rows and columns to display (starting at the upper left)
public Matrix transponate()
transponate
in interface Matrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |