Stan  1.0
probability, sampling & optimization
List of all members
stan::model::stanc_model Class Reference

The abstract base class for models generated by the Stan compiler stanc. More...

#include <stanc_model.hpp>

Inheritance diagram for stan::model::stanc_model:
stan::model::prob_grad_ad stan::model::prob_grad

Additional Inherited Members

- Public Member Functions inherited from stan::model::prob_grad_ad
 prob_grad_ad (size_t num_params_r)
 
 prob_grad_ad (size_t num_params_r, std::vector< std::pair< int, int > > &param_ranges_i)
 
virtual ~prob_grad_ad ()
 
virtual agrad::var log_prob (std::vector< agrad::var > &params_r, std::vector< int > &params_i, std::ostream *output_stream=0)=0
 
virtual double grad_log_prob (std::vector< double > &params_r, std::vector< int > &params_i, std::vector< double > &gradient, std::ostream *output_stream=0)
 
virtual double log_prob (std::vector< double > &params_r, std::vector< int > &params_i, std::ostream *output_stream=0)
 
- Public Member Functions inherited from stan::model::prob_grad
 prob_grad (size_t num_params_r)
 
 prob_grad (size_t num_params_r, std::vector< std::pair< int, int > > &param_ranges_i)
 
virtual ~prob_grad ()
 
void set_num_params_r (size_t num_params_r)
 
void setparam_ranges_i__ (std::vector< std::pair< int, int > > param_ranges_i)
 
virtual size_t num_params_r ()
 
virtual size_t num_params_i ()
 
std::pair< int, int > param_range_i (size_t idx)
 
void set_param_range_i_lower (size_t idx, int low)
 
void set_param_range_i_upper (size_t idx, int up)
 
int param_range_i_lower (size_t idx)
 
int param_range_i_upper (size_t idx)
 
virtual void init (std::vector< double > &params_r, std::vector< int > &params_i)
 
virtual double grad_hess_log_prob (std::vector< double > &params_r, std::vector< int > &params_i, std::vector< double > &gradient, std::vector< double > &hessian, std::ostream *output_stream=0)
 Evaluate the log-probability, its gradient, and its Hessian at params_r. More...
 
virtual double log_prob_star (size_t idx, int val, std::vector< double > &params_r, std::vector< int > &params_i, std::ostream *output_stream=0)
 
virtual void write_csv (std::vector< double > &params_r, std::vector< int > &params_i, std::ostream &o, std::ostream *output_stream=0)
 Write the parameters on a single line in CSV format. More...
 
void finite_diff_grad (std::vector< double > &params_r, std::vector< int > &params_i, std::vector< double > &grad, double epsilon=1e-6, std::ostream *output_stream=0)
 Compute the gradient using finite differences for the specified parameters, writing the result into the specified gradient, using the specified perturbation. More...
 
int test_gradients (std::vector< double > &params_r, std::vector< int > &params_i, double epsilon=1e-6, double error=1e-6, std::ostream &o=std::cout, std::ostream *output_stream=0)
 Test the grad_log_prob() function's ability to produce accurate gradients using finite differences. More...
 
- Protected Attributes inherited from stan::model::prob_grad
size_t num_params_r__
 
std::vector< std::pair< int, int > > param_ranges_i__
 

Detailed Description

The abstract base class for models generated by the Stan compiler stanc.

Definition at line 14 of file stanc_model.hpp.


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

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