expression_tree  3.2
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | List of all members
expression_tree::tree< T, CachingPolicy, ThreadingPolicy > Class Template Reference

Implements an expression tree. More...

#include <expression_tree.h>

Inheritance diagram for expression_tree::tree< T, CachingPolicy, ThreadingPolicy >:
Inheritance graph
[legend]
Collaboration diagram for expression_tree::tree< T, CachingPolicy, ThreadingPolicy >:
Collaboration graph
[legend]

Public Member Functions

node< T, CachingPolicy,
ThreadingPolicy > & 
root ()
 This tree's root node.
 
- Public Member Functions inherited from expression_tree::node< T, CachingPolicy, ThreadingPolicy >
 node (node< T, CachingPolicy, ThreadingPolicy > *parent=0)
 Default constructor.
 
 node (const node< T, CachingPolicy, ThreadingPolicy > &other)
 Copy constructor.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
operator= (const node< T, CachingPolicy, ThreadingPolicy > &other)
 Assignment operator.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
operator= (const T &t)
 Assign a value to this node.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
operator= (const T *t)
 Assign a pointer to this node.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
operator= (const typename detail::operation< T >::t &f)
 Assign an operation to this node.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
left ()
 This node's left child.
 
node< T, CachingPolicy,
ThreadingPolicy > & 
right ()
 This node's right child.
 
bool constant () const
 Constness of this node.
 
evaluate () const
 Evaluates the value of this node.
 
void grow ()
 Called when this node is assigned to.
 

Detailed Description

template<typename T, template< typename, typename > class CachingPolicy = no_caching, class ThreadingPolicy = sequential>
class expression_tree::tree< T, CachingPolicy, ThreadingPolicy >

Implements an expression tree.

Parameters
TThe data type.
CachingPolicyCaching optimization policy to use. Choices are:
ThreadingPolicyThreading policy to use when evaluating a branch's children. Choices are:
  • sequential: evaluate children on after the after on a single thread.
  • parallel: evaluate children in parallel as hardware permits using std::async.

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