#include <vecmath.h>
Definition at line 413 of file vecmath.h.
◆ Matrix3() [1/3]
EMAN::Matrix3::Matrix3 |
( |
| ) |
|
|
inline |
◆ Matrix3() [2/3]
◆ Matrix3() [3/3]
EMAN::Matrix3::Matrix3 |
( |
const Matrix3 & |
m | ) |
|
|
inline |
◆ approxEqual()
bool EMAN::Matrix3::approxEqual |
( |
const Matrix3 & |
m, |
|
|
double |
eps = 1e-12 |
|
) |
| const |
|
inline |
Definition at line 549 of file vecmath.h.
550 for (
int i = 0; i < 9; i++ )
bool isZero(double in_d, double in_dEps=1e-16)
References EMAN::isZero(), and mat.
◆ column()
Vector3 EMAN::Matrix3::column |
( |
int |
c | ) |
const |
|
inline |
◆ det2x2()
static double EMAN::Matrix3::det2x2 |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double |
d |
|
) |
| |
|
inlinestatic |
◆ determinant()
double EMAN::Matrix3::determinant |
( |
| ) |
const |
|
inline |
Definition at line 515 of file vecmath.h.
516 return ((*
this)(0,0) * (*
this)(1,1) * (*
this)(2,2) +
517 (*
this)(0,1) * (*
this)(1,2) * (*
this)(2,0) +
518 (*
this)(0,2) * (*
this)(1,0) * (*
this)(2,1) -
519 (*
this)(0,2) * (*
this)(1,1) * (*
this)(2,0) -
520 (*
this)(0,0) * (*
this)(1,2) * (*
this)(2,1) -
521 (*
this)(0,1) * (*
this)(1,0) * (*
this)(2,2));
Referenced by inverse().
◆ identity()
static Matrix3 EMAN::Matrix3::identity |
( |
| ) |
|
|
inlinestatic |
◆ index()
int EMAN::Matrix3::index |
( |
int |
row, |
|
|
int |
col |
|
) |
| const |
|
inline |
◆ inverse()
Matrix3 EMAN::Matrix3::inverse |
( |
| ) |
const |
|
inline |
Definition at line 524 of file vecmath.h.
525 Matrix3 adjoint =
Matrix3( Vector3(
det2x2((*
this)(1,1), (*
this)(1,2), (*
this)(2,1), (*
this)(2,2)),
526 -
det2x2((*
this)(1,0), (*
this)(1,2), (*
this)(2,0), (*
this)(2,2)),
527 det2x2((*
this)(1,0), (*
this)(1,1), (*
this)(2,0), (*
this)(2,1)) ),
528 Vector3( -
det2x2((*
this)(0,1), (*
this)(0,2), (*
this)(2,1), (*
this)(2,2)),
529 det2x2((*
this)(0,0), (*
this)(0,2), (*
this)(2,0), (*
this)(2,2)),
530 -
det2x2((*
this)(0,0), (*
this)(0,1), (*
this)(2,0), (*
this)(2,1)) ),
531 Vector3(
det2x2((*
this)(0,1), (*
this)(0,2), (*
this)(1,1), (*
this)(1,2)),
532 -
det2x2((*
this)(0,0), (*
this)(0,2), (*
this)(1,0), (*
this)(1,2)),
533 det2x2((*
this)(0,0), (*
this)(0,1), (*
this)(1,0), (*
this)(1,1)) ) );
537 adjoint *= 1.0 / dDet;
static double det2x2(double a, double b, double c, double d)
double determinant() const
References Assert, det2x2(), determinant(), EMAN::isZero(), and Matrix3().
◆ operator()() [1/2]
double & EMAN::Matrix3::operator() |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
inline |
◆ operator()() [2/2]
const double & EMAN::Matrix3::operator() |
( |
int |
row, |
|
|
int |
col |
|
) |
| const |
|
inline |
◆ operator*() [1/3]
Definition at line 487 of file vecmath.h.
489 for (
int i = 0; i < 3; i++ ) {
490 for (
int j = 0; j < 3; j++ ) {
492 for (
int k = 0; k < 3; k++ )
493 matRet(i,j) += (*this)(i,k) * m(k,j);
◆ operator*() [2/3]
Definition at line 481 of file vecmath.h.
482 return Point3((*
this)(0,0) * p[0] + (*
this)(0,1) * p[1] + (*
this)(0,2) * p[2],
483 (*
this)(1,0) * p[0] + (*
this)(1,1) * p[1] + (*
this)(1,2) * p[2],
484 (*
this)(2,0) * p[0] + (*
this)(2,1) * p[1] + (*
this)(2,2) * p[2]);
◆ operator*() [3/3]
Definition at line 474 of file vecmath.h.
475 return Vector3((*
this)(0,0) * v[0] + (*
this)(0,1) * v[1] + (*
this)(0,2) * v[2],
476 (*
this)(1,0) * v[0] + (*
this)(1,1) * v[1] + (*
this)(1,2) * v[2],
477 (*
this)(2,0) * v[0] + (*
this)(2,1) * v[1] + (*
this)(2,2) * v[2]);
◆ operator*=()
Matrix3 & EMAN::Matrix3::operator*= |
( |
double |
s | ) |
|
|
inline |
Definition at line 467 of file vecmath.h.
468 for (
int i = 0; i < 9; i++ )
References mat.
◆ operator+()
Definition at line 460 of file vecmath.h.
462 for (
int i = 0; i < 9; i++ )
463 matRet.mat[i] =
mat[i] + m.mat[i];
References mat.
◆ operator=()
Definition at line 433 of file vecmath.h.
434 memcpy( &
mat[0], &m.mat[0],
sizeof(
double) * 16 );
References mat.
◆ operator==()
bool EMAN::Matrix3::operator== |
( |
const Matrix3 & |
m | ) |
const |
|
inline |
Definition at line 542 of file vecmath.h.
543 for (
int i = 0; i < 9; i++ )
544 if (
mat[i] != m.mat[i] )
References mat.
◆ print()
void EMAN::Matrix3::print |
( |
| ) |
const |
|
inline |
Definition at line 556 of file vecmath.h.
557 std::cout <<
"( " << (*this)(0,0) <<
", " << (*
this)(0,1) <<
", " << (*
this)(0,2) <<
"\n";
558 std::cout <<
" " << (*this)(1,0) <<
", " << (*
this)(1,1) <<
", " << (*
this)(1,2) <<
"\n";
559 std::cout <<
" " << (*this)(2,0) <<
", " << (*
this)(2,1) <<
", " << (*
this)(2,2) <<
")\n";
◆ rotationXYZtoUVW()
Definition at line 505 of file vecmath.h.
506 return Matrix3(Vector3(u[0], v[0], w[0]),
507 Vector3(u[1], v[1], w[1]),
508 Vector3(u[2], v[2], w[2]));
References Matrix3().
◆ row()
Vector3 EMAN::Matrix3::row |
( |
int |
r | ) |
const |
|
inline |
◆ transpose()
Matrix3 EMAN::Matrix3::transpose |
( |
| ) |
const |
|
inline |
Definition at line 452 of file vecmath.h.
454 for (
int i = 0; i < 3; i++ )
455 for (
int j = 0; j < 3; j++ )
456 matRet(i,j) = (*this)(j,i);
◆ mat
double EMAN::Matrix3::mat[9] |
|
private |
The documentation for this class was generated from the following file: