alpaqa cmake-targets
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
print.hpp File Reference
#include <alpaqa/export.hpp>
#include <alpaqa/util/float.hpp>
#include <iosfwd>
#include <limits>
#include <string>
#include <string_view>
#include <utility>
#include <Eigen/Core>
+ Include dependency graph for print.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  alpaqa
 
namespace  alpaqa::detail
 

Macros

#define ALPAQA_PRINT_OVL_IMPL(name, type)
 
#define ALPAQA_PRINT_OVL(type)
 
#define ALPAQA_PRINT_CVT(name)
 

Functions

template<std::floating_point F>
std::string float_to_str (F value, int precision)
 
template<class T >
std::ostream & print_csv_impl (std::ostream &os, const T &M, std::string_view sep, std::string_view begin, std::string_view end)
 
template<class T >
std::ostream & print_matlab_impl (std::ostream &os, const T &M, std::string_view end)
 
template<class T >
std::ostream & print_python_impl (std::ostream &os, const T &M, std::string_view end)
 
template<class... Args>
std::ostream & print_csv_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< int > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_matlab_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< int > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_python_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< int > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_csv_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_matlab_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_python_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_csv_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_matlab_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_python_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long long > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_csv_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_matlab_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_python_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_csv_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_matlab_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, Args &&...args)
 
template<class... Args>
std::ostream & print_python_helper (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, Args &&...args)
 
template<class Derived , class... Args>
std::ostream & print_csv (std::ostream &os, const Eigen::DenseBase< Derived > &M, Args &&...args)
 
template<class Derived , class... Args>
std::ostream & print_matlab (std::ostream &os, const Eigen::DenseBase< Derived > &M, Args &&...args)
 
template<class Derived , class... Args>
std::ostream & print_python (std::ostream &os, const Eigen::DenseBase< Derived > &M, Args &&...args)
 

Macro Definition Documentation

◆ ALPAQA_PRINT_OVL_IMPL

#define ALPAQA_PRINT_OVL_IMPL (   name,
  type 
)
Value:
template <class... Args> \
std::ostream &print_##name##_helper( \
std::ostream &os, const Eigen::Ref<const Eigen::MatrixX<type>> &M, \
Args &&...args) { \
return print_##name##_impl(os, M, std::forward<Args>(args)...); \
}

Definition at line 35 of file print.hpp.

◆ ALPAQA_PRINT_OVL

#define ALPAQA_PRINT_OVL (   type)
Value:
ALPAQA_PRINT_OVL_IMPL(csv, type) \
ALPAQA_PRINT_OVL_IMPL(matlab, type) \
ALPAQA_PRINT_OVL_IMPL(python, type)
#define ALPAQA_PRINT_OVL_IMPL(name, type)
Definition print.hpp:35

Definition at line 42 of file print.hpp.

◆ ALPAQA_PRINT_CVT

#define ALPAQA_PRINT_CVT (   name)
Value:
template <class Derived, class... Args> \
std::ostream &print_##name(std::ostream &os, \
const Eigen::DenseBase<Derived> &M, \
Args &&...args) { \
using R = Eigen::Ref<const Eigen::MatrixX<typename Derived::Scalar>>; \
return detail::print_##name##_helper(os, static_cast<const R &>(M), \
std::forward<Args>(args)...); \
}

Definition at line 57 of file print.hpp.