1 x 1 matrix
More...
#include <JMatrix1D.hh>
1 x 1 matrix
Definition at line 32 of file JMatrix1D.hh.
◆ JMatrix1D() [1/2]
JMATH::JMatrix1D::JMatrix1D |
( |
| ) |
|
|
inline |
◆ JMatrix1D() [2/2]
JMATH::JMatrix1D::JMatrix1D |
( |
const double | __a00 | ) |
|
|
inline |
◆ getInstance()
static const JMatrix1D & JMATH::JMatrix1D::getInstance |
( |
| ) |
|
|
inlinestatic |
Get reference to unique instance of this class object.
- Returns
- zero matrix
Definition at line 64 of file JMatrix1D.hh.
65 {
67
68 return matrix;
69 }
JMatrix1D()
Default constructor.
◆ setIdentity()
JMatrix1D & JMATH::JMatrix1D::setIdentity |
( |
| ) |
|
|
inline |
Set to identity matrix.
- Returns
- this matrix
Definition at line 77 of file JMatrix1D.hh.
78 {
80
81 return *this;
82 }
◆ getIdentity()
static const JMatrix1D & JMATH::JMatrix1D::getIdentity |
( |
| ) |
|
|
inlinestatic |
Get reference to unique instance of this class object.
- Returns
- identity matrix
Definition at line 90 of file JMatrix1D.hh.
91 {
93
94 return matrix;
95 }
JMatrix1D & setIdentity()
Set to identity matrix.
◆ set()
void JMATH::JMatrix1D::set |
( |
const JMatrix1D & | A | ) |
|
|
inline |
◆ reset()
Set matrix to the null matrix.
- Returns
- this matrix
Definition at line 114 of file JMatrix1D.hh.
115 {
117
118 return *this;
119 }
◆ transpose()
Transpose.
- Returns
- this matrix
Definition at line 127 of file JMatrix1D.hh.
128 {
129 return *this;
130 }
◆ negate()
Negate matrix.
- Returns
- -this matrix
Definition at line 138 of file JMatrix1D.hh.
139 {
141
142 return *this;
143 }
◆ add()
Matrix addition.
- Parameters
-
- Returns
- this matrix + A
Definition at line 152 of file JMatrix1D.hh.
153 {
155
156 return *this;
157 }
◆ sub()
Matrix subtraction.
- Parameters
-
- Returns
- this matrix - A
Definition at line 166 of file JMatrix1D.hh.
167 {
169
170 return *this;
171 }
◆ mul() [1/3]
JMatrix1D & JMATH::JMatrix1D::mul |
( |
const double | factor | ) |
|
|
inline |
Scale matrix.
- Parameters
-
- Returns
- this matrix * factor
Definition at line 180 of file JMatrix1D.hh.
181 {
183
184 return *this;
185 }
◆ div()
JMatrix1D & JMATH::JMatrix1D::div |
( |
const double | factor | ) |
|
|
inline |
Scale matrix.
- Parameters
-
- Returns
- this matrix / factor
Definition at line 194 of file JMatrix1D.hh.
195 {
197
198 return *this;
199 }
◆ mul() [2/3]
Matrix multiplication.
- Parameters
-
- Returns
- this matrix
Definition at line 209 of file JMatrix1D.hh.
211 {
213
214 return *this;
215 }
◆ equals()
bool JMATH::JMatrix1D::equals |
( |
const JMatrix1D & | 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 225 of file JMatrix1D.hh.
227 {
228 return (fabs(
a00 - A.a00) <= eps);
229 }
◆ isIdentity()
bool JMATH::JMatrix1D::isIdentity |
( |
const double | eps = std::numeric_limits<double>::min() | ) |
const |
|
inline |
Test identity.
- Parameters
-
- Returns
- true if identity matrix; else false
Definition at line 238 of file JMatrix1D.hh.
239 {
241 }
bool equals(const JMatrix1D &A, const double eps=std::numeric_limits< double >::min()) const
Equality.
static const JMatrix1D & getIdentity()
Get reference to unique instance of this class object.
◆ getDeterminant()
double JMATH::JMatrix1D::getDeterminant |
( |
| ) |
const |
|
inline |
Get determinant of matrix.
- Returns
- determinant of matrix
Definition at line 249 of file JMatrix1D.hh.
◆ transform()
void JMATH::JMatrix1D::transform |
( |
double & | __x | ) |
const |
|
inline |
◆ mul() [3/3]
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 354 of file JMath.hh.
355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }
◆ operator>>
Read matrix from input.
- Parameters
-
- Returns
- reader
Definition at line 273 of file JMatrix1D.hh.
274 {
275 in >> matrix.a00;
276
277 return in;
278 }
◆ operator<< [1/2]
Write matrix to output.
- Parameters
-
- Returns
- writer
Definition at line 288 of file JMatrix1D.hh.
289 {
290 out << matrix.a00;
291
292 return out;
293 }
◆ operator<< [2/2]
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JMatrix1D & | A ) |
|
friend |
Print ASCII formatted output.
- Parameters
-
- Returns
- output stream
Definition at line 303 of file JMatrix1D.hh.
304 {
306
308
309 out << format << A.a00 << endl;
310
311 return out;
312 }
JFormat_t & getFormat()
Get format for given type.
◆ a00
double JMATH::JMatrix1D::a00 |
The documentation for this class was generated from the following file: