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

Structure to hold a variable. More...

#include <variable.hpp>

Public Member Functions

 variable ()
 Construct a default variable. More...
 
 variable (const std::string &name)
 Construct a variable with the specified name and nil type. More...
 
void set_type (const base_expr_type &base_type, std::size_t num_dims)
 Set the type of the variable to the expression type with the specified base type and number of dimensions. More...
 

Public Attributes

std::string name_
 Name of variable. More...
 
expr_type type_
 Type of variable. More...
 

Detailed Description

Structure to hold a variable.

Definition at line 14 of file variable.hpp.

Constructor & Destructor Documentation

§ variable() [1/2]

stan::lang::variable::variable ( )

Construct a default variable.

Definition at line 10 of file variable_def.hpp.

§ variable() [2/2]

stan::lang::variable::variable ( const std::string &  name)

Construct a variable with the specified name and nil type.

Parameters
namevariable name

Definition at line 12 of file variable_def.hpp.

Member Function Documentation

§ set_type()

void stan::lang::variable::set_type ( const base_expr_type base_type,
std::size_t  num_dims 
)

Set the type of the variable to the expression type with the specified base type and number of dimensions.

Parameters
base_typebase type for variable
num_dimsnumber of array dims for variable

Definition at line 14 of file variable_def.hpp.

Member Data Documentation

§ name_

std::string stan::lang::variable::name_

Name of variable.

Definition at line 18 of file variable.hpp.

§ type_

expr_type stan::lang::variable::type_

Type of variable.

Definition at line 23 of file variable.hpp.


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

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