Stan  2.14.0
probability, sampling & optimization
Public Types | Public Member Functions | Public Attributes | List of all members
stan::lang::var_decl Struct Reference

The variant structure to hold a variable declaration. More...

#include <var_decl.hpp>

Public Types

typedef boost::variant< boost::recursive_wrapper< nil >, boost::recursive_wrapper< int_var_decl >, boost::recursive_wrapper< double_var_decl >, boost::recursive_wrapper< vector_var_decl >, boost::recursive_wrapper< row_vector_var_decl >, boost::recursive_wrapper< matrix_var_decl >, boost::recursive_wrapper< simplex_var_decl >, boost::recursive_wrapper< unit_vector_var_decl >, boost::recursive_wrapper< ordered_var_decl >, boost::recursive_wrapper< positive_ordered_var_decl >, boost::recursive_wrapper< cholesky_factor_var_decl >, boost::recursive_wrapper< cholesky_corr_var_decl >, boost::recursive_wrapper< cov_matrix_var_decl >, boost::recursive_wrapper< corr_matrix_var_decl > > var_decl_t
 The variant type for a variable declaration. More...
 

Public Member Functions

 var_decl ()
 Construct a default variable declaration. More...
 
 var_decl (const var_decl_t &decl)
 Construct a variable declaration with the specified variant type holding a declaration. More...
 
 var_decl (const nil &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const int_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const double_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const vector_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const row_vector_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const matrix_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const simplex_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const unit_vector_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const ordered_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const positive_ordered_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const cholesky_factor_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const cholesky_corr_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const cov_matrix_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
 var_decl (const corr_matrix_var_decl &decl)
 Construct a variable declaration with the specified basic declaration. More...
 
std::string name () const
 Return the declaration's variable name. More...
 
base_var_decl base_decl () const
 Return the base declaration. More...
 
std::vector< expressiondims () const
 Return the sequence of array dimension sizes. More...
 
bool has_def () const
 Return true if this declaration also contains a definition. More...
 
expression def () const
 Return the definition included in this declaration. More...
 

Public Attributes

var_decl_t decl_
 The variable declaration variant type. More...
 

Detailed Description

The variant structure to hold a variable declaration.

Definition at line 30 of file var_decl.hpp.

Member Typedef Documentation

§ var_decl_t

typedef boost::variant<boost::recursive_wrapper<nil>, boost::recursive_wrapper<int_var_decl>, boost::recursive_wrapper<double_var_decl>, boost::recursive_wrapper<vector_var_decl>, boost::recursive_wrapper<row_vector_var_decl>, boost::recursive_wrapper<matrix_var_decl>, boost::recursive_wrapper<simplex_var_decl>, boost::recursive_wrapper<unit_vector_var_decl>, boost::recursive_wrapper<ordered_var_decl>, boost::recursive_wrapper<positive_ordered_var_decl>, boost::recursive_wrapper<cholesky_factor_var_decl>, boost::recursive_wrapper<cholesky_corr_var_decl>, boost::recursive_wrapper<cov_matrix_var_decl>, boost::recursive_wrapper<corr_matrix_var_decl> > stan::lang::var_decl::var_decl_t

The variant type for a variable declaration.

Definition at line 48 of file var_decl.hpp.

Constructor & Destructor Documentation

§ var_decl() [1/16]

stan::lang::var_decl::var_decl ( )

Construct a default variable declaration.

Definition at line 13 of file var_decl_def.hpp.

§ var_decl() [2/16]

stan::lang::var_decl::var_decl ( const var_decl_t decl)

Construct a variable declaration with the specified variant type holding a declaration.

Parameters
declvariable declaration raw variant type holding a basic declaration

Definition at line 11 of file var_decl_def.hpp.

§ var_decl() [3/16]

stan::lang::var_decl::var_decl ( const nil decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 15 of file var_decl_def.hpp.

§ var_decl() [4/16]

stan::lang::var_decl::var_decl ( const int_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 17 of file var_decl_def.hpp.

§ var_decl() [5/16]

stan::lang::var_decl::var_decl ( const double_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 19 of file var_decl_def.hpp.

§ var_decl() [6/16]

stan::lang::var_decl::var_decl ( const vector_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 21 of file var_decl_def.hpp.

§ var_decl() [7/16]

stan::lang::var_decl::var_decl ( const row_vector_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 23 of file var_decl_def.hpp.

§ var_decl() [8/16]

stan::lang::var_decl::var_decl ( const matrix_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 25 of file var_decl_def.hpp.

§ var_decl() [9/16]

stan::lang::var_decl::var_decl ( const simplex_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 29 of file var_decl_def.hpp.

§ var_decl() [10/16]

stan::lang::var_decl::var_decl ( const unit_vector_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 27 of file var_decl_def.hpp.

§ var_decl() [11/16]

stan::lang::var_decl::var_decl ( const ordered_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 31 of file var_decl_def.hpp.

§ var_decl() [12/16]

stan::lang::var_decl::var_decl ( const positive_ordered_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 33 of file var_decl_def.hpp.

§ var_decl() [13/16]

stan::lang::var_decl::var_decl ( const cholesky_factor_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 35 of file var_decl_def.hpp.

§ var_decl() [14/16]

stan::lang::var_decl::var_decl ( const cholesky_corr_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 37 of file var_decl_def.hpp.

§ var_decl() [15/16]

stan::lang::var_decl::var_decl ( const cov_matrix_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 39 of file var_decl_def.hpp.

§ var_decl() [16/16]

stan::lang::var_decl::var_decl ( const corr_matrix_var_decl decl)

Construct a variable declaration with the specified basic declaration.

Parameters
declvariable declaration

Definition at line 41 of file var_decl_def.hpp.

Member Function Documentation

§ base_decl()

base_var_decl stan::lang::var_decl::base_decl ( ) const

Return the base declaration.

Returns
base variable declaration

Definition at line 47 of file var_decl_def.hpp.

§ def()

expression stan::lang::var_decl::def ( ) const

Return the definition included in this declaration.

Returns
the variable definition

Definition at line 59 of file var_decl_def.hpp.

§ dims()

std::vector< expression > stan::lang::var_decl::dims ( ) const

Return the sequence of array dimension sizes.

Returns
sequence of dimension sizes

Definition at line 51 of file var_decl_def.hpp.

§ has_def()

bool stan::lang::var_decl::has_def ( ) const

Return true if this declaration also contains a definition.

Returns
true if there is a definition

Definition at line 55 of file var_decl_def.hpp.

§ name()

std::string stan::lang::var_decl::name ( ) const

Return the declaration's variable name.

Returns
name of variable

Definition at line 43 of file var_decl_def.hpp.

Member Data Documentation

§ decl_

var_decl_t stan::lang::var_decl::decl_

The variable declaration variant type.

Definition at line 214 of file var_decl.hpp.


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

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