meshi.symmetryComplex.transformations
Class Matrix1D
java.lang.Object
meshi.symmetryComplex.transformations.Matrix1D
- All Implemented Interfaces:
- Matrix
- Direct Known Subclasses:
- Transformation
public class Matrix1D
- extends java.lang.Object
- implements Matrix
An implementation of the Matrix interface
as a one-dimesional array.
|
Method Summary |
Matrix |
double2DToMatrix(double[][] arrayMatrix)
|
boolean |
equals(Matrix other)
|
boolean |
equals(java.lang.Object obj)
|
int |
getColumns()
|
double |
getMember(int row,
int column)
|
int |
getRows()
|
Matrix |
getSubmatrix(int fromRow,
int toRow,
int fromColumn,
int toColumn)
|
static Matrix |
getUnitMatrix(int size)
|
protected void |
initFields(int rows,
int columns)
|
boolean |
isLegalIndices(int row,
int column)
|
boolean |
isLegalMatrixObject(java.lang.Object matrixObject)
|
boolean |
isLegalSubmatrixBoundaries(int fromRow,
int toRow,
int fromColumn,
int toColumn)
|
boolean |
isOrthogonal()
|
boolean |
isZero(double verySmall)
|
double[][] |
matrixToDouble2D()
|
Matrix |
multiply(Matrix other)
|
void |
setMember(int row,
int column,
double value)
|
java.lang.String |
toString()
|
Matrix |
transpose()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EPSILON
private static final double EPSILON
- See Also:
- Constant Field Values
rows
protected int rows
columns
protected int columns
matrix
protected double[] matrix
Matrix1D
public Matrix1D()
Matrix1D
public Matrix1D(int rows,
int columns)
Matrix1D
public Matrix1D(Matrix other)
Matrix1D
public Matrix1D(double[][] matrix)
initFields
protected void initFields(int rows,
int columns)
getColumns
public int getColumns()
- Specified by:
getColumns in interface Matrix
getRows
public int getRows()
- Specified by:
getRows in interface Matrix
getMember
public double getMember(int row,
int column)
- Specified by:
getMember in interface Matrix
setMember
public void setMember(int row,
int column,
double value)
- Specified by:
setMember in interface Matrix
getSubmatrix
public Matrix getSubmatrix(int fromRow,
int toRow,
int fromColumn,
int toColumn)
- Specified by:
getSubmatrix in interface Matrix
isLegalSubmatrixBoundaries
public boolean isLegalSubmatrixBoundaries(int fromRow,
int toRow,
int fromColumn,
int toColumn)
- Specified by:
isLegalSubmatrixBoundaries in interface Matrix
isOrthogonal
public boolean isOrthogonal()
- Specified by:
isOrthogonal in interface Matrix
getUnitMatrix
public static Matrix getUnitMatrix(int size)
isZero
public boolean isZero(double verySmall)
- Specified by:
isZero in interface Matrix
double2DToMatrix
public Matrix double2DToMatrix(double[][] arrayMatrix)
- Specified by:
double2DToMatrix in interface Matrix
matrixToDouble2D
public double[][] matrixToDouble2D()
- Specified by:
matrixToDouble2D in interface Matrix
multiply
public Matrix multiply(Matrix other)
- Specified by:
multiply in interface Matrix
transpose
public Matrix transpose()
- Specified by:
transpose in interface Matrix
isLegalIndices
public boolean isLegalIndices(int row,
int column)
- Specified by:
isLegalIndices in interface Matrix
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in interface Matrix- Overrides:
equals in class java.lang.Object
equals
public boolean equals(Matrix other)
toString
public java.lang.String toString()
- Specified by:
toString in interface Matrix- Overrides:
toString in class java.lang.Object
isLegalMatrixObject
public boolean isLegalMatrixObject(java.lang.Object matrixObject)
- Specified by:
isLegalMatrixObject in interface Matrix