Package org.scictrl.mp.orbitcorrect.math
Class DoubleMatrix
java.lang.Object
org.scictrl.mp.orbitcorrect.math.DoubleMatrix
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DispersionVector
,DoubleVector
,TransferMatrix
DoubleMatrix class.
- Author:
- igor@scictrl.com
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDoubleMatrix
(int dimension) Creates new square matrix with specifieddimension
.DoubleMatrix
(int rows, int columns) Creates new matrix with specified number ofrows
andcolumns
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canJoin
(DoubleMatrix matrix) Test if can be joined with this matrix.boolean
canMulitplay
(DoubleMatrix matrix) Test if can be multiplied with this matrix.clone()
int
columns()
Nuber of columns in this matrix.boolean
dimensionEquals
(DoubleMatrix matrix) Test if dimensions of these matrices match.double
get
(int r, int c) Returns value from matrix at (row,column) position.static final DoubleMatrix
identity
(int dim) identity.join
(DoubleMatrix matrix) Multipliesmatrix
from right with this matrix and stores result in this matrix.multiplay
(DoubleMatrix matrix) Multipliesmatrix
from right with this matrix and returns result as new matrixint
rows()
Nuber of rows in this matrix.toString()
-
Field Details
-
matrix
protected final double[][] matrixFull matrix. -
columns
protected final int columnsNumber of columns. -
rows
protected final int rowsNumber of rows.
-
-
Constructor Details
-
DoubleMatrix
public DoubleMatrix(int dimension) Creates new square matrix with specifieddimension
.- Parameters:
dimension
- a int
-
DoubleMatrix
public DoubleMatrix(int rows, int columns) Creates new matrix with specified number ofrows
andcolumns
.- Parameters:
rows
- a intcolumns
- a int
-
-
Method Details
-
canJoin
Test if can be joined with this matrix.- Parameters:
matrix
- DoubleMatrix- Returns:
- boolean
-
canMulitplay
Test if can be multiplied with this matrix.- Parameters:
matrix
- DoubleMatrix- Returns:
- boolean
-
clone
-
columns
public int columns()Nuber of columns in this matrix.- Returns:
- double columns
-
dimensionEquals
Test if dimensions of these matrices match.- Parameters:
matrix
- DoubleMatrix- Returns:
- boolean dimension equals
-
get
public double get(int r, int c) Returns value from matrix at (row,column) position.- Parameters:
r
- int rowc
- int column- Returns:
- double value
-
identity
identity.
- Parameters:
dim
- int- Returns:
- DoubleMatrix
-
join
Multipliesmatrix
from right with this matrix and stores result in this matrix. Return Matrix is stih matrix.- Parameters:
matrix
- DoubleMatrix- Returns:
- DoubleMatrix this matrix =
matrix
times this matrix
-
multiplay
Multipliesmatrix
from right with this matrix and returns result as new matrix- Parameters:
matrix
- DoubleMatrix- Returns:
- DoubleMatrix result=
matrix
times this matrix
-
rows
public int rows()Nuber of rows in this matrix.- Returns:
- double rows
-
toString
-