Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::DispatchTable< Fit > Struct Template Reference

#include <dispatch_table.h>

Collaboration diagram for Brush::DispatchTable< Fit >:

Public Types

template<typename T >
using Callable
 
using CallVariant
 
using SigMap = std::unordered_map<std::size_t,CallVariant>
 maps Signature hashes -> Dispatch Operator
 
using DTMap = std::unordered_map<NodeType, SigMap>
 maps NodeTypes -> Signature hash -> Dispatch Operator
 

Public Member Functions

 DispatchTable ()
 
void print ()
 
 ~DispatchTable ()=default
 
auto operator= (DispatchTable const &other) -> DispatchTable &
 
auto operator= (DispatchTable &&other) noexcept -> DispatchTable &
 
 DispatchTable (DispatchTable const &other)
 
 DispatchTable (DispatchTable &&other) noexcept
 
template<typename T >
auto Get (NodeType n, std::size_t sig_hash) const -> Callable< T > const &
 

Private Member Functions

template<std::size_t... Is>
void InitMap (std::index_sequence< Is... >)
 
template<NodeType NT>
SigMap MakeOperators ()
 

Static Private Member Functions

template<NodeType NT, typename Sigs , std::size_t... Is>
static constexpr auto AddOperator (std::index_sequence< Is... >)
 
template<NodeType N, typename S >
static constexpr auto MakeCallable ()
 

Private Attributes

DTMap map_
 

Detailed Description

template<bool Fit>
struct Brush::DispatchTable< Fit >

Definition at line 36 of file dispatch_table.h.

Member Typedef Documentation

◆ Callable

template<bool Fit>
template<typename T >
using Brush::DispatchTable< Fit >::Callable
Initial value:
typename std::conditional_t<Fit,
std::function<T(const Data::Dataset&, TreeNode&)>,
std::function<T(const Data::Dataset&, TreeNode&, const typename WeightType<T>::type**)>
>
void bind_engine(py::module &m, string name)
class tree_node_< Node > TreeNode
std::conditional_t< is_one_of_v< typename T::Scalar, fJet, iJet, bJet >, fJet, float > type
Definition types.h:64

Definition at line 39 of file dispatch_table.h.

◆ CallVariant

◆ DTMap

template<bool Fit>
using Brush::DispatchTable< Fit >::DTMap = std::unordered_map<NodeType, SigMap>

maps NodeTypes -> Signature hash -> Dispatch Operator

Definition at line 68 of file dispatch_table.h.

◆ SigMap

template<bool Fit>
using Brush::DispatchTable< Fit >::SigMap = std::unordered_map<std::size_t,CallVariant>

maps Signature hashes -> Dispatch Operator

Definition at line 66 of file dispatch_table.h.

Constructor & Destructor Documentation

◆ DispatchTable() [1/3]

template<bool Fit>
Brush::DispatchTable< Fit >::DispatchTable ( )
inline

Definition at line 122 of file dispatch_table.h.

Here is the call graph for this function:

◆ ~DispatchTable()

template<bool Fit>
Brush::DispatchTable< Fit >::~DispatchTable ( )
default

◆ DispatchTable() [2/3]

template<bool Fit>
Brush::DispatchTable< Fit >::DispatchTable ( DispatchTable< Fit > const & other)
inline

Definition at line 156 of file dispatch_table.h.

◆ DispatchTable() [3/3]

template<bool Fit>
Brush::DispatchTable< Fit >::DispatchTable ( DispatchTable< Fit > && other)
inlinenoexcept

Definition at line 157 of file dispatch_table.h.

Member Function Documentation

◆ AddOperator()

template<bool Fit>
template<NodeType NT, typename Sigs , std::size_t... Is>
static constexpr auto Brush::DispatchTable< Fit >::AddOperator ( std::index_sequence< Is... > )
inlinestaticconstexprprivate

Definition at line 92 of file dispatch_table.h.

Here is the call graph for this function:

◆ Get()

template<bool Fit>
template<typename T >
auto Brush::DispatchTable< Fit >::Get ( NodeType n,
std::size_t sig_hash ) const -> Callable<T> const&
inline

Definition at line 160 of file dispatch_table.h.

Here is the call graph for this function:

◆ InitMap()

template<bool Fit>
template<std::size_t... Is>
void Brush::DispatchTable< Fit >::InitMap ( std::index_sequence< Is... > )
inlineprivate

Definition at line 74 of file dispatch_table.h.

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

◆ MakeCallable()

template<bool Fit>
template<NodeType N, typename S >
static constexpr auto Brush::DispatchTable< Fit >::MakeCallable ( )
inlinestaticconstexprprivate

Definition at line 111 of file dispatch_table.h.

Here is the call graph for this function:

◆ MakeOperators()

template<bool Fit>
template<NodeType NT>
SigMap Brush::DispatchTable< Fit >::MakeOperators ( )
inlineprivate

Definition at line 83 of file dispatch_table.h.

Here is the call graph for this function:

◆ operator=() [1/2]

template<bool Fit>
auto Brush::DispatchTable< Fit >::operator= ( DispatchTable< Fit > && other) -> DispatchTable&
inlinenoexcept

Definition at line 151 of file dispatch_table.h.

Here is the call graph for this function:

◆ operator=() [2/2]

template<bool Fit>
auto Brush::DispatchTable< Fit >::operator= ( DispatchTable< Fit > const & other) -> DispatchTable&
inline

Definition at line 144 of file dispatch_table.h.

Here is the call graph for this function:

◆ print()

template<bool Fit>
void Brush::DispatchTable< Fit >::print ( )
inline

Definition at line 127 of file dispatch_table.h.

Here is the call graph for this function:

Member Data Documentation

◆ map_

template<bool Fit>
DTMap Brush::DispatchTable< Fit >::map_
private

Definition at line 71 of file dispatch_table.h.


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