C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
exprtk::details::function_N_node< T, IFunction, N > Class Template Reference
Inheritance diagram for exprtk::details::function_N_node< T, IFunction, N >:
[legend]
Collaboration diagram for exprtk::details::function_N_node< T, IFunction, N >:
[legend]

Classes

struct  evaluate_branches
 
struct  evaluate_branches< T_, 1 >
 
struct  evaluate_branches< T_, 2 >
 
struct  evaluate_branches< T_, 3 >
 
struct  evaluate_branches< T_, 4 >
 
struct  evaluate_branches< T_, 5 >
 
struct  evaluate_branches< T_, 6 >
 
struct  invoke
 
struct  invoke< T_, 1 >
 
struct  invoke< T_, 10 >
 
struct  invoke< T_, 11 >
 
struct  invoke< T_, 12 >
 
struct  invoke< T_, 13 >
 
struct  invoke< T_, 14 >
 
struct  invoke< T_, 15 >
 
struct  invoke< T_, 16 >
 
struct  invoke< T_, 17 >
 
struct  invoke< T_, 18 >
 
struct  invoke< T_, 19 >
 
struct  invoke< T_, 2 >
 
struct  invoke< T_, 20 >
 
struct  invoke< T_, 3 >
 
struct  invoke< T_, 4 >
 
struct  invoke< T_, 5 >
 
struct  invoke< T_, 6 >
 
struct  invoke< T_, 7 >
 
struct  invoke< T_, 8 >
 
struct  invoke< T_, 9 >
 

Public Types

typedef expression_node< T > * expression_ptr
 
typedef std::pair< expression_ptr, boolbranch_t
 
typedef IFunction ifunction
 
- Public Types inherited from exprtk::details::expression_node< T >
enum  node_type {
  e_none , e_null , e_constant , e_unary ,
  e_binary , e_binary_ext , e_trinary , e_quaternary ,
  e_vararg , e_conditional , e_while , e_repeat ,
  e_for , e_switch , e_mswitch , e_return ,
  e_retenv , e_variable , e_stringvar , e_stringconst ,
  e_stringvarrng , e_cstringvarrng , e_strgenrange , e_strconcat ,
  e_stringvarsize , e_strswap , e_stringsize , e_stringvararg ,
  e_function , e_vafunction , e_genfunction , e_strfunction ,
  e_strcondition , e_strccondition , e_add , e_sub ,
  e_mul , e_div , e_mod , e_pow ,
  e_lt , e_lte , e_gt , e_gte ,
  e_eq , e_ne , e_and , e_nand ,
  e_or , e_nor , e_xor , e_xnor ,
  e_in , e_like , e_ilike , e_inranges ,
  e_ipow , e_ipowinv , e_abs , e_acos ,
  e_acosh , e_asin , e_asinh , e_atan ,
  e_atanh , e_ceil , e_cos , e_cosh ,
  e_exp , e_expm1 , e_floor , e_log ,
  e_log10 , e_log2 , e_log1p , e_neg ,
  e_pos , e_round , e_sin , e_sinc ,
  e_sinh , e_sqrt , e_tan , e_tanh ,
  e_cot , e_sec , e_csc , e_r2d ,
  e_d2r , e_d2g , e_g2d , e_notl ,
  e_sgn , e_erf , e_erfc , e_ncdf ,
  e_frac , e_trunc , e_uvouv , e_vov ,
  e_cov , e_voc , e_vob , e_bov ,
  e_cob , e_boc , e_vovov , e_vovoc ,
  e_vocov , e_covov , e_covoc , e_vovovov ,
  e_vovovoc , e_vovocov , e_vocovov , e_covovov ,
  e_covocov , e_vocovoc , e_covovoc , e_vococov ,
  e_sf3ext , e_sf4ext , e_nulleq , e_strass ,
  e_vector , e_vecsize , e_vecelem , e_veccelem ,
  e_vecelemrtc , e_veccelemrtc , e_rbvecelem , e_rbvecelemrtc ,
  e_rbveccelem , e_rbveccelemrtc , e_vecinit , e_vecvalass ,
  e_vecvecass , e_vecopvalass , e_vecopvecass , e_vecfunc ,
  e_vecvecswap , e_vecvecineq , e_vecvalineq , e_valvecineq ,
  e_vecvecarith , e_vecvalarith , e_valvecarith , e_vecunaryop ,
  e_vecondition , e_break , e_continue , e_swap ,
  e_assert
}
 
typedef T value_type
 
typedef expression_node< T > * expression_ptr
 
typedef node_collector_interface< expression_node< T > > nci_t
 
typedef nci_t::noderef_list_t noderef_list_t
 
typedef node_depth_base< expression_node< T > > ndb_t
 
- Public Types inherited from exprtk::details::node_collector_interface< expression_node< T > >
typedef expression_node< T > * node_ptr_t
 
typedef expression_node< T > ** node_pp_t
 
typedef std::vector< node_pp_tnoderef_list_t
 
- Public Types inherited from exprtk::details::node_depth_base< expression_node< T > >
typedef expression_node< T > * node_ptr_t
 
typedef std::pair< node_ptr_t, bool > nb_pair_t
 

Public Member Functions

 function_N_node (ifunction *func)
 
template<std::size_t NumBranches>
bool init_branches (expression_ptr(&b)[NumBranches])
 
bool operator< (const function_N_node< T, IFunction, N > &fn) const
 
T value () const
 
expression_node< T >::node_type type () const
 
bool valid () const
 
void collect_nodes (typename expression_node< T >::noderef_list_t &node_delete_list)
 
std::size_t node_depth () const
 
- Public Member Functions inherited from exprtk::details::expression_node< T >
virtual ~expression_node ()
 
virtual expression_node< T > * branch (const std::size_t &index=0) const
 
- Public Member Functions inherited from exprtk::details::node_collector_interface< expression_node< T > >
virtual ~node_collector_interface ()
 
virtual void collect_nodes (noderef_list_t &)
 
- Public Member Functions inherited from exprtk::details::node_depth_base< expression_node< T > >
 node_depth_base ()
 
virtual ~node_depth_base ()
 
std::size_t compute_node_depth (const expression_node< T > *const &node) const
 
std::size_t compute_node_depth (const nb_pair_t &branch) const
 
std::size_t compute_node_depth (const nb_pair_t(&branch)[N]) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
std::size_t compute_node_depth (const Sequence< node_ptr_t, Allocator > &branch_list) const
 
std::size_t compute_node_depth (const Sequence< nb_pair_t, Allocator > &branch_list) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
void collect (node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
 
void collect (const nb_pair_t &branch, NodeSequence &delete_node_list) const
 
void collect (expression_node< T > *&node, NodeSequence &delete_node_list) const
 
void collect (const nb_pair_t(&branch)[N], NodeSequence &delete_node_list) const
 
void collect (const Sequence< nb_pair_t, Allocator > &branch, NodeSequence &delete_node_list) const
 
void collect (const Sequence< node_ptr_t, Allocator > &branch_list, NodeSequence &delete_node_list) const
 
void collect (const Sequence< node_ptr_t, AllocatorT > &branch_list, const Sequence< Boolean, AllocatorB > &branch_deletable_list, NodeSequence &delete_node_list) const
 

Private Attributes

ifunctionfunction_
 
std::size_t parameter_count_
 
branch_t branch_ [N]
 
bool initialised_
 

Additional Inherited Members

- Public Attributes inherited from exprtk::details::node_depth_base< expression_node< T > >
bool depth_set
 
std::size_t depth
 

Detailed Description

template<typename T, typename IFunction, std::size_t N>
class exprtk::details::function_N_node< T, IFunction, N >

Definition at line 14426 of file exprtk.hpp.

Member Typedef Documentation

◆ branch_t

template<typename T , typename IFunction , std::size_t N>
typedef std::pair<expression_ptr,bool> exprtk::details::function_N_node< T, IFunction, N >::branch_t

Definition at line 14432 of file exprtk.hpp.

◆ expression_ptr

template<typename T , typename IFunction , std::size_t N>
typedef expression_node<T>* exprtk::details::function_N_node< T, IFunction, N >::expression_ptr

Definition at line 14431 of file exprtk.hpp.

◆ ifunction

Definition at line 14433 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ function_N_node()

template<typename T , typename IFunction , std::size_t N>
exprtk::details::function_N_node< T, IFunction, N >::function_N_node ( ifunction func)
inlineexplicit

Definition at line 14435 of file exprtk.hpp.

14436 : function_((N == func->param_count) ? func : reinterpret_cast<ifunction*>(0))
14437 , parameter_count_(func->param_count)
14439 {}
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

Member Function Documentation

◆ collect_nodes()

template<typename T , typename IFunction , std::size_t N>
void exprtk::details::function_N_node< T, IFunction, N >::collect_nodes ( typename expression_node< T >::noderef_list_t node_delete_list)
inline

Definition at line 14504 of file exprtk.hpp.

14505 {
14507 }
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6192

References exprtk::details::function_N_node< T, IFunction, N >::branch_, exprtk::details::node_depth_base< expression_node< T > >::collect(), and exprtk::details::match_impl().

Here is the call graph for this function:

◆ init_branches()

template<typename T , typename IFunction , std::size_t N>
template<std::size_t NumBranches>
bool exprtk::details::function_N_node< T, IFunction, N >::init_branches ( expression_ptr(&)  b[NumBranches])
inline

Definition at line 14442 of file exprtk.hpp.

14443 {
14444 // Needed for incompetent and broken msvc compiler versions
14445 #ifdef _MSC_VER
14446 #pragma warning(push)
14447 #pragma warning(disable: 4127)
14448 #endif
14449
14450 if (N != NumBranches)
14451 {
14452 return false;
14453 }
14454
14455 for (std::size_t i = 0; i < NumBranches; ++i)
14456 {
14457 if (b[i] && b[i]->valid())
14458 branch_[i] = std::make_pair(b[i],branch_deletable(b[i]));
14459 else
14460 return false;
14461 }
14462
14464 assert(valid());
14465 return initialised_;
14466
14467 #ifdef _MSC_VER
14468 #pragma warning(pop)
14469 #endif
14470 }
bool branch_deletable(const expression_node< T > *node)
Definition exprtk.hpp:5852

References exprtk::details::function_N_node< T, IFunction, N >::branch_, exprtk::details::branch_deletable(), exprtk::details::function_N_node< T, IFunction, N >::function_, exprtk::details::function_N_node< T, IFunction, N >::initialised_, exprtk::details::match_impl(), and exprtk::details::function_N_node< T, IFunction, N >::valid().

Here is the call graph for this function:

◆ node_depth()

template<typename T , typename IFunction , std::size_t N>
std::size_t exprtk::details::function_N_node< T, IFunction, N >::node_depth ( ) const
inlinevirtual

Reimplemented from exprtk::details::node_depth_base< expression_node< T > >.

Definition at line 14509 of file exprtk.hpp.

14510 {
14511 return expression_node<T>::ndb_t::template compute_node_depth<N>(branch_);
14512 }

References exprtk::details::function_N_node< T, IFunction, N >::branch_, and exprtk::details::match_impl().

Here is the call graph for this function:

◆ operator<()

template<typename T , typename IFunction , std::size_t N>
bool exprtk::details::function_N_node< T, IFunction, N >::operator< ( const function_N_node< T, IFunction, N > &  fn) const
inline

Definition at line 14472 of file exprtk.hpp.

14473 {
14474 return this < (&fn);
14475 }

References exprtk::details::match_impl().

Here is the call graph for this function:

◆ type()

template<typename T , typename IFunction , std::size_t N>
expression_node< T >::node_type exprtk::details::function_N_node< T, IFunction, N >::type ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 14494 of file exprtk.hpp.

◆ valid()

template<typename T , typename IFunction , std::size_t N>
bool exprtk::details::function_N_node< T, IFunction, N >::valid ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 14499 of file exprtk.hpp.

14500 {
14501 return initialised_;
14502 }

References exprtk::details::function_N_node< T, IFunction, N >::initialised_.

Referenced by exprtk::details::function_N_node< T, IFunction, 0 >::function_N_node(), and exprtk::details::function_N_node< T, IFunction, N >::init_branches().

Here is the caller graph for this function:

◆ value()

template<typename T , typename IFunction , std::size_t N>
T exprtk::details::function_N_node< T, IFunction, N >::value ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 14477 of file exprtk.hpp.

14478 {
14479 // Needed for incompetent and broken msvc compiler versions
14480 #ifdef _MSC_VER
14481 #pragma warning(push)
14482 #pragma warning(disable: 4127)
14483 #endif
14484
14485 T v[N];
14488
14489 #ifdef _MSC_VER
14490 #pragma warning(pop)
14491 #endif
14492 }
static void execute(T_(&v)[BranchCount], const branch_t(&b)[BranchCount])
Definition exprtk.hpp:14517
static T execute(ifunction &, branch_t(&)[ParamCount])
Definition exprtk.hpp:14596

References exprtk::details::function_N_node< T, IFunction, N >::branch_, exprtk::details::function_N_node< T, IFunction, N >::invoke< T_, ParamCount >::execute(), exprtk::details::function_N_node< T, IFunction, N >::evaluate_branches< T_, BranchCount >::execute(), exprtk::details::function_N_node< T, IFunction, N >::function_, and exprtk::details::match_impl().

Here is the call graph for this function:

Member Data Documentation

◆ branch_

template<typename T , typename IFunction , std::size_t N>
branch_t exprtk::details::function_N_node< T, IFunction, N >::branch_[N]
private

◆ function_

template<typename T , typename IFunction , std::size_t N>
ifunction* exprtk::details::function_N_node< T, IFunction, N >::function_
private

◆ initialised_

template<typename T , typename IFunction , std::size_t N>
bool exprtk::details::function_N_node< T, IFunction, N >::initialised_
private

◆ parameter_count_

template<typename T , typename IFunction , std::size_t N>
std::size_t exprtk::details::function_N_node< T, IFunction, N >::parameter_count_
private

Definition at line 14741 of file exprtk.hpp.


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