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

#include <var_occurs_vis.hpp>

Inheritance diagram for stan::lang::var_occurs_vis:

Public Member Functions

 var_occurs_vis (const variable &e)
 Construct a visitor to detect whether the specified variable occurs in a statement. More...
 
bool operator() (const nil &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const int_literal &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const double_literal &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const array_expr &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const variable &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const fun &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const integrate_ode &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const integrate_ode_control &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const index_op &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const index_op_sliced &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const conditional_op &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const binary_op &e) const
 Return true if the variable occurs in the specified expression. More...
 
bool operator() (const unary_op &e) const
 Return true if the variable occurs in the specified expression. More...
 

Public Attributes

const std::string var_name_
 The name of the variable for which to search. More...
 

Detailed Description

Definition at line 24 of file var_occurs_vis.hpp.

Constructor & Destructor Documentation

§ var_occurs_vis()

stan::lang::var_occurs_vis::var_occurs_vis ( const variable e)
explicit

Construct a visitor to detect whether the specified variable occurs in a statement.

Parameters
evariable to detect

Definition at line 9 of file var_occurs_vis_def.hpp.

Member Function Documentation

§ operator()() [1/13]

bool stan::lang::var_occurs_vis::operator() ( const nil e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
false

Definition at line 13 of file var_occurs_vis_def.hpp.

§ operator()() [2/13]

bool stan::lang::var_occurs_vis::operator() ( const int_literal e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
false

Definition at line 17 of file var_occurs_vis_def.hpp.

§ operator()() [3/13]

bool stan::lang::var_occurs_vis::operator() ( const double_literal e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
false

Definition at line 21 of file var_occurs_vis_def.hpp.

§ operator()() [4/13]

bool stan::lang::var_occurs_vis::operator() ( const array_expr e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in any of the array expression elements

Definition at line 25 of file var_occurs_vis_def.hpp.

§ operator()() [5/13]

bool stan::lang::var_occurs_vis::operator() ( const variable e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if variable is equal to the specifed variable

Definition at line 29 of file var_occurs_vis_def.hpp.

§ operator()() [6/13]

bool stan::lang::var_occurs_vis::operator() ( const fun e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the arguments

Definition at line 33 of file var_occurs_vis_def.hpp.

§ operator()() [7/13]

bool stan::lang::var_occurs_vis::operator() ( const integrate_ode e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the arguments

Definition at line 40 of file var_occurs_vis_def.hpp.

§ operator()() [8/13]

bool stan::lang::var_occurs_vis::operator() ( const integrate_ode_control e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the arguments

Definition at line 44 of file var_occurs_vis_def.hpp.

§ operator()() [9/13]

bool stan::lang::var_occurs_vis::operator() ( const index_op e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the variable being indexed or in any of the indexes

Definition at line 48 of file var_occurs_vis_def.hpp.

§ operator()() [10/13]

bool stan::lang::var_occurs_vis::operator() ( const index_op_sliced e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the variable being indexed or in any of the indexes

Definition at line 53 of file var_occurs_vis_def.hpp.

§ operator()() [11/13]

bool stan::lang::var_occurs_vis::operator() ( const conditional_op e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the conditional or result expressions

Definition at line 57 of file var_occurs_vis_def.hpp.

§ operator()() [12/13]

bool stan::lang::var_occurs_vis::operator() ( const binary_op e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in either of the operands

Definition at line 63 of file var_occurs_vis_def.hpp.

§ operator()() [13/13]

bool stan::lang::var_occurs_vis::operator() ( const unary_op e) const

Return true if the variable occurs in the specified expression.

Parameters
[in]eexpression
Returns
true if the variable occurs in the operand

Definition at line 68 of file var_occurs_vis_def.hpp.

Member Data Documentation

§ var_name_

const std::string stan::lang::var_occurs_vis::var_name_

The name of the variable for which to search.

Definition at line 157 of file var_occurs_vis.hpp.


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

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