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

AST node for sampling statements. More...

#include <sample.hpp>

Public Member Functions

 sample ()
 Construct an uninitialized sampling statement. More...
 
 sample (expression &e, distribution &dist)
 Construct a sampling statement with the specified variate and distribution. More...
 
bool is_ill_formed () const
 Return true if the sampling statement is not well formed. More...
 
bool is_discrete () const
 Return true if the distribution is discrete. More...
 

Public Attributes

expression expr_
 The random variable. More...
 
distribution dist_
 Distribution of the variable. More...
 
range truncation_
 The truncation range for the distribution. More...
 
bool is_discrete_
 Discreteness flag. More...
 

Detailed Description

AST node for sampling statements.

Definition at line 17 of file sample.hpp.

Constructor & Destructor Documentation

§ sample() [1/2]

stan::lang::sample::sample ( )

Construct an uninitialized sampling statement.

Definition at line 10 of file sample_def.hpp.

§ sample() [2/2]

stan::lang::sample::sample ( expression e,
distribution dist 
)

Construct a sampling statement with the specified variate and distribution.

Parameters
erandom variate
distdistribution for variate

Definition at line 12 of file sample_def.hpp.

Member Function Documentation

§ is_discrete()

bool stan::lang::sample::is_discrete ( ) const

Return true if the distribution is discrete.

Returns
true if the distribution is discrete.

Definition at line 24 of file sample_def.hpp.

§ is_ill_formed()

bool stan::lang::sample::is_ill_formed ( ) const

Return true if the sampling statement is not well formed.

Returns
true if sampling statement is not well formed

Definition at line 15 of file sample_def.hpp.

Member Data Documentation

§ dist_

distribution stan::lang::sample::dist_

Distribution of the variable.

Definition at line 54 of file sample.hpp.

§ expr_

expression stan::lang::sample::expr_

The random variable.

Definition at line 49 of file sample.hpp.

§ is_discrete_

bool stan::lang::sample::is_discrete_

Discreteness flag.

Definition at line 64 of file sample.hpp.

§ truncation_

range stan::lang::sample::truncation_

The truncation range for the distribution.

Definition at line 59 of file sample.hpp.


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

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