|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ode4j.math.DMatrix3
public final class DMatrix3
3x3 matrix class. Internally this uses a 4x3 matrix for compatibility.
Nested Class Summary | |
---|---|
class |
DMatrix3.DVector3ColView
|
class |
DMatrix3.DVector3RowTView
|
Field Summary | |
---|---|
static int |
LEN
|
static int |
MAX_I
|
static int |
MAX_J
|
static DMatrix3C |
ZERO
|
Constructor Summary | |
---|---|
DMatrix3()
|
|
DMatrix3(DMatrix3C matrix3)
|
|
DMatrix3(double d,
double e,
double f,
double g,
double h,
double i,
double j,
double k,
double l)
Create new Matrix of the form: |
|
DMatrix3(double d,
double e,
double f,
double g,
double h,
double i,
double j,
double k,
double l,
double m,
double n,
double o)
Deprecated. |
Method Summary | |
---|---|
DMatrix3 |
add(DMatrix3C m)
|
void |
add(int i,
int j,
double d)
|
DMatrix3 |
clone()
Returns a clone of this Matrix. |
DVector3 |
columnAsNewVector(int c)
Return a new dVector containing the specified column. |
int |
dimI()
|
int |
dimJ()
|
void |
dMultiply0(DMatrix3C B,
DMatrix3C C)
Matrix multiplication. |
double |
dotCol(int col,
DVector3C v3)
Calculates the dot product of the the specified column of this matrix with the given vector. |
double |
dotColCol(int col,
DMatrix3C m2,
int col2)
Calculates the dot product of the the specified column col of this matrix with the specified column col2 of the second matrix m2. |
double |
dotRow(int row,
double[] c,
int cOfs)
Calculates the dot product of the the specified row of this matrix with the given array at the given offset. |
double |
dotRow(int row,
DVector3C v3)
Calculates the dot product of the the specified row of this matrix with the given vector. |
double |
dotRowCol(int row,
DMatrix3C m2,
int col2)
Calculates the dot product of the the specified row row of this matrix with the specified column col2 of the second matrix m2. |
double |
dotRowRow(int row,
DMatrix3C m2,
int row2)
Calculates the dot product of the the specified row row of this matrix with the specified row row2 of the second matrix m2. |
void |
eqIdentity()
|
void |
eqMul(DMatrix3C B,
DMatrix3C C)
|
DMatrix3 |
eqTranspose()
Transpose this matrix. |
boolean |
equals(java.lang.Object o)
Compares two objects for equality. |
void |
eqZero()
|
double |
get(int i)
|
double |
get(int i,
int j)
|
double |
get00()
|
double |
get01()
|
double |
get02()
|
double |
get10()
|
double |
get11()
|
double |
get12()
|
double |
get20()
|
double |
get21()
|
double |
get22()
|
boolean |
isEqual(DMatrix3C m)
Compares two matrices for equality. |
DMatrix3 |
reTranspose()
Create a new transposed version of this matrix. |
void |
scale(double scale)
|
DMatrix3 |
set(DMatrix3C m)
|
void |
set(double i,
double j,
double k,
double l,
double m,
double n,
double o,
double p,
double q)
|
void |
set(int i,
int j,
double a)
|
void |
set00(double d)
|
void |
set01(double d)
|
void |
set02(double d)
|
void |
set10(double d)
|
void |
set11(double d)
|
void |
set12(double d)
|
void |
set12(double[] da,
int da_ofs)
Initialises this matrix from a 3*4 double [] with 12 fields, ignoring the 4th, 8th and 12th field. |
void |
set20(double d)
|
void |
set21(double d)
|
void |
set22(double d)
|
void |
setCol(int i,
DVector3 v3)
|
DMatrix3 |
setIdentity()
|
void |
setOfs(int ofs,
DVector3 v3)
|
void |
setZero()
|
void |
sub(int i,
int j,
double d)
|
float[] |
toFloatArray()
|
float[] |
toFloatArray12()
|
java.lang.String |
toString()
|
DMatrix3.DVector3ColView |
viewCol(int column)
View a particular column as dVector3. |
DMatrix3.DVector3RowTView |
viewRowT(int row)
|
static DMatrix3 |
wrap(double[] a)
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_I
public static final int MAX_J
public static final int LEN
public static final DMatrix3C ZERO
Constructor Detail |
---|
public DMatrix3(double d, double e, double f, double g, double h, double i, double j, double k, double l, double m, double n, double o)
public DMatrix3(double d, double e, double f, double g, double h, double i, double j, double k, double l)
d, e, f g, h, i j, k, l
d
- 0,0e
- 0,1f
- 0,2g
- 1,0h
- 1,1i
- 1,2j
- 2,0k
- 2,1l
- 2,2public DMatrix3(DMatrix3C matrix3)
public DMatrix3()
Method Detail |
---|
public static DMatrix3 wrap(double[] a)
public DMatrix3 set(DMatrix3C m)
public DMatrix3 clone()
clone
in interface DMatrix3C
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setOfs(int ofs, DVector3 v3)
public void setCol(int i, DVector3 v3)
public void set(double i, double j, double k, double l, double m, double n, double o, double p, double q)
public void set12(double[] da, int da_ofs)
public double get(int i)
public DVector3 columnAsNewVector(int c)
columnAsNewVector
in interface DMatrix3C
c
- Column (0, 1, 2)
public DMatrix3 add(DMatrix3C m)
public void scale(double scale)
public void dMultiply0(DMatrix3C B, DMatrix3C C)
public void eqMul(DMatrix3C B, DMatrix3C C)
public DMatrix3.DVector3ColView viewCol(int column)
viewCol
in interface DMatrix3C
column
- The column to return [0, 1, 2].public DMatrix3.DVector3RowTView viewRowT(int row)
public final double get00()
get00
in interface DMatrix3C
public final double get01()
get01
in interface DMatrix3C
public final double get02()
get02
in interface DMatrix3C
public final double get10()
get10
in interface DMatrix3C
public final double get11()
get11
in interface DMatrix3C
public final double get12()
get12
in interface DMatrix3C
public final double get20()
get20
in interface DMatrix3C
public final double get21()
get21
in interface DMatrix3C
public final double get22()
get22
in interface DMatrix3C
public final void set00(double d)
public final void set01(double d)
public final void set02(double d)
public final void set10(double d)
public final void set11(double d)
public final void set12(double d)
public final void set20(double d)
public final void set21(double d)
public final void set22(double d)
public final int dimI()
public final int dimJ()
public final boolean isEqual(DMatrix3C m)
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final void eqIdentity()
public final DMatrix3 setIdentity()
public final void eqZero()
public final void setZero()
public final float[] toFloatArray12()
toFloatArray12
in interface DMatrix3C
public final float[] toFloatArray()
toFloatArray
in interface DMatrix3C
public final DMatrix3 eqTranspose()
public final DMatrix3 reTranspose()
public final double dotCol(int col, DVector3C v3)
dotCol
in interface DMatrix3C
col
- v3
- public final double dotRow(int row, DVector3C v3)
dotRow
in interface DMatrix3C
row
- v3
- public final double dotColCol(int col, DMatrix3C m2, int col2)
dotColCol
in interface DMatrix3C
col
- m2
- col2
- public double dotRowCol(int row, DMatrix3C m2, int col2)
dotRowCol
in interface DMatrix3C
row
- m2
- col2
- public final double dotRow(int row, double[] c, int cOfs)
dotRow
in interface DMatrix3C
row
- The row.c
- The array.cOfs
- The offset in c.public double dotRowRow(int row, DMatrix3C m2, int row2)
dotRowRow
in interface DMatrix3C
row
- m2
- row2
- public double get(int i, int j)
get
in interface DMatrix3C
i
- rowj
- column
public void set(int i, int j, double a)
i
- rowj
- columna
- value at (i,j)public void add(int i, int j, double d)
public void sub(int i, int j, double d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |