2 x 2 matrix
More...
#include <JMatrix2D.hh>
2 x 2 matrix
Definition at line 32 of file JMath/JMatrix2D.hh.
JMATH::JMatrix2D::JMatrix2D |
( |
| ) |
|
|
inline |
JMATH::JMatrix2D::JMatrix2D |
( |
const double |
__a00, |
|
|
const double |
__a01, |
|
|
const double |
__a10, |
|
|
const double |
__a11 |
|
) |
| |
|
inline |
Contructor.
- Parameters
-
__a00 | (0,0) |
__a01 | (0,1) |
__a10 | (1,0) |
__a11 | (1,1) |
Definition at line 58 of file JMath/JMatrix2D.hh.
static const JMatrix2D& JMATH::JMatrix2D::getInstance |
( |
| ) |
|
|
inlinestatic |
Get reference to unique instance of this class object.
- Returns
- zero matrix
Definition at line 70 of file JMath/JMatrix2D.hh.
static const JMatrix2D& JMATH::JMatrix2D::getIdentity |
( |
| ) |
|
|
inlinestatic |
Get reference to unique instance of this class object.
- Returns
- identity matrix
Definition at line 97 of file JMath/JMatrix2D.hh.
JMatrix2D()
Default constructor.
JMatrix2D & setIdentity()
Set to identity matrix.
void JMATH::JMatrix2D::set |
( |
const JMatrix2D & |
A | ) |
|
|
inline |
Set matrix.
- Parameters
-
Definition at line 110 of file JMath/JMatrix2D.hh.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
Set matrix to the null matrix.
- Returns
- this matrix
Definition at line 121 of file JMath/JMatrix2D.hh.
JMatrix2D()
Default constructor.
JMatrix2D& JMATH::JMatrix2D::mul |
( |
const double |
factor | ) |
|
|
inline |
Scale matrix.
- Parameters
-
- Returns
- this matrix * factor
Definition at line 194 of file JMath/JMatrix2D.hh.
196 a00 *= factor;
a01 *= factor;
197 a10 *= factor;
a11 *= factor;
JMatrix2D& JMATH::JMatrix2D::div |
( |
const double |
factor | ) |
|
|
inline |
Scale matrix.
- Parameters
-
- Returns
- this matrix / factor
Definition at line 209 of file JMath/JMatrix2D.hh.
211 a00 /= factor;
a01 /= factor;
212 a10 /= factor;
a11 /= factor;
bool JMATH::JMatrix2D::equals |
( |
const JMatrix2D & |
A, |
|
|
const double |
eps = std::numeric_limits<double>::min() |
|
) |
| const |
|
inline |
Equality.
- Parameters
-
A | matrix |
eps | numerical precision |
- Returns
- true if matrices identical; else false
Definition at line 245 of file JMath/JMatrix2D.hh.
248 return (fabs(
a00 - A.
a00) <= eps &&
249 fabs(
a01 - A.
a01) <= eps &&
250 fabs(
a10 - A.
a10) <= eps &&
251 fabs(
a11 - A.
a11) <= eps);
bool JMATH::JMatrix2D::isIdentity |
( |
const double |
eps = std::numeric_limits<double>::min() | ) |
const |
|
inline |
Test identity.
- Parameters
-
- Returns
- true if identity matrix; else false
Definition at line 261 of file JMath/JMatrix2D.hh.
static const JMatrix2D & getIdentity()
Get reference to unique instance of this class object.
bool equals(const JMatrix2D &A, const double eps=std::numeric_limits< double >::min()) const
Equality.
double JMATH::JMatrix2D::getDeterminant |
( |
| ) |
const |
|
inline |
Get determinant of matrix.
- Returns
- determinant of matrix
Definition at line 272 of file JMath/JMatrix2D.hh.
void JMATH::JMatrix2D::transform |
( |
double & |
__x, |
|
|
double & |
__y |
|
) |
| const |
|
inline |
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 357 of file JMath.hh.
Auxiliary class for arithmetic operations on objects.
Read matrix from input.
- Parameters
-
- Returns
- reader
Definition at line 301 of file JMath/JMatrix2D.hh.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Write matrix to output.
- Parameters
-
- Returns
- writer
Definition at line 317 of file JMath/JMatrix2D.hh.
319 out << matrix.
a00; out << matrix.
a01;
320 out << matrix.
a10; out << matrix.
a11;
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JMatrix2D & |
A |
|
) |
| |
|
friend |
Print ASCII formatted output.
- Parameters
-
- Returns
- output stream
Definition at line 333 of file JMath/JMatrix2D.hh.
337 const JFormat format(out, getFormat<JMatrix2D>(
JFormat_t(10, 3, std::ios::fixed | std::ios::showpos)));
339 out << format << A.
a00 <<
' ' << format << A.
a01 << endl;
340 out << format << A.
a10 <<
' ' << format << A.
a11 << endl;
double JMATH::JMatrix2D::a00 |
double JMATH::JMatrix2D::a01 |
double JMATH::JMatrix2D::a10 |
double JMATH::JMatrix2D::a11 |
The documentation for this class was generated from the following file: