Stan  2.14.0
probability, sampling & optimization
binary_op_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_BINARY_OP_DEF_HPP
2 #define STAN_LANG_AST_NODE_BINARY_OP_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <string>
6 
7 namespace stan {
8  namespace lang {
9 
11 
12  binary_op::binary_op(const expression& left, const std::string& op,
13  const expression& right)
14  : op(op), left(left), right(right),
15  type_(promote_primitive(left.expression_type(),
16  right.expression_type())) {
17  }
18 
19  }
20 }
21 #endif
Probability, optimization and sampling library.
binary_op()
Construct a default binary operation.
expr_type type_
Type of result.
Definition: binary_op.hpp:34
expression left
First argument.
Definition: binary_op.hpp:24
expr_type promote_primitive(const expr_type &et)
expression right
Second argument.
Definition: binary_op.hpp:29
std::string op
String representation of the operation.
Definition: binary_op.hpp:19

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