Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::Internal Namespace Reference

Classes

struct  and_types
 Type checking for all types of a parameter pack, e.g., used in combination with std::is_convertible. More...
 
struct  and_types< T0, Ts... >
 
class  ComputeHelper
 Compute helper. More...
 
class  ComputeHelper< std::index_sequence< N... >, T, F >
 
struct  XMLConfig
 Container for information extracted from TMVA XML config. More...
 

Enumerations

enum  AnalysisType : unsigned int { Undefined = 0 , Classification , Regression , Multiclass }
 Internal definition of analysis types. More...
 

Functions

template<typename T >
bool CompareTree (const BranchlessTree< T > &a, const BranchlessTree< T > &b)
 
template<typename U , typename V >
std::size_t ComputeGlobalIndex (const U &strides, const V &idx)
 Compute global index from indices.
 
template<typename T >
ComputeIndicesFromGlobalIndex (const T &shape, MemoryLayout layout, const typename T::value_type idx)
 Compute indices from global index.
 
template<typename T >
std::vector< std::size_t > ComputeStridesFromShape (const T &shape, MemoryLayout layout)
 Compute strides from shape vector.
 
template<typename T >
T * GetObjectSafe (TFile *f, const std::string &n, const std::string &m)
 
template<typename T >
std::size_t GetSizeFromShape (const T &shape)
 Get size of tensor from shape vector.
 
XMLConfig ParseXMLConfig (const std::string &filename)
 Parse TMVA XML config.
 
template<typename T >
void RecursiveCopy (const T &here, T &there, const std::vector< std::size_t > &mins, const std::vector< std::size_t > &maxs, std::vector< std::size_t > idx, std::size_t active)
 Copy slice of a tensor recursively from here to there.
 
template<typename T >
void RecursiveFill (int thisIndex, int lastIndex, int treeDepth, int maxTreeDepth, std::vector< T > &thresholds, std::vector< int > &inputs)
 Fill the empty nodes of a sparse tree recursively.
 

Enumeration Type Documentation

◆ AnalysisType

Internal definition of analysis types.

Enumerator
Undefined 
Classification 
Regression 
Multiclass 

Definition at line 20 of file RReader.hxx.

Function Documentation

◆ CompareTree()

template<typename T >
bool TMVA::Experimental::Internal::CompareTree ( const BranchlessTree< T > &  a,
const BranchlessTree< T > &  b 
)

Definition at line 53 of file Forest.hxx.

◆ ComputeGlobalIndex()

template<typename U , typename V >
std::size_t TMVA::Experimental::Internal::ComputeGlobalIndex ( const U &  strides,
const V &  idx 
)
inline

Compute global index from indices.

Parameters
[in]stridesStrides vector
[in]idxIndice vector
Returns
Global index

Definition at line 99 of file RTensor.hxx.

◆ ComputeIndicesFromGlobalIndex()

template<typename T >
T TMVA::Experimental::Internal::ComputeIndicesFromGlobalIndex ( const T &  shape,
MemoryLayout  layout,
const typename T::value_type  idx 
)
inline

Compute indices from global index.

Parameters
[in]shapeShape vector
[in]idxGlobal index
[in]layoutMemory layout
Returns
Indice vector

Definition at line 81 of file RTensor.hxx.

◆ ComputeStridesFromShape()

template<typename T >
std::vector< std::size_t > TMVA::Experimental::Internal::ComputeStridesFromShape ( const T &  shape,
MemoryLayout  layout 
)
inline

Compute strides from shape vector.

Parameters
[in]shapeShape vector
[in]layoutMemory layout
Returns
Size of contiguous memory

This information is needed for the multi-dimensional indexing. See here: https://en.wikipedia.org/wiki/Row-_and_column-major_order https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.strides.html

Definition at line 47 of file RTensor.hxx.

◆ GetObjectSafe()

template<typename T >
T * TMVA::Experimental::Internal::GetObjectSafe ( TFile f,
const std::string &  n,
const std::string &  m 
)

Definition at line 44 of file Forest.hxx.

◆ GetSizeFromShape()

template<typename T >
std::size_t TMVA::Experimental::Internal::GetSizeFromShape ( const T &  shape)
inline

Get size of tensor from shape vector.

Parameters
[in]shapeShape vector
Returns
Size of contiguous memory

Definition at line 28 of file RTensor.hxx.

◆ ParseXMLConfig()

XMLConfig TMVA::Experimental::Internal::ParseXMLConfig ( const std::string &  filename)
inline

Parse TMVA XML config.

Definition at line 38 of file RReader.hxx.

◆ RecursiveCopy()

template<typename T >
void TMVA::Experimental::Internal::RecursiveCopy ( const T &  here,
T &  there,
const std::vector< std::size_t > &  mins,
const std::vector< std::size_t > &  maxs,
std::vector< std::size_t >  idx,
std::size_t  active 
)

Copy slice of a tensor recursively from here to there.

Parameters
[in]hereSource tensor
[in]thereTarget tensor (slice of source tensor)
[in]minsMinimum of indices for each dimension
[in]maxsMaximum of indices for each dimension
[in]idxCurrent indices
[in]activeActive index needed to stop the recursion

Copy the content of a slice of a tensor from source to target. This is done by recursively iterating over the ranges of the slice for each dimension.

Definition at line 129 of file RTensor.hxx.

◆ RecursiveFill()

template<typename T >
void TMVA::Experimental::Internal::RecursiveFill ( int  thisIndex,
int  lastIndex,
int  treeDepth,
int  maxTreeDepth,
std::vector< T > &  thresholds,
std::vector< int > &  inputs 
)

Fill the empty nodes of a sparse tree recursively.

Definition at line 35 of file BranchlessTree.hxx.