Janus 2.0.0
High-performance C++20 dual-mode numerical framework
Loading...
Searching...
No Matches
janus::SymbolicArg Class Reference

Universal symbolic argument wrapper for Function inputs/outputs. More...

#include <JanusTypes.hpp>

Public Member Functions

 SymbolicArg (const SymbolicScalar &s)
 Construct from single symbolic scalar (MX).
template<typename Derived>
 SymbolicArg (const Eigen::MatrixBase< Derived > &e)
 Construct from Eigen matrix of symbolic scalars.
 operator SymbolicScalar () const
 Implicit conversion to CasADi MX.
SymbolicScalar get () const
 Get underlying CasADi MX object.

Detailed Description

Universal symbolic argument wrapper for Function inputs/outputs.

Allows automatic flattening of Eigen matrices and MX scalars into a single casadi::MX type. Enables mixed initializer lists: {scalar_sym, matrix_sym}.

See also
Function

Constructor & Destructor Documentation

◆ SymbolicArg() [1/2]

janus::SymbolicArg::SymbolicArg ( const SymbolicScalar & s)
inline

Construct from single symbolic scalar (MX).

Parameters
sSymbolic scalar value

◆ SymbolicArg() [2/2]

template<typename Derived>
janus::SymbolicArg::SymbolicArg ( const Eigen::MatrixBase< Derived > & e)
inline

Construct from Eigen matrix of symbolic scalars.

Template Parameters
DerivedEigen expression type
Parameters
eEigen matrix to flatten into MX

Member Function Documentation

◆ get()

SymbolicScalar janus::SymbolicArg::get ( ) const
inline

Get underlying CasADi MX object.

Returns
Copy of the stored MX

◆ operator SymbolicScalar()

janus::SymbolicArg::operator SymbolicScalar ( ) const
inline

Implicit conversion to CasADi MX.

Returns
Underlying MX object

The documentation for this class was generated from the following file: