Further details on classes like epsilon compare, further unit tests.

This commit is contained in:
Klaus Basan
2013-04-24 01:59:17 +02:00
parent bd53371de4
commit 472521f281
17 changed files with 187 additions and 70 deletions

View File

@@ -203,6 +203,18 @@ public:
return this->m_matrix.isIdentity();
}
/*!
* \brief Is identity matrix? Epsilon considered.
* \return
*/
bool isIdentityEpsilon() const
{
ImplMatrix m(0.0);
m += (*this);
m.round();
return m.isIdentity();
}
/*!
* \brief Set as identity matrix
* \return
@@ -228,6 +240,18 @@ public:
*/
bool isZero() const;
/*!
* \brief Is identity matrix? Epsilon considered.
* \return
*/
bool isZeroEpsilon() const
{
ImplMatrix m(0.0);
m += (*this);
m.round();
return m.isZero();
}
/*!
* \brief All values equal, if so matirx is not invertible
* \return
@@ -240,6 +264,11 @@ public:
*/
void fill(double value) { this->m_matrix.fill(value); }
/*!
* \brief Round all values
*/
void round();
/*!
* \brief Get element
* \param row