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 5942 of file exprtk.hpp.

Member Typedef Documentation

◆ nb_pair_t

Definition at line 5945 of file exprtk.hpp.

◆ node_ptr_t

Definition at line 5944 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 5947 of file exprtk.hpp.

5948 : depth_set(false)
5949 , depth(0)
5950 {}

◆ ~node_depth_base()

Definition at line 5952 of file exprtk.hpp.

5953 {}

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 6115 of file exprtk.hpp.

6117 {
6118 collect(branch.first, branch.second, delete_node_list);
6119 }
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:591
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6104

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 6129 of file exprtk.hpp.

6131 {
6132 for (std::size_t i = 0; i < N; ++i)
6133 {
6134 collect(branch[i].first, branch[i].second, delete_node_list);
6135 }
6136 }

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 6141 of file exprtk.hpp.

6143 {
6144 for (std::size_t i = 0; i < branch.size(); ++i)
6145 {
6146 collect(branch[i].first, branch[i].second, delete_node_list);
6147 }
6148 }

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 6153 of file exprtk.hpp.

6155 {
6156 for (std::size_t i = 0; i < branch_list.size(); ++i)
6157 {
6159 }
6160 }
bool branch_deletable(const expression_node< T > *node)
Definition exprtk.hpp:5765

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 6167 of file exprtk.hpp.

6170 {
6171 for (std::size_t i = 0; i < branch_list.size(); ++i)
6172 {
6174 }
6175 }

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 6122 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 6104 of file exprtk.hpp.

6107 {
6108 if ((0 != node) && deletable)
6109 {
6110 delete_node_list.push_back(const_cast<node_ptr_t*>(&node));
6111 }
6112 }

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 6024 of file exprtk.hpp.

6025 {
6026 if (!depth_set)
6027 {
6028 depth = 1 + max_node_depth(n0, n1);
6029 depth_set = true;
6030 }
6031
6032 return depth;
6033 }
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1) const
Definition exprtk.hpp:6002

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 6036 of file exprtk.hpp.

6038 {
6039 if (!depth_set)
6040 {
6041 depth = 1 + max_node_depth(n0, n1, n2);
6042 depth_set = true;
6043 }
6044
6045 return depth;
6046 }

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 6049 of file exprtk.hpp.

6051 {
6052 if (!depth_set)
6053 {
6054 depth = 1 + max_node_depth(n0, n1, n2, n3);
6055 depth_set = true;
6056 }
6057
6058 return depth;
6059 }

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 5968 of file exprtk.hpp.

5969 {
5970 if (!depth_set)
5971 {
5972 depth = 1 + (branch.first ? branch.first->node_depth() : 0);
5973 depth_set = true;
5974 }
5975
5976 return depth;
5977 }

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 5980 of file exprtk.hpp.

5981 {
5982 if (!depth_set)
5983 {
5984 depth = 0;
5985
5986 for (std::size_t i = 0; i < N; ++i)
5987 {
5988 if (branch[i].first)
5989 {
5990 depth = std::max(depth,branch[i].first->node_depth());
5991 }
5992 }
5993
5994 depth += 1;
5995 depth_set = true;
5996 }
5997
5998 return depth;
5999 }

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 5957 of file exprtk.hpp.

5958 {
5959 if (!depth_set)
5960 {
5961 depth = 1 + (node ? node->node_depth() : 0);
5962 depth_set = true;
5963 }
5964
5965 return depth;
5966 }

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 6082 of file exprtk.hpp.

6083 {
6084 if (!depth_set)
6085 {
6086 for (std::size_t i = 0; i < branch_list.size(); ++i)
6087 {
6088 if (branch_list[i].first)
6089 {
6091 }
6092 }
6093
6094 depth_set = true;
6095 }
6096
6097 return depth;
6098 }
std::size_t compute_node_depth(const Node *const &node) const
Definition exprtk.hpp:5957

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 6063 of file exprtk.hpp.

6064 {
6065 if (!depth_set)
6066 {
6067 for (std::size_t i = 0; i < branch_list.size(); ++i)
6068 {
6069 if (branch_list[i])
6070 {
6072 }
6073 }
6074 depth_set = true;
6075 }
6076
6077 return depth;
6078 }

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 6002 of file exprtk.hpp.

6003 {
6004 return std::max(compute_node_depth(n0), compute_node_depth(n1));
6005 }

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 6008 of file exprtk.hpp.

6009 {
6010 return std::max(compute_node_depth(n0),
6012 }

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 6015 of file exprtk.hpp.

6017 {
6018 return std::max(
6021 }

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_assignment_node< T >, exprtk::details::generic_string_range_node< T >, exprtk::details::string_size_node< T >, exprtk::details::str_vararg_node< T, VarArgFunction >, 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 5955 of file exprtk.hpp.

5955{ 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: