Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | Public Attributes | List of all members
stan::math::system_functor< F, T0, T1, x_is_iv > Struct Template Reference

A functor that allows us to treat either x or y as the independent variable. More...

#include <algebra_system.hpp>

Public Member Functions

 system_functor ()
 
 system_functor (const F &f, const Eigen::Matrix< T0, Eigen::Dynamic, 1 > &x, const Eigen::Matrix< T1, Eigen::Dynamic, 1 > &y, const std::vector< double > &dat, const std::vector< int > &dat_int, std::ostream *msgs)
 
template<typename T >
Eigen::Matrix< T, Eigen::Dynamic, 1 > operator() (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &iv) const
 An operator that takes in an independent variable. More...
 

Public Attributes

f_
 algebraic system functor More...
 
Eigen::Matrix< T0, Eigen::Dynamic, 1 > x_
 unknowns More...
 
Eigen::Matrix< T1, Eigen::Dynamic, 1 > y_
 auxiliary parameters More...
 
std::vector< double > dat_
 real data More...
 
std::vector< int > dat_int_
 integer data More...
 
std::ostream * msgs_
 stream message More...
 

Detailed Description

template<typename F, typename T0, typename T1, bool x_is_iv>
struct stan::math::system_functor< F, T0, T1, x_is_iv >

A functor that allows us to treat either x or y as the independent variable.

If x_is_dv = true, than the Jacobian is computed w.r.t x, else it is computed w.r.t y.

Template Parameters
Ftype for algebraic system functor
T0type for unknowns
T1type for auxiliary parameters
x_is_ivtrue if x is the independent variable

Definition at line 25 of file algebra_system.hpp.

Constructor & Destructor Documentation

◆ system_functor() [1/2]

template<typename F , typename T0 , typename T1 , bool x_is_iv>
stan::math::system_functor< F, T0, T1, x_is_iv >::system_functor ( )
inline

Definition at line 39 of file algebra_system.hpp.

◆ system_functor() [2/2]

template<typename F , typename T0 , typename T1 , bool x_is_iv>
stan::math::system_functor< F, T0, T1, x_is_iv >::system_functor ( const F &  f,
const Eigen::Matrix< T0, Eigen::Dynamic, 1 > &  x,
const Eigen::Matrix< T1, Eigen::Dynamic, 1 > &  y,
const std::vector< double > &  dat,
const std::vector< int > &  dat_int,
std::ostream *  msgs 
)
inline

Definition at line 41 of file algebra_system.hpp.

Member Function Documentation

◆ operator()()

template<typename F , typename T0 , typename T1 , bool x_is_iv>
template<typename T >
Eigen::Matrix<T, Eigen::Dynamic, 1> stan::math::system_functor< F, T0, T1, x_is_iv >::operator() ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  iv) const
inline

An operator that takes in an independent variable.

The independent variable is either passed as the unknown x, or the auxiliary parameter y. The x_is_iv template parameter allows us to determine whether the jacobian is computed with respect to x or y.

Template Parameters
Tthe scalar type of the independent variable

Definition at line 56 of file algebra_system.hpp.

Member Data Documentation

◆ dat_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
std::vector<double> stan::math::system_functor< F, T0, T1, x_is_iv >::dat_

real data

Definition at line 33 of file algebra_system.hpp.

◆ dat_int_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
std::vector<int> stan::math::system_functor< F, T0, T1, x_is_iv >::dat_int_

integer data

Definition at line 35 of file algebra_system.hpp.

◆ f_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
F stan::math::system_functor< F, T0, T1, x_is_iv >::f_

algebraic system functor

Definition at line 27 of file algebra_system.hpp.

◆ msgs_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
std::ostream* stan::math::system_functor< F, T0, T1, x_is_iv >::msgs_

stream message

Definition at line 37 of file algebra_system.hpp.

◆ x_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
Eigen::Matrix<T0, Eigen::Dynamic, 1> stan::math::system_functor< F, T0, T1, x_is_iv >::x_

unknowns

Definition at line 29 of file algebra_system.hpp.

◆ y_

template<typename F , typename T0 , typename T1 , bool x_is_iv>
Eigen::Matrix<T1, Eigen::Dynamic, 1> stan::math::system_functor< F, T0, T1, x_is_iv >::y_

auxiliary parameters

Definition at line 31 of file algebra_system.hpp.


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

     [ Stan Home Page ] © 2011–2018, Stan Development Team.