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

AST node for assignment to variable with multi-indexing. More...

#include <assgn.hpp>

Public Member Functions

 assgn ()
 Construct an uninitialized assignment statement. More...
 
 assgn (const variable &lhs_var, const std::vector< idx > &idxs, const expression &rhs)
 Constrcut an assignment statement with the specified variable, indexing, and right-hand side expression. More...
 
bool lhs_var_occurs_on_rhs () const
 Return true if the variable being assigned is a subexpression of the value expression. More...
 

Public Attributes

variable lhs_var_
 The variable being assigned. More...
 
std::vector< idxidxs_
 Position(s) in variable being assigned. More...
 
expression rhs_
 Value being assigned to left hand side variable at indexing position. More...
 

Detailed Description

AST node for assignment to variable with multi-indexing.

Definition at line 15 of file assgn.hpp.

Constructor & Destructor Documentation

§ assgn() [1/2]

stan::lang::assgn::assgn ( )

Construct an uninitialized assignment statement.

Definition at line 10 of file assgn_def.hpp.

§ assgn() [2/2]

stan::lang::assgn::assgn ( const variable lhs_var,
const std::vector< idx > &  idxs,
const expression rhs 
)

Constrcut an assignment statement with the specified variable, indexing, and right-hand side expression.

Parameters
[in]lhs_varvariable being assigned
[in]idxssequence of indexes indicating element being assigned
[in]rhsvalue of assignment

Definition at line 12 of file assgn_def.hpp.

Member Function Documentation

§ lhs_var_occurs_on_rhs()

bool stan::lang::assgn::lhs_var_occurs_on_rhs ( ) const

Return true if the variable being assigned is a subexpression of the value expression.

Returns
true if the assigned variable appears in the value expression

Definition at line 16 of file assgn_def.hpp.

Member Data Documentation

§ idxs_

std::vector<idx> stan::lang::assgn::idxs_

Position(s) in variable being assigned.

Definition at line 50 of file assgn.hpp.

§ lhs_var_

variable stan::lang::assgn::lhs_var_

The variable being assigned.

Definition at line 45 of file assgn.hpp.

§ rhs_

expression stan::lang::assgn::rhs_

Value being assigned to left hand side variable at indexing position.

Definition at line 56 of file assgn.hpp.


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

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