Matrix3 Class Reference Specialisation of MatrixN to aid 3 dimensional rotations. More...
Inheritance diagram for Matrix3:
![]()
Collaboration diagram for Matrix3:
![]()
Detailed DescriptionSpecialisation of MatrixN to aid 3 dimensional rotations. Definition at line 13 of file Matrix3.hh. Member Typedef Documentation
Definition at line 253 of file MatrixN.hh. Constructor & Destructor Documentation
Definition at line 15 of file Matrix3.hh. Referenced by Matrix3::mkXRotation(), Matrix3::mkYRotation(), and Matrix3::mkZRotation(). { } Definition at line 17 of file Matrix3.hh. : Matrix<3>::Matrix(m3) { } Definition at line 19 of file Matrix3.hh. References Matrix< 3 >::_matrix, Vector< N >::_vec, and Vector3::unit(). Definition at line 24 of file Matrix3.hh. References Matrix3::setAsRotation(). { setAsRotation(from, to); } Member Function Documentation
Definition at line 84 of file MatrixN.hh. { if (i < N && j < N) { return _matrix(i, j); } else { throw std::runtime_error("Attempted get access outside matrix bounds."); } } Definition at line 107 of file MatrixN.hh. { Vector<N> rtn; for (size_t i = 0; i < N; ++i) { rtn.set(i, _matrix(i,col)); } return rtn; } Definition at line 92 of file MatrixN.hh. { Vector<N> rtn; for (size_t i = 0; i < N; ++i) { rtn.set(i, _matrix(row,i)); } return rtn; } Calculate inverse. Definition at line 134 of file MatrixN.hh. { Matrix<N> tmp; tmp._matrix = _matrix.inverse(); return tmp; }
Check that all off-diagonal elements are zero, allowing for numerical precision. Definition at line 193 of file MatrixN.hh. { for (size_t i=0; i < N; ++i) { for (size_t j=0; j < N; ++j) { if (i == j) continue; if (! Rivet::isZero(_matrix(i,j)) ) return false; } } return true; } Check for index-wise equality, allowing for numerical precision. Definition at line 178 of file MatrixN.hh. { for (size_t i=0; i < N; ++i) { for (size_t j=i; j < N; ++j) { if (! Rivet::isZero(_matrix(i,j) - other._matrix(i,j)) ) return false; } } return true; }
Check for symmetry under transposition. Definition at line 188 of file MatrixN.hh.
Index-wise check for nullness, allowing for numerical precision. Definition at line 168 of file MatrixN.hh. { for (size_t i=0; i < N; ++i) { for (size_t j=0; j < N; ++j) { if (! Rivet::isZero(_matrix(i,j), tolerance) ) return false; } } return true; } Definition at line 48 of file MatrixN.hh. { Matrix<N> rtn; for (size_t i = 0; i < N; ++i) { rtn.set(i, i, diag[i]); } return rtn; }
Definition at line 56 of file MatrixN.hh. { Matrix<N> rtn; for (size_t i = 0; i < N; ++i) { rtn.set(i, i, 1); } return rtn; }
Definition at line 29 of file Matrix3.hh. References Matrix3::Matrix3().
Definition at line 33 of file Matrix3.hh. References Matrix3::Matrix3(). Definition at line 43 of file MatrixN.hh. {
Matrix<N> rtn;
return rtn;
}
Definition at line 37 of file Matrix3.hh. References Matrix3::Matrix3(). Definition at line 207 of file MatrixN.hh. { return _matrix != a._matrix; } Definition at line 227 of file MatrixN.hh.
Definition at line 232 of file MatrixN.hh. { _matrix *= a; return *this; } Definition at line 242 of file MatrixN.hh.
Negate. Definition at line 156 of file MatrixN.hh. { Matrix<N> rtn; rtn._matrix = -_matrix; return rtn; } Definition at line 247 of file MatrixN.hh.
Definition at line 237 of file MatrixN.hh. { _matrix /= a; return *this; }
Definition at line 211 of file MatrixN.hh. { return _matrix < a._matrix; }
Definition at line 215 of file MatrixN.hh. { return _matrix <= a._matrix; }
Definition at line 203 of file MatrixN.hh. { return _matrix == a._matrix; }
Definition at line 219 of file MatrixN.hh. { return _matrix > a._matrix; }
Definition at line 223 of file MatrixN.hh. { return _matrix >= a._matrix; } Definition at line 75 of file MatrixN.hh. { if (i < N && j < N) { _matrix(i, j) = value; } else { throw std::runtime_error("Attempted set access outside matrix bounds."); } return *this; }
Definition at line 42 of file Matrix3.hh. References Matrix< 3 >::_matrix, Vector< N >::_vec, Rivet::angle(), Rivet::cross(), Rivet::isZero(), and Vector3::unit(). Referenced by Matrix3::Matrix3(). Definition at line 115 of file MatrixN.hh. { for (size_t i = 0; i < N; ++i) { _matrix(i,col) = c.get(i); } return *this; } Definition at line 100 of file MatrixN.hh. { for (size_t i = 0; i < N; ++i) { _matrix(row,i) = r.get(i); } return *this; }
Calculate trace. Definition at line 146 of file MatrixN.hh. { double tr = 0.0; for (size_t i = 0; i < N; ++i) { tr += _matrix(i,i); } return tr; // return _matrix.trace(); } Definition at line 122 of file MatrixN.hh. { Matrix<N> tmp = *this; tmp._matrix.replaceWithAdjoint(); return tmp; } Member Data DocumentationDefinition at line 254 of file MatrixN.hh. Referenced by Matrix3::Matrix3(), and Matrix3::setAsRotation(). The documentation for this class was generated from the following file: Generated on Wed Oct 7 2015 12:09:27 for The Rivet MC analysis system by ![]() |