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

Structure of the type of an expression, which consists of a base type and a number of dimensions. More...

#include <expr_type.hpp>

Public Member Functions

 expr_type ()
 Construct an empty expression type. More...
 
 expr_type (const base_expr_type base_type)
 Construct an expression type with the specified base type and zero array dimensions. More...
 
 expr_type (const base_expr_type base_type, std::size_t num_dims)
 Construct an expression type with the specified base type and specified number of array dimensions. More...
 
bool operator== (const expr_type &et) const
 Return true if the specified expression type is equal to this expression type in the sense of having the same base type and same number of dimensions. More...
 
bool operator!= (const expr_type &et) const
 Return true if this expression type is not equal to the specified expression type. More...
 
bool operator< (const expr_type &et) const
 Return true if this expression type is less than the specified expression type. More...
 
bool operator<= (const expr_type &et) const
 Return true if this expression type is less than or equal to the specified expression type. More...
 
bool operator> (const expr_type &et) const
 Return true if this expression type is greater than the specified expression type. More...
 
bool operator>= (const expr_type &et) const
 Return true if this expression type is greater than or equal to the specified expression type. More...
 
bool is_primitive () const
 Return true if this expression type is an integer or real type with zero dimensions. More...
 
bool is_primitive_int () const
 Return true if this expression type is an integer type with zero dimensions. More...
 
bool is_primitive_double () const
 Return true if this expression type is a real type with zero dimensions. More...
 
bool is_ill_formed () const
 Return true if the base type of this type is ill formed. More...
 
bool is_void () const
 Return true if this type is void. More...
 
base_expr_type type () const
 Return the base type of this expression type. More...
 
std::size_t num_dims () const
 Return the number of dimensions for this type. More...
 

Public Attributes

base_expr_type base_type_
 The base expression type. More...
 
std::size_t num_dims_
 The number of array dimensions. More...
 

Detailed Description

Structure of the type of an expression, which consists of a base type and a number of dimensions.

Definition at line 14 of file expr_type.hpp.

Constructor & Destructor Documentation

§ expr_type() [1/3]

stan::lang::expr_type::expr_type ( )

Construct an empty expression type.

Definition at line 12 of file expr_type_def.hpp.

§ expr_type() [2/3]

stan::lang::expr_type::expr_type ( const base_expr_type  base_type)

Construct an expression type with the specified base type and zero array dimensions.

Parameters
base_typebase type

Definition at line 14 of file expr_type_def.hpp.

§ expr_type() [3/3]

stan::lang::expr_type::expr_type ( const base_expr_type  base_type,
std::size_t  num_dims 
)

Construct an expression type with the specified base type and specified number of array dimensions.

Parameters
base_typebase type
num_dimsnumber of dimensions

Member Function Documentation

§ is_ill_formed()

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

Return true if the base type of this type is ill formed.

Returns
bool if this type is ill formed

Definition at line 60 of file expr_type_def.hpp.

§ is_primitive()

bool stan::lang::expr_type::is_primitive ( ) const

Return true if this expression type is an integer or real type with zero dimensions.

Returns
true if this expression type is an integer or real with zero dimensions

Definition at line 48 of file expr_type_def.hpp.

§ is_primitive_double()

bool stan::lang::expr_type::is_primitive_double ( ) const

Return true if this expression type is a real type with zero dimensions.

Returns
true if this expression type is a real with zero dimensions

Definition at line 56 of file expr_type_def.hpp.

§ is_primitive_int()

bool stan::lang::expr_type::is_primitive_int ( ) const

Return true if this expression type is an integer type with zero dimensions.

Returns
true if this expression type is an integer with zero dimensions

Definition at line 52 of file expr_type_def.hpp.

§ is_void()

bool stan::lang::expr_type::is_void ( ) const

Return true if this type is void.

Returns
bool if this type is void

Definition at line 64 of file expr_type_def.hpp.

§ num_dims()

size_t stan::lang::expr_type::num_dims ( ) const

Return the number of dimensions for this type.

Returns
number of dimensions for this type

Definition at line 72 of file expr_type_def.hpp.

§ operator!=()

bool stan::lang::expr_type::operator!= ( const expr_type et) const

Return true if this expression type is not equal to the specified expression type.

Parameters
etOther expression type.
Returns
result of equality test.

Definition at line 24 of file expr_type_def.hpp.

§ operator<()

bool stan::lang::expr_type::operator< ( const expr_type et) const

Return true if this expression type is less than the specified expression type.

Types are ordered lexicographically by the integer value of their base type and then their number of dimensions.

Parameters
etOther expression type.
Returns
result of inequality test.

Definition at line 28 of file expr_type_def.hpp.

§ operator<=()

bool stan::lang::expr_type::operator<= ( const expr_type et) const

Return true if this expression type is less than or equal to the specified expression type.

Parameters
etOther expression type.
Returns
result of inequality test.

Definition at line 33 of file expr_type_def.hpp.

§ operator==()

bool stan::lang::expr_type::operator== ( const expr_type et) const

Return true if the specified expression type is equal to this expression type in the sense of having the same base type and same number of dimensions.

Parameters
etOther expression type.
Returns
result of equality test.

Definition at line 20 of file expr_type_def.hpp.

§ operator>()

bool stan::lang::expr_type::operator> ( const expr_type et) const

Return true if this expression type is greater than the specified expression type.

Parameters
etOther expression type.
Returns
result of inequality test.

Definition at line 38 of file expr_type_def.hpp.

§ operator>=()

bool stan::lang::expr_type::operator>= ( const expr_type et) const

Return true if this expression type is greater than or equal to the specified expression type.

Parameters
etOther expression type.
Returns
result of inequality test.

Definition at line 43 of file expr_type_def.hpp.

§ type()

base_expr_type stan::lang::expr_type::type ( ) const

Return the base type of this expression type.

Returns
base type of this type

Definition at line 68 of file expr_type_def.hpp.

Member Data Documentation

§ base_type_

base_expr_type stan::lang::expr_type::base_type_

The base expression type.

Definition at line 18 of file expr_type.hpp.

§ num_dims_

std::size_t stan::lang::expr_type::num_dims_

The number of array dimensions.

Definition at line 23 of file expr_type.hpp.


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

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