C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::details::node_depth_base< Node > Struct Template Reference

#include <exprtk.hpp>

Inheritance diagram for exprtk::details::node_depth_base< Node >:
[legend]

Public Types

typedef Node * node_ptr_t
typedef std::pair< node_ptr_t, bool > nb_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 6195 of file exprtk.hpp.

Member Typedef Documentation

◆ nb_pair_t

template<typename Node>
typedef std::pair<node_ptr_t,bool> exprtk::details::node_depth_base< Node >::nb_pair_t

Definition at line 6198 of file exprtk.hpp.

◆ node_ptr_t

template<typename Node>
typedef Node* exprtk::details::node_depth_base< Node >::node_ptr_t

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

6201 : depth_set(false)
6202 , depth(0)
6203 {}

◆ ~node_depth_base()

template<typename Node>
virtual exprtk::details::node_depth_base< Node >::~node_depth_base ( )
inlinevirtual

Definition at line 6205 of file exprtk.hpp.

6206 {}

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

6371 {
6372 collect(branch.first, branch.second, delete_node_list);
6373 }
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6358

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

6385 {
6386 for (std::size_t i = 0; i < N; ++i)
6387 {
6389 }
6390 }

◆ collect() [3/7]

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

Definition at line 6395 of file exprtk.hpp.

6397 {
6398 for (std::size_t i = 0; i < branch.size(); ++i)
6399 {
6401 }
6402 }

◆ collect() [4/7]

template<typename Node>
template<typename Allocator, template< typename, typename > class Sequence, typename NodeSequence>
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 6407 of file exprtk.hpp.

6409 {
6410 for (std::size_t i = 0; i < branch_list.size(); ++i)
6411 {
6413 }
6414 }
bool branch_deletable(const expression_node< T > *node)
Definition exprtk.hpp:6018

◆ collect() [5/7]

template<typename Node>
template<typename Boolean, typename AllocatorT, typename AllocatorB, template< typename, typename > class Sequence, typename NodeSequence>
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 6421 of file exprtk.hpp.

6424 {
6425 for (std::size_t i = 0; i < branch_list.size(); ++i)
6426 {
6428 }
6429 }

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

◆ 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

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

6278 {
6279 if (!depth_set)
6280 {
6281 depth = 1 + max_node_depth(n0, n1);
6282 depth_set = true;
6283 }
6284
6285 return depth;
6286 }
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1) const
Definition exprtk.hpp:6255

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

6291 {
6292 if (!depth_set)
6293 {
6294 depth = 1 + max_node_depth(n0, n1, n2);
6295 depth_set = true;
6296 }
6297
6298 return depth;
6299 }

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

6304 {
6305 if (!depth_set)
6306 {
6307 depth = 1 + max_node_depth(n0, n1, n2, n3);
6308 depth_set = true;
6309 }
6310
6311 return depth;
6312 }

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

6222 {
6223 if (!depth_set)
6224 {
6225 depth = 1 + (branch.first ? branch.first->node_depth() : 0);
6226 depth_set = true;
6227 }
6228
6229 return depth;
6230 }
virtual std::size_t node_depth() const
Definition exprtk.hpp:6208

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

6234 {
6235 if (!depth_set)
6236 {
6237 depth = 0;
6238
6239 for (std::size_t i = 0; i < N; ++i)
6240 {
6241 if (branch[i].first)
6242 {
6244 }
6245 }
6246
6247 depth += 1;
6248 depth_set = true;
6249 }
6250
6251 return depth;
6252 }

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

6211 {
6212 if (!depth_set)
6213 {
6214 depth = 1 + (node ? node->node_depth() : 0);
6215 depth_set = true;
6216 }
6217
6218 return depth;
6219 }

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

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

6337 {
6338 if (!depth_set)
6339 {
6340 for (std::size_t i = 0; i < branch_list.size(); ++i)
6341 {
6342 if (branch_list[i].first)
6343 {
6345 }
6346 }
6347
6348 depth_set = true;
6349 }
6350
6351 return depth;
6352 }
std::size_t compute_node_depth(const Node *const &node) const
Definition exprtk.hpp:6210

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

6317 {
6318 if (!depth_set)
6319 {
6320 for (std::size_t i = 0; i < branch_list.size(); ++i)
6321 {
6322 if (branch_list[i])
6323 {
6325 }
6326 }
6327
6328 depth_set = true;
6329 }
6330
6331 return depth;
6332 }

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

6256 {
6258 }

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

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

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

◆ node_depth()

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

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

Definition at line 6208 of file exprtk.hpp.

6208{ return 1; }

Member Data Documentation

◆ depth

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

Definition at line 6355 of file exprtk.hpp.

◆ depth_set

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

Definition at line 6354 of file exprtk.hpp.


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