CppAD: A C++ Algorithmic Differentiation Package
20130918
|
Class that actually implements the afun(id, ax, ay)
calls.
More...
Public Types | |
typedef bool(* | F )(size_t id, size_t k, size_t n, size_t m, const vector< bool > &vx, vector< bool > &vy, const vector< Base > &tx, vector< Base > &ty) |
type for user routine that computes forward mode results | |
typedef bool(* | FJS )(size_t id, size_t n, size_t m, size_t q, const vector< std::set< size_t > > &r, vector< std::set< size_t > > &s) |
type for user routine that computes forward mode Jacobian sparsity | |
enum | option_enum { bool_sparsity_enum, set_sparsity_enum } |
typedef bool(* | R )(size_t id, size_t k, size_t n, size_t m, const vector< Base > &tx, const vector< Base > &ty, vector< Base > &px, const vector< Base > &py) |
type for user routine that computes reverse mode results | |
typedef bool(* | RHS )(size_t id, size_t n, size_t m, size_t q, const vector< std::set< size_t > > &r, const vector< bool > &s, vector< bool > &t, const vector< std::set< size_t > > &u, vector< std::set< size_t > > &v) |
type for user routine that computes reverse mode Hessian sparsity | |
typedef bool(* | RJS )(size_t id, size_t n, size_t m, size_t q, vector< std::set< size_t > > &r, const vector< std::set< size_t > > &s) |
type for user routine that computes reverse mode Jacobian sparsity | |
Public Member Functions | |
const std::string & | afun_name (void) const |
Name corresponding to a base_atomic object. | |
virtual bool | for_sparse_jac (size_t q, const vector< std::set< size_t > > &r, vector< std::set< size_t > > &s) |
Link from forward Jacobian sparsity sweep to old_atomic. | |
virtual bool | for_sparse_jac (size_t q, const vector< bool > &r, vector< bool > &s) |
virtual bool | forward (size_t p, size_t q, const vector< bool > &vx, vector< bool > &vy, const vector< Base > &tx, vector< Base > &ty) |
Link from old_atomic to forward mode. | |
old_atomic (const char *afun, F f, R r, FJS fjs, RJS rjs, RHS rhs) | |
Constructor called for each invocation of CPPAD_USER_ATOMIC. | |
template<class ADVector > | |
void | operator() (const ADVector &ax, ADVector &ay, size_t id=0) |
Implement the user call to afun(ax, ay) and old_atomic call to afun(ax, ay, id) . | |
template<class ADVector > | |
void | operator() (size_t id, const ADVector &ax, ADVector &ay) |
Implement the user call to afun(id, ax, ay) . | |
void | option (enum option_enum option_value) |
virtual bool | rev_sparse_hes (const vector< bool > &vx, const vector< bool > &s, vector< bool > &t, size_t q, const vector< std::set< size_t > > &r, const vector< std::set< size_t > > &u, vector< std::set< size_t > > &v) |
Link from reverse Hessian sparsity sweep to old_atomic. | |
virtual bool | rev_sparse_hes (const vector< bool > &vx, const vector< bool > &s, vector< bool > &t, size_t q, const vector< bool > &r, const vector< bool > &u, vector< bool > &v) |
virtual bool | rev_sparse_jac (size_t q, const vector< std::set< size_t > > &rt, vector< std::set< size_t > > &st) |
Link from reverse Jacobian sparsity sweep to old_atomic. | |
virtual bool | rev_sparse_jac (size_t q, const vector< bool > &rt, vector< bool > &st) |
virtual bool | reverse (size_t q, const vector< Base > &tx, const vector< Base > &ty, vector< Base > &px, const vector< Base > &py) |
Link from old_atomic to reverse mode. | |
virtual void | set_id (size_t id) |
Store id for next virtual function callback. | |
option_enum | sparsity (void) const |
current sparsity setting | |
Static Public Member Functions | |
static const std::string & | class_name (size_t index) |
atomic_base function name corresponding to a certain index | |
static atomic_base * | class_object (size_t index) |
atomic_base function object corresponding to a certain index | |
static void | clear (void) |
disable old_atomic<Base>::clear(void) | |
Private Attributes | |
const F | f_ |
user's implementation of forward mode | |
const FJS | fjs_ |
user's implementation of forward jacobian sparsity calculations | |
size_t | id_ |
id value corresponding to next virtual callback | |
const R | r_ |
user's implementation of reverse mode | |
const RHS | rhs_ |
user's implementation of reverse Hessian sparsity calculations | |
const RJS | rjs_ |
user's implementation of reverse jacobian sparsity calculations |
Class that actually implements the afun(id, ax, ay)
calls.
A new old_atomic object is generated each time the user invokes the CPPAD_USER_ATOMIC macro; see static object in that macro.
Definition at line 834 of file old_atomic.hpp.