|
| void | reference_to_gradient (const LinearOCPStorage &ocp, std::span< const real_t > ref, std::span< real_t > qr) |
| | Simply computes the gradient of the quadratic cost \( J(x, u) = \sum_{j=1}^{N-1} \ell_j(x^j, u^j) + \ell_N(x^N) \), with \( \ell_j(x, u) = \tfrac12 \left\| \begin{pmatrix} x - x^j_\text{ref}
\\ u - u^j_\text{ref} \end{pmatrix} \right\|_{H_j}^2 \), with the Hessian \( H_j = \begin{pmatrix} Q_j & S_j^\top \\ S_j & R_j \end{pmatrix} \).
|
| void | reference_to_gradient (LinearOCPStorage &ocp, std::span< const real_t > ref) |
| | Simply computes the gradient of the quadratic cost \( J(x, u) = \sum_{j=1}^{N-1} \ell_j(x^j, u^j) + \ell_N(x^N) \), with \( \ell_j(x, u) = \tfrac12 \left\| \begin{pmatrix} x - x^j_\text{ref}
\\ u - u^j_\text{ref} \end{pmatrix} \right\|_{H_j}^2 \), with the Hessian \( H_j = \begin{pmatrix} Q_j & S_j^\top \\ S_j & R_j \end{pmatrix} \).
|
| const char * | enum_name (SolveMethod s) |
| constexpr bool | is_pow_2 (index_t n) |
| constexpr index_t | ceil_log2 (index_t n) |
| constexpr index_t | get_level (index_t i) |
| constexpr index_t | get_index_in_level (index_t i) |
| MatFilePtr | open_mat (const std::filesystem::path &filename, MatioOpenMode mode=MatioOpenMode::Read) |
| | Opens a .mat file for reading or writing.
|
| MatFilePtr | create_mat (const std::filesystem::path &filename) |
| | Create and open a new .mat file for writing.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, float value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, double value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, short value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, int value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, long value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, long long value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, unsigned short value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, unsigned int value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, unsigned long value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, unsigned long long value) |
| | Add a value to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, guanaqo::MatrixView< const double, index_t > data) |
| | Add a matrix to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, guanaqo::MatrixView< const float, index_t > data) |
| | Add a matrix to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, batmat::matrix::View< const double, index_t > data) |
| | Add a batch of matrices to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, batmat::matrix::View< const float, index_t > data) |
| | Add a batch of matrices to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const float > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const double > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const unsigned short > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const unsigned int > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const unsigned long > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const unsigned long long > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const short > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const int > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const long > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, std::span< const long long > data) |
| | Add a vector to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, const SparseMatrix &matrix) |
| | Add a sparse matrix to an open .mat file.
|
| void | add_to_mat (mat_t *mat, const std::string &varname, const LinearOCPStorage &ocp) |
| | Add the data from a LinearOCPStorage to an open .mat file.
|
| void | read_from_mat (mat_t *mat, const std::string &varname, LinearOCPStorage &ocp) |
| | Load a LinearOCPStorage from a .mat file.
|
| void | read_from_mat (mat_t *mat, const std::string &varname, std::vector< float > &data) |
| | Load a vector from an open .mat file.
|
| void | read_from_mat (mat_t *mat, const std::string &varname, std::vector< double > &data) |
| | Load a vector from an open .mat file.
|
| void | read_from_mat (mat_t *mat, const std::string &varname, std::span< float > data) |
| | Load a vector from an open .mat file.
|
| void | read_from_mat (mat_t *mat, const std::string &varname, std::span< double > data) |
| | Load a vector from an open .mat file.
|
| void | ocp_dump_mat (const std::filesystem::path &filename, const LinearOCPStorage &ocp) |
| | Dump the data from a LinearOCPStorage to a new .mat file.
|
| LinearOCPStorage | generate_random_ocp (OCPDim dim, uint_fast32_t seed=0) |
| | Generates a random linear OCP with the given dimensions and random seed.
|
| template<class T, size_t N> |
| MatVarPtr | create_tensor_var (const char *name, std::span< const T > buffer, std::array< index_t, N > dims) |
| template<class T, size_t N> |
| void | write_tensor (mat_t *matfp, const char *name, std::span< const T > buffer, std::array< index_t, N > dims) |
| template<class T> |
| void | add_to_mat_impl (mat_t *mat, const std::string &varname, guanaqo::MatrixView< const T, index_t > data) |
| template<class T> |
| void | add_to_mat_impl (mat_t *mat, const std::string &varname, batmat::matrix::View< const T, index_t > data) |
| void | validate_mat_var (const matvar_t *var, const std::string &name, int expected_rank) |
| auto | open_vector_var (mat_t *mat, const std::string &varname) |
| constexpr index_t | get_depth (index_t n) |
| template<class Mat> |
| auto | λ_max_power (const Mat &M, const Mat &K, int max_it, typename Mat::value_type tol) |
| template<class M> |
| auto | unpacked (const M &matrix) |
| constexpr auto | simdify (simdifiable auto &&a) -> simdified_view_t< decltype(a)> |