C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
exprtk::details::node_depth_base< Node > Struct Template Reference

Public Types

typedef Nodenode_ptr_t
 
typedef std::pair< node_ptr_t, boolnb_pair_t
 

Public Member Functions

 node_depth_base ()
 
virtual ~node_depth_base ()
 
virtual std::size_t node_depth () const
 
std::size_t compute_node_depth (const Node *const &node) const
 
std::size_t compute_node_depth (const nb_pair_t &branch) const
 
template<std::size_t N>
std::size_t compute_node_depth (const nb_pair_t(&branch)[N]) const
 
template<typename BranchType >
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1) const
 
template<typename BranchType >
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
template<typename BranchType >
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
template<typename BranchType >
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1) const
 
template<typename BranchType >
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
template<typename BranchType >
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
template<typename Allocator , template< typename, typename > class Sequence>
std::size_t compute_node_depth (const Sequence< node_ptr_t, Allocator > &branch_list) const
 
template<typename Allocator , template< typename, typename > class Sequence>
std::size_t compute_node_depth (const Sequence< nb_pair_t, Allocator > &branch_list) const
 
template<typename NodeSequence >
void collect (node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
 
template<typename NodeSequence >
void collect (const nb_pair_t &branch, NodeSequence &delete_node_list) const
 
template<typename NodeSequence >
void collect (Node *&node, NodeSequence &delete_node_list) const
 
template<std::size_t N, typename NodeSequence >
void collect (const nb_pair_t(&branch)[N], NodeSequence &delete_node_list) const
 
template<typename Allocator , template< typename, typename > class Sequence, typename NodeSequence >
void collect (const Sequence< nb_pair_t, Allocator > &branch, NodeSequence &delete_node_list) const
 
template<typename Allocator , template< typename, typename > class Sequence, typename NodeSequence >
void collect (const Sequence< node_ptr_t, Allocator > &branch_list, NodeSequence &delete_node_list) const
 
template<typename Boolean , typename AllocatorT , typename AllocatorB , template< typename, typename > class Sequence, typename NodeSequence >
void collect (const Sequence< node_ptr_t, AllocatorT > &branch_list, const Sequence< Boolean, AllocatorB > &branch_deletable_list, NodeSequence &delete_node_list) const
 

Public Attributes

bool depth_set
 
std::size_t depth
 

Detailed Description

template<typename Node>
struct exprtk::details::node_depth_base< Node >

Definition at line 6029 of file exprtk.hpp.

Member Typedef Documentation

◆ nb_pair_t

Definition at line 6032 of file exprtk.hpp.

◆ node_ptr_t

Definition at line 6031 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ node_depth_base()

template<typename Node >
exprtk::details::node_depth_base< Node >::node_depth_base ( )
inline

Definition at line 6034 of file exprtk.hpp.

6035 : depth_set(false)
6036 , depth(0)
6037 {}

◆ ~node_depth_base()

Definition at line 6039 of file exprtk.hpp.

6040 {}

Member Function Documentation

◆ collect() [1/7]

template<typename Node >
template<typename NodeSequence >
void exprtk::details::node_depth_base< Node >::collect ( const nb_pair_t branch,
NodeSequence delete_node_list 
) const
inline

Definition at line 6203 of file exprtk.hpp.

6205 {
6206 collect(branch.first, branch.second, delete_node_list);
6207 }
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition exprtk.hpp:598
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6192

References exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [2/7]

template<typename Node >
template<std::size_t N, typename NodeSequence >
void exprtk::details::node_depth_base< Node >::collect ( const nb_pair_t(&)  branch[N],
NodeSequence delete_node_list 
) const
inline

Definition at line 6217 of file exprtk.hpp.

6219 {
6220 for (std::size_t i = 0; i < N; ++i)
6221 {
6222 collect(branch[i].first, branch[i].second, delete_node_list);
6223 }
6224 }

References exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [3/7]

template<typename Node >
void exprtk::details::node_depth_base< Node >::collect ( const Sequence< nb_pair_t, Allocator > &  branch,
NodeSequence delete_node_list 
) const
inline

Definition at line 6229 of file exprtk.hpp.

6231 {
6232 for (std::size_t i = 0; i < branch.size(); ++i)
6233 {
6234 collect(branch[i].first, branch[i].second, delete_node_list);
6235 }
6236 }

References exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [4/7]

template<typename Node >
void exprtk::details::node_depth_base< Node >::collect ( const Sequence< node_ptr_t, Allocator > &  branch_list,
NodeSequence delete_node_list 
) const
inline

Definition at line 6241 of file exprtk.hpp.

6243 {
6244 for (std::size_t i = 0; i < branch_list.size(); ++i)
6245 {
6247 }
6248 }
bool branch_deletable(const expression_node< T > *node)
Definition exprtk.hpp:5852

References exprtk::details::branch_deletable(), exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [5/7]

template<typename Node >
void exprtk::details::node_depth_base< Node >::collect ( const Sequence< node_ptr_t, AllocatorT > &  branch_list,
const Sequence< Boolean, AllocatorB > &  branch_deletable_list,
NodeSequence delete_node_list 
) const
inline

Definition at line 6255 of file exprtk.hpp.

6258 {
6259 for (std::size_t i = 0; i < branch_list.size(); ++i)
6260 {
6262 }
6263 }

References exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [6/7]

template<typename Node >
template<typename NodeSequence >
void exprtk::details::node_depth_base< Node >::collect ( Node *&  node,
NodeSequence delete_node_list 
) const
inline

Definition at line 6210 of file exprtk.hpp.

References exprtk::details::branch_deletable(), exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ collect() [7/7]

template<typename Node >
template<typename NodeSequence >
void exprtk::details::node_depth_base< Node >::collect ( node_ptr_t const node,
const bool  deletable,
NodeSequence delete_node_list 
) const
inline

Definition at line 6192 of file exprtk.hpp.

6195 {
6196 if ((0 != node) && deletable)
6197 {
6198 delete_node_list.push_back(const_cast<node_ptr_t*>(&node));
6199 }
6200 }

References exprtk::details::match_impl().

Referenced by exprtk::details::node_depth_base< Node >::collect(), exprtk::details::node_depth_base< Node >::collect(), exprtk::details::node_depth_base< Node >::collect(), exprtk::details::node_depth_base< Node >::collect(), exprtk::details::node_depth_base< Node >::collect(), and exprtk::details::node_depth_base< Node >::collect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_node_depth() [1/8]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const BranchType n0,
const BranchType n1 
) const
inline

Definition at line 6111 of file exprtk.hpp.

6112 {
6113 if (!depth_set)
6114 {
6115 depth = 1 + max_node_depth(n0, n1);
6116 depth_set = true;
6117 }
6118
6119 return depth;
6120 }
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1) const
Definition exprtk.hpp:6089

References exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, exprtk::details::match_impl(), and exprtk::details::node_depth_base< Node >::max_node_depth().

Here is the call graph for this function:

◆ compute_node_depth() [2/8]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const BranchType n0,
const BranchType n1,
const BranchType n2 
) const
inline

Definition at line 6123 of file exprtk.hpp.

6125 {
6126 if (!depth_set)
6127 {
6128 depth = 1 + max_node_depth(n0, n1, n2);
6129 depth_set = true;
6130 }
6131
6132 return depth;
6133 }

References exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, exprtk::details::match_impl(), and exprtk::details::node_depth_base< Node >::max_node_depth().

Here is the call graph for this function:

◆ compute_node_depth() [3/8]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const BranchType n0,
const BranchType n1,
const BranchType n2,
const BranchType n3 
) const
inline

Definition at line 6136 of file exprtk.hpp.

6138 {
6139 if (!depth_set)
6140 {
6141 depth = 1 + max_node_depth(n0, n1, n2, n3);
6142 depth_set = true;
6143 }
6144
6145 return depth;
6146 }

References exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, exprtk::details::match_impl(), and exprtk::details::node_depth_base< Node >::max_node_depth().

Here is the call graph for this function:

◆ compute_node_depth() [4/8]

template<typename Node >
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const nb_pair_t branch) const
inline

Definition at line 6055 of file exprtk.hpp.

6056 {
6057 if (!depth_set)
6058 {
6059 depth = 1 + (branch.first ? branch.first->node_depth() : 0);
6060 depth_set = true;
6061 }
6062
6063 return depth;
6064 }

References exprtk::details::node_depth_base< Node >::depth, and exprtk::details::node_depth_base< Node >::depth_set.

◆ compute_node_depth() [5/8]

template<typename Node >
template<std::size_t N>
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const nb_pair_t(&)  branch[N]) const
inline

Definition at line 6067 of file exprtk.hpp.

6068 {
6069 if (!depth_set)
6070 {
6071 depth = 0;
6072
6073 for (std::size_t i = 0; i < N; ++i)
6074 {
6075 if (branch[i].first)
6076 {
6077 depth = std::max(depth,branch[i].first->node_depth());
6078 }
6079 }
6080
6081 depth += 1;
6082 depth_set = true;
6083 }
6084
6085 return depth;
6086 }

References exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, and exprtk::details::match_impl().

Here is the call graph for this function:

◆ compute_node_depth() [6/8]

template<typename Node >
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const Node *const node) const
inline

Definition at line 6044 of file exprtk.hpp.

6045 {
6046 if (!depth_set)
6047 {
6048 depth = 1 + (node ? node->node_depth() : 0);
6049 depth_set = true;
6050 }
6051
6052 return depth;
6053 }

References exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, and exprtk::details::match_impl().

Referenced by exprtk::details::node_depth_base< Node >::compute_node_depth(), exprtk::details::node_depth_base< Node >::compute_node_depth(), exprtk::details::node_depth_base< Node >::max_node_depth(), exprtk::details::node_depth_base< Node >::max_node_depth(), and exprtk::details::node_depth_base< Node >::max_node_depth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_node_depth() [7/8]

template<typename Node >
template<typename Allocator , template< typename, typename > class Sequence>
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const Sequence< nb_pair_t, Allocator > &  branch_list) const
inline

Definition at line 6170 of file exprtk.hpp.

6171 {
6172 if (!depth_set)
6173 {
6174 for (std::size_t i = 0; i < branch_list.size(); ++i)
6175 {
6176 if (branch_list[i].first)
6177 {
6179 }
6180 }
6181
6182 depth_set = true;
6183 }
6184
6185 return depth;
6186 }
std::size_t compute_node_depth(const Node *const &node) const
Definition exprtk.hpp:6044

References exprtk::details::node_depth_base< Node >::compute_node_depth(), exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, and exprtk::details::match_impl().

Here is the call graph for this function:

◆ compute_node_depth() [8/8]

template<typename Node >
template<typename Allocator , template< typename, typename > class Sequence>
std::size_t exprtk::details::node_depth_base< Node >::compute_node_depth ( const Sequence< node_ptr_t, Allocator > &  branch_list) const
inline

Definition at line 6150 of file exprtk.hpp.

6151 {
6152 if (!depth_set)
6153 {
6154 for (std::size_t i = 0; i < branch_list.size(); ++i)
6155 {
6156 if (branch_list[i])
6157 {
6159 }
6160 }
6161
6162 depth_set = true;
6163 }
6164
6165 return depth;
6166 }

References exprtk::details::node_depth_base< Node >::compute_node_depth(), exprtk::details::node_depth_base< Node >::depth, exprtk::details::node_depth_base< Node >::depth_set, and exprtk::details::match_impl().

Here is the call graph for this function:

◆ max_node_depth() [1/3]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::max_node_depth ( const BranchType n0,
const BranchType n1 
) const
inline

Definition at line 6089 of file exprtk.hpp.

6090 {
6091 return std::max(compute_node_depth(n0), compute_node_depth(n1));
6092 }

References exprtk::details::node_depth_base< Node >::compute_node_depth(), and exprtk::details::match_impl().

Referenced by exprtk::details::node_depth_base< Node >::compute_node_depth(), exprtk::details::node_depth_base< Node >::compute_node_depth(), and exprtk::details::node_depth_base< Node >::compute_node_depth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_node_depth() [2/3]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::max_node_depth ( const BranchType n0,
const BranchType n1,
const BranchType n2 
) const
inline

Definition at line 6095 of file exprtk.hpp.

6096 {
6097 return std::max(compute_node_depth(n0),
6099 }

References exprtk::details::node_depth_base< Node >::compute_node_depth(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ max_node_depth() [3/3]

template<typename Node >
template<typename BranchType >
std::size_t exprtk::details::node_depth_base< Node >::max_node_depth ( const BranchType n0,
const BranchType n1,
const BranchType n2,
const BranchType n3 
) const
inline

Definition at line 6102 of file exprtk.hpp.

6104 {
6105 return std::max(
6108 }

References exprtk::details::node_depth_base< Node >::compute_node_depth(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ node_depth()

template<typename Node >
virtual std::size_t exprtk::details::node_depth_base< Node >::node_depth ( ) const
inlinevirtual

Reimplemented in exprtk::details::null_eq_node< T >, exprtk::details::unary_node< T >, exprtk::details::binary_node< T >, exprtk::details::binary_ext_node< T, Operation >, exprtk::details::trinary_node< T >, exprtk::details::quaternary_node< T >, exprtk::details::conditional_node< T >, exprtk::details::cons_conditional_node< T >, exprtk::details::break_node< T >, exprtk::details::while_loop_node< T >, exprtk::details::repeat_until_loop_node< T >, exprtk::details::for_loop_node< T >, exprtk::details::switch_node< T >, exprtk::details::multi_switch_node< T >, exprtk::details::vector_elem_node< T >, exprtk::details::vector_celem_node< T >, exprtk::details::vector_elem_rtc_node< T >, exprtk::details::vector_celem_rtc_node< T >, exprtk::details::rebasevector_elem_node< T >, exprtk::details::rebasevector_celem_node< T >, exprtk::details::rebasevector_elem_rtc_node< T >, exprtk::details::rebasevector_celem_rtc_node< T >, exprtk::details::vector_initialisation_node< T >, exprtk::details::vector_init_zero_value_node< T >, exprtk::details::vector_init_single_constvalue_node< T >, exprtk::details::vector_init_single_value_node< T >, exprtk::details::vector_init_iota_constconst_node< T >, exprtk::details::vector_init_iota_constnconst_node< T >, exprtk::details::vector_init_iota_nconstconst_node< T >, exprtk::details::vector_init_iota_nconstnconst_node< T >, exprtk::details::generic_string_range_node< T >, exprtk::details::string_size_node< T >, exprtk::details::str_vararg_node< T, VarArgFunction >, exprtk::details::assert_node< T >, exprtk::details::vararg_node< T, VarArgFunction >, exprtk::details::vectorize_node< T, VecFunction >, exprtk::details::conditional_vector_node< T >, exprtk::details::function_N_node< T, IFunction, N >, exprtk::details::vararg_function_node< T, VarArgFunction >, exprtk::details::generic_function_node< T, GenericFunction >, exprtk::details::generic_function_node< T, null_igenfunc< T > >, exprtk::details::generic_function_node< T, StringFunction >, exprtk::details::return_envelope_node< T >, exprtk::details::unary_branch_node< T, Operation >, exprtk::details::vob_node< T, Operation >, exprtk::details::bov_node< T, Operation >, exprtk::details::cob_node< T, Operation >, exprtk::details::boc_node< T, Operation >, exprtk::details::bipow_node< T, PowOp >, and exprtk::details::bipowinv_node< T, PowOp >.

Definition at line 6042 of file exprtk.hpp.

6042{ return 1; }

Referenced by exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate(), exprtk::details::node_allocator::allocate_c(), exprtk::details::node_allocator::allocate_cr(), exprtk::details::node_allocator::allocate_rc(), exprtk::details::node_allocator::allocate_rr(), exprtk::details::node_allocator::allocate_rrr(), exprtk::details::node_allocator::allocate_rrrr(), exprtk::details::node_allocator::allocate_rrrrr(), exprtk::details::node_allocator::allocate_tt(), exprtk::details::node_allocator::allocate_ttt(), exprtk::details::node_allocator::allocate_tttt(), exprtk::details::node_allocator::allocate_type(), exprtk::details::node_allocator::allocate_type(), exprtk::details::node_allocator::allocate_type(), exprtk::details::node_allocator::allocate_type(), and exprtk::details::node_allocator::allocate_type().

Here is the caller graph for this function:

Member Data Documentation

◆ depth

template<typename Node >
std::size_t exprtk::details::node_depth_base< Node >::depth
mutable

◆ depth_set

template<typename Node >
bool exprtk::details::node_depth_base< Node >::depth_set
mutable

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