aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
math.hpp File Reference

Math utilities. More...

#include "aligator/utils/exceptions.hpp"
#include <proxsuite-nlp/math.hpp>
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.

Namespaces

namespace  aligator
 Main package namespace.
 
namespace  aligator::math
 Math utilities.
 

Macros

#define ALIGATOR_RAISE_IF_NAN(value)
 
#define ALIGATOR_RAISE_IF_NAN_NAME(value, name)
 
#define ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)   PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
 
#define ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES(Scalar)
 

Functions

template<typename D >
auto aligator::eigenPrintWithPreamble (const Eigen::EigenBase< D > &mat, const std::string &text)
 
template<typename T >
bool aligator::math::check_value (const std::vector< T > &xs)
 Check if a std::vector of numerical objects has invalid values.
 
template<typename T >
void aligator::math::setZero (std::vector< T > &mats)
 
template<typename A , typename B , typename OutType , typename Scalar >
void aligator::math::vectorMultiplyAdd (const std::vector< A > &a, const std::vector< B > &b, std::vector< OutType > &c, const Scalar alpha)
 Compute zi = xi + alpha * yi for all i.
 

Detailed Description

Math utilities.

Definition in file math.hpp.

Macro Definition Documentation

◆ ALIGATOR_RAISE_IF_NAN

#define ALIGATOR_RAISE_IF_NAN ( value)
Value:
if (::aligator::math::check_value(value)) \
ALIGATOR_RUNTIME_ERROR("Encountered NaN.\n")

Definition at line 9 of file math.hpp.

◆ ALIGATOR_RAISE_IF_NAN_NAME

#define ALIGATOR_RAISE_IF_NAN_NAME ( value,
name )
Value:
if (::aligator::math::check_value(value)) \
ALIGATOR_RUNTIME_ERROR( \
fmt::format("Encountered NaN for variable {:s}\n", name))

Definition at line 13 of file math.hpp.

◆ ALIGATOR_DYNAMIC_TYPEDEFS

#define ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar)    PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)

Definition at line 18 of file math.hpp.

◆ ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES

#define ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES ( Scalar)
Value:
using RowMatrixXs = typename Eigen::Transpose<MatrixXs>::PlainObject; \
using RowMatrixRef = Eigen::Ref<RowMatrixXs>; \
using ConstRowMatrixRef = Eigen::Ref<const RowMatrixXs>
#define ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
Definition math.hpp:18

Definition at line 20 of file math.hpp.