3*3 Matric class, row-oriented, 0-based [i][j] indexing. More...
#include <Matrix3D.hpp>
Public Member Functions | |
Matrix3D () | |
Default constructor sets all entries to 0. More... | |
Matrix3D (const Matrix3D &A) | |
Matrix3D (const double &value) | |
sets all entries of the matrix to value. More... | |
Matrix3D (const double *v) | |
sets matrix entries to values in array. More... | |
Matrix3D (const char *s) | |
for test purposes, matrices can be instantiated as More... | |
~Matrix3D () | |
Matrix3D & | operator= (const Matrix3D &A) |
Matrix3D & | operator= (const double &scalar) |
Matrix3D & | operator= (const char *s) |
for test purposes, matrices can be assigned as follows More... | |
void | zero () |
Sets all entries to zero (more efficient than assignement). More... | |
void | set_column (int j, const Vector3D &c) |
Sets column j (0, 1 or 2) to Vector3D c. More... | |
double | column_length (int i) const |
returns the column length – i is 0-based. More... | |
const Matrix3D | operator* (const double &s) const |
multiplies each entry by the scalar s More... | |
void | operator+= (const Matrix3D &rhs) |
void | operator-= (const Matrix3D &rhs) |
void | operator*= (const double &s) |
multiplies each entry by the scalar s More... | |
Matrix3D | plus_transpose (const Matrix3D &B) const |
More... | |
void | plus_transpose_equal (const Matrix3D &B) |
More... | |
Matrix3D & | outer_product (const Vector3D &v1, const Vector3D &v2) |
Computes . More... | |
void | fill_lower_triangle () |
size_t | num_rows () const |
size_t | num_cols () const |
double * | operator[] (unsigned i) |
returns a pointer to a row. More... | |
const double * | operator[] (unsigned i) const |
returns a pointer to a row. More... | |
Matrix3D () | |
Default constructor sets all entries to 0. More... | |
Matrix3D (const Matrix3D &A) | |
Matrix3D (const double &value) | |
sets all entries of the matrix to value. More... | |
Matrix3D (const double *v) | |
sets matrix entries to values in array. More... | |
Matrix3D (const char *s) | |
for test purposes, matrices can be instantiated as More... | |
~Matrix3D () | |
Matrix3D & | operator= (const Matrix3D &A) |
Matrix3D & | operator= (const double &scalar) |
Matrix3D & | operator= (const char *s) |
for test purposes, matrices can be assigned as follows More... | |
void | zero () |
Sets all entries to zero (more efficient than assignement). More... | |
void | set_column (int j, const Vector3D &c) |
Sets column j (0, 1 or 2) to Vector3D c. More... | |
double | column_length (int i) const |
returns the column length – i is 0-based. More... | |
const Matrix3D | operator* (const double &s) const |
void | operator+= (const Matrix3D &rhs) |
void | operator-= (const Matrix3D &rhs) |
void | operator*= (const double &s) |
Matrix3D | plus_transpose (const Matrix3D &B) const |
void | plus_transpose_equal (const Matrix3D &B) |
Matrix3D & | outer_product (const Vector3D &v1, const Vector3D &v2) |
void | fill_lower_triangle () |
size_t | num_rows () const |
size_t | num_cols () const |
double * | operator[] (unsigned i) |
returns a pointer to a row. More... | |
const double * | operator[] (unsigned i) const |
returns a pointer to a row. More... | |
Protected Member Functions | |
void | copy (const double *v) |
void | set (const double &val) |
void | set_values (const char *s) |
void | copy (const double *v) |
void | set (const double &val) |
void | set_values (const char *s) |
Protected Attributes | |
double | v_ [9] |
Friends | |
bool | operator== (const Matrix3D &lhs, const Matrix3D &rhs) |
bool | operator!= (const Matrix3D &lhs, const Matrix3D &rhs) |
double | Frobenius_2 (const Matrix3D &A) |
Return the square of the Frobenius norm of A, i.e. sum (diag (A' * A)) More... | |
Matrix3D | transpose (const Matrix3D &A) |
const Matrix3D | operator+ (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | operator- (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | operator* (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | mult_element (const Matrix3D &A, const Matrix3D &B) |
Multiplies entry by entry. This is NOT a matrix multiplication. More... | |
int | matmult (Matrix3D &C, const Matrix3D &A, const Matrix3D &B) |
More... | |
const Vector3D | operator* (const Matrix3D &A, const Vector3D &x) |
Computes . More... | |
const Vector3D | operator* (const Vector3D &x, const Matrix3D &A) |
Computes . More... | |
const Matrix3D | operator* (const double &s, const Matrix3D &A) |
friend function to allow for commutatative property of scalar mulitplication. More... | |
void | eqAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqTransAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqaA (Matrix3D &B, const double a, const Matrix3D &A) |
More... | |
double | det (const Matrix3D &A) |
determinant of matrix A, det(A). More... | |
void | inv (Matrix3D &B, const Matrix3D &A) |
More... | |
void | timesInvA (Matrix3D &B, const Matrix3D &A) |
More... | |
void | QR (Matrix3D &Q, Matrix3D &R, const Matrix3D &A) |
More... | |
bool | operator== (const Matrix3D &lhs, const Matrix3D &rhs) |
bool | operator!= (const Matrix3D &lhs, const Matrix3D &rhs) |
double | Frobenius_2 (const Matrix3D &A) |
Return the square of the Frobenius norm of A, i.e. sum (diag (A' * A)) More... | |
Matrix3D | transpose (const Matrix3D &A) |
const Matrix3D | operator+ (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | operator- (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | operator* (const Matrix3D &A, const Matrix3D &B) |
const Matrix3D | mult_element (const Matrix3D &A, const Matrix3D &B) |
Multiplies entry by entry. This is NOT a matrix multiplication. More... | |
int | matmult (Matrix3D &C, const Matrix3D &A, const Matrix3D &B) |
More... | |
const Vector3D | operator* (const Matrix3D &A, const Vector3D &x) |
Computes . More... | |
const Vector3D | operator* (const Vector3D &x, const Matrix3D &A) |
Computes . More... | |
const Matrix3D | operator* (const double &s, const Matrix3D &A) |
friend function to allow for commutatative property of scalar mulitplication. More... | |
void | eqAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqTransAx (Vector3D &v, const Matrix3D &A, const Vector3D &x) |
More... | |
void | plusEqaA (Matrix3D &B, const double a, const Matrix3D &A) |
More... | |
double | det (const Matrix3D &A) |
determinant of matrix A, det(A). More... | |
void | inv (Matrix3D &B, const Matrix3D &A) |
More... | |
void | timesInvA (Matrix3D &B, const Matrix3D &A) |
More... | |
void | QR (Matrix3D &Q, Matrix3D &R, const Matrix3D &A) |
More... | |
3*3 Matric class, row-oriented, 0-based [i][j] indexing.
Since the size of the object is fixed at compile time, the Matrix3D object is as fast as a double[9] array.
Definition at line 78 of file includeLinks/Matrix3D.hpp.
|
inline |
Default constructor sets all entries to 0.
Definition at line 110 of file includeLinks/Matrix3D.hpp.
References Matrix3D::zero().
Definition at line 115 of file includeLinks/Matrix3D.hpp.
References Matrix3D::copy(), and Matrix3D::v_.
|
inline |
sets all entries of the matrix to value.
Definition at line 121 of file includeLinks/Matrix3D.hpp.
References Matrix3D::set().
|
inline |
sets matrix entries to values in array.
v | is an array of 9 doubles. |
Definition at line 128 of file includeLinks/Matrix3D.hpp.
References Matrix3D::copy().
|
inline |
for test purposes, matrices can be instantiated as
Definition at line 135 of file includeLinks/Matrix3D.hpp.
References Matrix3D::set_values().
|
inline |
Definition at line 141 of file includeLinks/Matrix3D.hpp.
|
inline |
Default constructor sets all entries to 0.
Definition at line 110 of file src/Misc/Matrix3D.hpp.
References Matrix3D::zero().
Definition at line 115 of file src/Misc/Matrix3D.hpp.
References Matrix3D::copy().
|
inline |
sets all entries of the matrix to value.
Definition at line 121 of file src/Misc/Matrix3D.hpp.
References Matrix3D::set().
|
inline |
sets matrix entries to values in array.
v | is an array of 9 doubles. |
Definition at line 128 of file src/Misc/Matrix3D.hpp.
References Matrix3D::copy().
|
inline |
for test purposes, matrices can be instantiated as
Definition at line 135 of file src/Misc/Matrix3D.hpp.
References Matrix3D::set_values().
|
inline |
Definition at line 141 of file src/Misc/Matrix3D.hpp.
|
inline |
returns the column length – i is 0-based.
Definition at line 183 of file includeLinks/Matrix3D.hpp.
References sqrt(), and Matrix3D::v_.
Referenced by TargetCalculator::compute_Delta_3D(), TargetCalculator::compute_Q_3D(), and TargetCalculator::compute_V_3D().
|
inline |
returns the column length – i is 0-based.
Definition at line 183 of file src/Misc/Matrix3D.hpp.
References sqrt(), and Matrix3D::v_.
|
inlineprotected |
Definition at line 84 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by Matrix3D::Matrix3D(), and Matrix3D::operator=().
|
inlineprotected |
Definition at line 84 of file src/Misc/Matrix3D.hpp.
References Matrix3D::v_.
|
inline |
Definition at line 428 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by Mesquite::h_fcn_2e(), Mesquite::h_fcn_2i(), Mesquite::h_fcn_3e(), Mesquite::h_fcn_3e_v3(), Mesquite::h_fcn_3i(), h_fcn_ridft2(), h_fcn_ridft3(), Mesquite::h_gdft_2(), Mesquite::h_gdft_2_v0(), Mesquite::h_gdft_2_v1(), Mesquite::h_gdft_2_v2(), Mesquite::h_gdft_3(), Mesquite::h_gdft_3_v0(), Mesquite::h_gdft_3_v1(), and Mesquite::h_gdft_3_v2().
void fill_lower_triangle | ( | ) |
|
inline |
Definition at line 231 of file includeLinks/Matrix3D.hpp.
|
inline |
Definition at line 231 of file src/Misc/Matrix3D.hpp.
|
inline |
Definition at line 230 of file src/Misc/Matrix3D.hpp.
|
inline |
Definition at line 230 of file includeLinks/Matrix3D.hpp.
|
inline |
multiplies each entry by the scalar s
Definition at line 453 of file includeLinks/Matrix3D.hpp.
References s, and Matrix3D::v_.
const Matrix3D operator* | ( | const double & | s | ) | const |
void operator*= | ( | const double & | s | ) |
|
inline |
multiplies each entry by the scalar s
Definition at line 362 of file includeLinks/Matrix3D.hpp.
References s, and Matrix3D::v_.
void operator+= | ( | const Matrix3D & | rhs | ) |
|
inline |
void operator-= | ( | const Matrix3D & | rhs | ) |
|
inline |
Definition at line 144 of file includeLinks/Matrix3D.hpp.
References Matrix3D::copy(), and Matrix3D::v_.
Referenced by TargetMatrix::operator=().
Definition at line 144 of file src/Misc/Matrix3D.hpp.
References Matrix3D::copy(), and Matrix3D::v_.
|
inline |
Definition at line 152 of file includeLinks/Matrix3D.hpp.
References Matrix3D::set().
|
inline |
Definition at line 152 of file src/Misc/Matrix3D.hpp.
References Matrix3D::set().
|
inline |
for test purposes, matrices can be assigned as follows
Definition at line 160 of file src/Misc/Matrix3D.hpp.
References Matrix3D::set_values().
|
inline |
for test purposes, matrices can be assigned as follows
Definition at line 160 of file includeLinks/Matrix3D.hpp.
References Matrix3D::set_values().
|
inline |
returns a pointer to a row.
Definition at line 234 of file includeLinks/Matrix3D.hpp.
References i, and Matrix3D::v_.
|
inline |
returns a pointer to a row.
Definition at line 234 of file src/Misc/Matrix3D.hpp.
References i, and Matrix3D::v_.
|
inline |
returns a pointer to a row.
Definition at line 240 of file includeLinks/Matrix3D.hpp.
References i, and Matrix3D::v_.
|
inline |
returns a pointer to a row.
Definition at line 240 of file src/Misc/Matrix3D.hpp.
References i, and Matrix3D::v_.
Computes .
Definition at line 406 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by IdealWeightInverseMeanRatio::compute_element_analytical_hessian().
Definition at line 370 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
|
inline |
Definition at line 390 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by MsqHessian::accumulate_entries().
void plus_transpose_equal | ( | const Matrix3D & | B | ) |
|
inlineprotected |
Definition at line 87 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by Matrix3D::Matrix3D(), and Matrix3D::operator=().
|
inlineprotected |
Definition at line 87 of file src/Misc/Matrix3D.hpp.
References Matrix3D::v_.
|
inline |
Sets column j (0, 1 or 2) to Vector3D c.
Definition at line 175 of file includeLinks/Matrix3D.hpp.
References j, and Matrix3D::v_.
Referenced by MsqMeshEntity::compute_corner_matrices(), and TargetCalculator::compute_V_3D().
|
inline |
Sets column j (0, 1 or 2) to Vector3D c.
Definition at line 175 of file src/Misc/Matrix3D.hpp.
References j, and Matrix3D::v_.
|
inlineprotected |
Definition at line 94 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by Matrix3D::Matrix3D(), and Matrix3D::operator=().
|
inlineprotected |
|
inline |
Sets all entries to zero (more efficient than assignement).
Definition at line 167 of file includeLinks/Matrix3D.hpp.
References Matrix3D::v_.
Referenced by update_py::burn_get_burning_rate1d(), burn_initialize(), cal_shdx(), setup_py::check_input_range(), RI_DFT::compute_element_analytical_hessian(), IdealWeightInverseMeanRatio::compute_element_analytical_hessian(), IdealWeightMeanRatio::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), get_enhanced_map(), get_jacobien(), get_mixed_map(), implicit_v3d8_me_k(), m_rocburn_2d::initialize(), invert3x3(), Matrix3D::Matrix3D(), rflu_modpetscnewtonkrylov::rflu_petsc_createvectors(), shcalc(), shcalc_3d10(), m_rocburn_2d::update(), v3d10_ale(), v3d10_r_bar(), and MsqHessian::zero_out().
|
inline |
Sets all entries to zero (more efficient than assignement).
Definition at line 167 of file src/Misc/Matrix3D.hpp.
References Matrix3D::v_.
|
friend |
|
friend |
Definition at line 522 of file includeLinks/Matrix3D.hpp.
Definition at line 522 of file includeLinks/Matrix3D.hpp.
|
friend |
Return the square of the Frobenius norm of A, i.e. sum (diag (A' * A))
Definition at line 326 of file includeLinks/Matrix3D.hpp.
|
friend |
Return the square of the Frobenius norm of A, i.e. sum (diag (A' * A))
Definition at line 326 of file includeLinks/Matrix3D.hpp.
Definition at line 555 of file includeLinks/Matrix3D.hpp.
Definition at line 555 of file includeLinks/Matrix3D.hpp.
Multiplies entry by entry. This is NOT a matrix multiplication.
Definition at line 312 of file includeLinks/Matrix3D.hpp.
Multiplies entry by entry. This is NOT a matrix multiplication.
Definition at line 312 of file includeLinks/Matrix3D.hpp.
Definition at line 278 of file includeLinks/Matrix3D.hpp.
Definition at line 278 of file includeLinks/Matrix3D.hpp.
Definition at line 436 of file includeLinks/Matrix3D.hpp.
Definition at line 436 of file includeLinks/Matrix3D.hpp.
Computes .
This function implicitly considers the transpose of vector x times the matrix A and it is implicit that the returned vector must be transposed.
Definition at line 510 of file includeLinks/Matrix3D.hpp.
Computes .
This function implicitly considers the transpose of vector x times the matrix A and it is implicit that the returned vector must be transposed.
Definition at line 510 of file includeLinks/Matrix3D.hpp.
friend function to allow for commutatative property of scalar mulitplication.
Definition at line 463 of file includeLinks/Matrix3D.hpp.
friend function to allow for commutatative property of scalar mulitplication.
Definition at line 463 of file includeLinks/Matrix3D.hpp.
Definition at line 284 of file includeLinks/Matrix3D.hpp.
Definition at line 284 of file includeLinks/Matrix3D.hpp.
Definition at line 298 of file includeLinks/Matrix3D.hpp.
Definition at line 298 of file includeLinks/Matrix3D.hpp.
Definition at line 274 of file includeLinks/Matrix3D.hpp.
Definition at line 274 of file includeLinks/Matrix3D.hpp.
Definition at line 543 of file includeLinks/Matrix3D.hpp.
Definition at line 543 of file includeLinks/Matrix3D.hpp.
Definition at line 529 of file includeLinks/Matrix3D.hpp.
Definition at line 529 of file includeLinks/Matrix3D.hpp.
Definition at line 536 of file includeLinks/Matrix3D.hpp.
Definition at line 536 of file includeLinks/Matrix3D.hpp.
Definition at line 572 of file includeLinks/Matrix3D.hpp.
Definition at line 572 of file includeLinks/Matrix3D.hpp.
Definition at line 335 of file includeLinks/Matrix3D.hpp.
Definition at line 335 of file includeLinks/Matrix3D.hpp.
|
protected |
Definition at line 81 of file includeLinks/Matrix3D.hpp.
Referenced by Matrix3D::column_length(), Matrix3D::copy(), Mesquite::det(), Mesquite::eqAx(), Matrix3D::fill_lower_triangle(), Mesquite::inv(), Matrix3D::Matrix3D(), Mesquite::operator!=(), Matrix3D::operator*(), Matrix3D::operator*=(), Matrix3D::operator+=(), Matrix3D::operator-=(), Matrix3D::operator=(), Mesquite::operator==(), Matrix3D::operator[](), Matrix3D::outer_product(), Matrix3D::plus_transpose(), Matrix3D::plus_transpose_equal(), Mesquite::plusEqaA(), Mesquite::plusEqAx(), Mesquite::plusEqTransAx(), Matrix3D::set(), Matrix3D::set_column(), Matrix3D::set_values(), Mesquite::timesInvA(), and Matrix3D::zero().