codac 2.0.0
Loading...
Searching...
No Matches
codac2_MatrixBase_addons_Base.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool is_squared () const
 Checks if the matrix is square.
 
auto squared_norm () const
 Returns the squared norm of the matrix.
 
Scalar min_coeff () const
 Returns the minimum coefficient in the matrix.
 
Scalar max_coeff () const
 Returns the maximum coefficient in the matrix.
 
bool is_nan () const
 Checks if any coefficient in the matrix is NaN.
 

Detailed Description

This file is included in the declaration of Eigen::MatrixBase, thanks to the preprocessor token EIGEN_MATRIXBASE_PLUGIN. See: https://eigen.tuxfamily.org/dox/TopicCustomizing_Plugins.html and the file codac2_matrices.h


Date
2024
Author
Simon Rohou
License: GNU Lesser General Public License (LGPL)

Function Documentation

◆ is_squared()

bool is_squared ( ) const
inline

Checks if the matrix is square.

Returns
True if the number of rows equals the number of columns.
21{
22 return this->rows() == this->cols();
23}

◆ squared_norm()

auto squared_norm ( ) const
inline

Returns the squared norm of the matrix.

Returns
The squared norm value.
30{
31 return this->squaredNorm();
32}

◆ min_coeff()

Scalar min_coeff ( ) const
inline

Returns the minimum coefficient in the matrix.

Returns
The minimum coefficient value.
51{
52 minmax_item(min);
53}

◆ max_coeff()

Scalar max_coeff ( ) const
inline

Returns the maximum coefficient in the matrix.

Returns
The maximum coefficient value.
60{
61 minmax_item(max);
62}

◆ is_nan()

bool is_nan ( ) const
inline

Checks if any coefficient in the matrix is NaN.

Returns
True if any element is NaN, false otherwise.
69{
70 return this->array().isNaN().any();
71}