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

Member Typedef Documentation

◆ nb_pair_t

Definition at line 6177 of file exprtk.hpp.

◆ node_ptr_t

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

6180 : depth_set(false)
6181 , depth(0)
6182 {}

◆ ~node_depth_base()

Definition at line 6184 of file exprtk.hpp.

6185 {}

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

6350 {
6351 collect(branch.first, branch.second, delete_node_list);
6352 }
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:605
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6337

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

6364 {
6365 for (std::size_t i = 0; i < N; ++i)
6366 {
6367 collect(branch[i].first, branch[i].second, delete_node_list);
6368 }
6369 }

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

6376 {
6377 for (std::size_t i = 0; i < branch.size(); ++i)
6378 {
6379 collect(branch[i].first, branch[i].second, delete_node_list);
6380 }
6381 }

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

6388 {
6389 for (std::size_t i = 0; i < branch_list.size(); ++i)
6390 {
6392 }
6393 }
bool branch_deletable(const expression_node< T > *node)
Definition exprtk.hpp:5997

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

6403 {
6404 for (std::size_t i = 0; i < branch_list.size(); ++i)
6405 {
6407 }
6408 }

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

6340 {
6341 if ((0 != node) && deletable)
6342 {
6343 delete_node_list.push_back(const_cast<node_ptr_t*>(&node));
6344 }
6345 }

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

6257 {
6258 if (!depth_set)
6259 {
6260 depth = 1 + max_node_depth(n0, n1);
6261 depth_set = true;
6262 }
6263
6264 return depth;
6265 }
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1) const
Definition exprtk.hpp:6234

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

6270 {
6271 if (!depth_set)
6272 {
6273 depth = 1 + max_node_depth(n0, n1, n2);
6274 depth_set = true;
6275 }
6276
6277 return depth;
6278 }

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

6283 {
6284 if (!depth_set)
6285 {
6286 depth = 1 + max_node_depth(n0, n1, n2, n3);
6287 depth_set = true;
6288 }
6289
6290 return depth;
6291 }

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

6201 {
6202 if (!depth_set)
6203 {
6204 depth = 1 + (branch.first ? branch.first->node_depth() : 0);
6205 depth_set = true;
6206 }
6207
6208 return depth;
6209 }

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

6213 {
6214 if (!depth_set)
6215 {
6216 depth = 0;
6217
6218 for (std::size_t i = 0; i < N; ++i)
6219 {
6220 if (branch[i].first)
6221 {
6222 depth = std::max(depth,branch[i].first->node_depth());
6223 }
6224 }
6225
6226 depth += 1;
6227 depth_set = true;
6228 }
6229
6230 return depth;
6231 }

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

6190 {
6191 if (!depth_set)
6192 {
6193 depth = 1 + (node ? node->node_depth() : 0);
6194 depth_set = true;
6195 }
6196
6197 return depth;
6198 }

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

6316 {
6317 if (!depth_set)
6318 {
6319 for (std::size_t i = 0; i < branch_list.size(); ++i)
6320 {
6321 if (branch_list[i].first)
6322 {
6324 }
6325 }
6326
6327 depth_set = true;
6328 }
6329
6330 return depth;
6331 }
std::size_t compute_node_depth(const Node *const &node) const
Definition exprtk.hpp:6189

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

6296 {
6297 if (!depth_set)
6298 {
6299 for (std::size_t i = 0; i < branch_list.size(); ++i)
6300 {
6301 if (branch_list[i])
6302 {
6304 }
6305 }
6306
6307 depth_set = true;
6308 }
6309
6310 return depth;
6311 }

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

6235 {
6236 return std::max(compute_node_depth(n0), compute_node_depth(n1));
6237 }

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

6241 {
6242 return std::max(compute_node_depth(n0),
6244 }

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

6249 {
6250 return std::max(
6253 }

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

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