OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Types | Public Member Functions | Public Attributes | List of all members
matheval::detail::binary_op< real_t > Struct Template Reference

Store a binary operator and its argument trees. More...

#include <matheval.hpp>

Public Types

using op_t = std::function< real_t(real_t, real_t)>
 Signature of a binary operator: op(x,y)
 

Public Member Functions

 binary_op (op_t op, expr_ast< real_t > lhs, expr_ast< real_t > rhs)
 Save the operator and the argument trees.
 
 binary_op (const binary_op &other)
 
 binary_op (binary_op &&) noexcept=default
 
binary_opoperator= (const binary_op &other)
 
binary_opoperator= (binary_op &&) noexcept=default
 

Public Attributes

op_t op
 Stored operator.
 
std::unique_ptr< expr_ast< real_t > > lhs
 Stored argument tree of first argument.
 
std::unique_ptr< expr_ast< real_t > > rhs
 Stored argument tree of second argument.
 

Detailed Description

template<typename real_t>
struct matheval::detail::binary_op< real_t >

Store a binary operator and its argument trees.

Definition at line 211 of file matheval.hpp.

Member Typedef Documentation

◆ op_t

template<typename real_t >
using matheval::detail::binary_op< real_t >::op_t = std::function<real_t(real_t, real_t)>

Signature of a binary operator: op(x,y)

Definition at line 214 of file matheval.hpp.

Constructor & Destructor Documentation

◆ binary_op() [1/3]

template<typename real_t >
matheval::detail::binary_op< real_t >::binary_op ( op_t  op,
expr_ast< real_t >  lhs,
expr_ast< real_t >  rhs 
)
inline

Save the operator and the argument trees.

Definition at line 217 of file matheval.hpp.

◆ binary_op() [2/3]

template<typename real_t >
matheval::detail::binary_op< real_t >::binary_op ( const binary_op< real_t > &  other)
inline

Definition at line 223 of file matheval.hpp.

◆ binary_op() [3/3]

template<typename real_t >
matheval::detail::binary_op< real_t >::binary_op ( binary_op< real_t > &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<typename real_t >
binary_op & matheval::detail::binary_op< real_t >::operator= ( binary_op< real_t > &&  )
defaultnoexcept

◆ operator=() [2/2]

template<typename real_t >
binary_op & matheval::detail::binary_op< real_t >::operator= ( const binary_op< real_t > &  other)
inline

Member Data Documentation

◆ lhs

template<typename real_t >
std::unique_ptr<expr_ast<real_t> > matheval::detail::binary_op< real_t >::lhs

Stored argument tree of first argument.

Definition at line 246 of file matheval.hpp.

Referenced by matheval::detail::eval_ast< real_t >::operator()(), and matheval::detail::ConstantFolder< real_t >::operator()().

◆ op

template<typename real_t >
op_t matheval::detail::binary_op< real_t >::op

◆ rhs

template<typename real_t >
std::unique_ptr<expr_ast<real_t> > matheval::detail::binary_op< real_t >::rhs

Stored argument tree of second argument.

Definition at line 249 of file matheval.hpp.

Referenced by matheval::detail::eval_ast< real_t >::operator()(), and matheval::detail::ConstantFolder< real_t >::operator()().


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