MCPcopy Create free account
hub / github.com/TinyMPC/TinyMPC / operatorNorm

Method operatorNorm

include/Eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:121–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 */
120template<typename Derived>
121inline typename MatrixBase<Derived>::RealScalar
122MatrixBase<Derived>::operatorNorm() const
123{
124 using std::sqrt;
125 typename Derived::PlainObject m_eval(derived());
126 // FIXME if it is really guaranteed that the eigenvalues are already sorted,
127 // then we don't need to compute a maxCoeff() here, comparing the 1st and last ones is enough.
128 return sqrt((m_eval*m_eval.adjoint())
129 .eval()
130 .template selfadjointView<Lower>()
131 .eigenvalues()
132 .maxCoeff()
133 );
134}
135
136/** \brief Computes the L2 operator norm
137 * \returns Operator norm of the matrix.

Callers

nothing calls this directly

Calls 5

sqrtFunction · 0.50
maxCoeffMethod · 0.45
eigenvaluesMethod · 0.45
evalMethod · 0.45
adjointMethod · 0.45

Tested by

no test coverage detected