proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
math.hpp File Reference
#include <Eigen/Core>
#include <limits>
#include <vector>
Include dependency graph for math.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  proxsuite::nlp::math_types< _Scalar >
 Typedefs for math (Eigen vectors, matrices) depending on scalar type. More...
 

Namespaces

namespace  proxsuite
 Main package namespace.
 
namespace  proxsuite::nlp
 
namespace  proxsuite::nlp::math
 Math utilities.
 

Macros

#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
 

Typedefs

template<typename T , typename T2 = void>
using proxsuite::nlp::enable_if_eigen_dense = std::enable_if_t<is_eigen_dense_type<T>, T2>
 

Functions

template<typename MatType >
MatType::Scalar proxsuite::nlp::math::infty_norm (const Eigen::MatrixBase< MatType > &z)
 
template<typename MatType >
MatType::Scalar proxsuite::nlp::math::infty_norm (const std::vector< MatType > &z)
 
template<typename Scalar >
bool proxsuite::nlp::math::check_scalar (const Scalar value)
 Check that a scalar is neither inf, nor NaN.
 
template<typename Scalar >
bool proxsuite::nlp::math::scalar_close (const Scalar a, const Scalar b, const Scalar prec=std::numeric_limits< Scalar >::epsilon())
 Tests whether a and b are close, within absolute and relative precision prec.
 
template<typename T , typename = std::enable_if_t<std::is_scalar<T>::value>>
bool proxsuite::nlp::math::check_value (const T &x)
 
template<typename MatrixType >
bool proxsuite::nlp::math::check_value (const Eigen::MatrixBase< MatrixType > &x)
 
template<typename T >
proxsuite::nlp::math::sign (const T &x)
 

Variables

template<typename T >
constexpr bool proxsuite::nlp::is_eigen_dense_type
 
template<typename T >
constexpr bool proxsuite::nlp::is_eigen_matrix_type
 

Detailed Description

Definition in file math.hpp.

Macro Definition Documentation

◆ PROXSUITE_NLP_DYNAMIC_TYPEDEFS

#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS ( Scalar)
Value:
using VectorXs = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>; \
using MatrixXs = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>; \
using VectorOfVectors = std::vector<VectorXs>; \
using VectorRef = Eigen::Ref<VectorXs>; \
using MatrixRef = Eigen::Ref<MatrixXs>; \
using ConstVectorRef = Eigen::Ref<const VectorXs>; \
using ConstMatrixRef = Eigen::Ref<const MatrixXs>; \
using VectorOfRef = std::vector<VectorRef>; \
using Vector3s = Eigen::Matrix<Scalar, 3, 1>; \
using Vector6s = Eigen::Matrix<Scalar, 6, 1>; \
using Matrix3Xs = Eigen::Matrix<Scalar, 3, Eigen::Dynamic>; \
using Matrix6Xs = Eigen::Matrix<Scalar, 6, Eigen::Dynamic>; \
using Matrix6s = Eigen::Matrix<Scalar, 6, 6>

Macro typedefs for dynamic-sized vectors/matrices, used for cost funcs, merit funcs because we don't CRTP them and virtual members funcs can't be templated.

Definition at line 26 of file math.hpp.