Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface Struct Referenceabstract
Inheritance diagram for Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface:
Inheritance graph
[legend]
Collaboration diagram for Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface:
Collaboration graph
[legend]

Public Member Functions

virtual ~ComputationInterface ()=default
 
 ComputationInterface ()
 
size_t size () const
 
virtual const BinStrategy< VarType > & getBinStrategy () const =0
 
virtual std::unique_ptr< ComputationInterfaceclone () const =0
 
virtual void clip (VarType min, VarType max)=0
 
virtual std::tuple< VarType, VarType, VarType > getStats () const =0
 

Public Attributes

std::shared_ptr< std::vector< WeightType > > m_counts
 
ssize_t m_clip_left
 
ssize_t m_clip_right
 

Detailed Description

template<typename VarType, typename WeightType = float>
struct Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface

This interface is used to do a type erasure of the BinType passed to the constructor of the histogram: calls to an Histogram instance will be forwarded via the virtual methods to a concrete implementation that knows the actual type of the binning strategy, which will allow the compiler to optimize (i.e. de-virtualize) calls if the overrides are marked as final. This way we can do a single virtual call instead of multiple for things like getStats

See also
BinStrategy

Definition at line 317 of file Histogram.h.

Constructor & Destructor Documentation

◆ ~ComputationInterface()

template<typename VarType , typename WeightType = float>
virtual Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::~ComputationInterface ( )
virtualdefault

◆ ComputationInterface()

template<typename VarType , typename WeightType = float>
Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::ComputationInterface ( )
inline

Definition at line 323 of file Histogram.h.

Member Function Documentation

◆ clip()

template<typename VarType , typename WeightType = float>
virtual void Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::clip ( VarType  min,
VarType  max 
)
pure virtual

◆ clone()

template<typename VarType , typename WeightType = float>
virtual std::unique_ptr< ComputationInterface > Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::clone ( ) const
pure virtual

◆ getBinStrategy()

template<typename VarType , typename WeightType = float>
virtual const BinStrategy< VarType > & Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::getBinStrategy ( ) const
pure virtual

◆ getStats()

template<typename VarType , typename WeightType = float>
virtual std::tuple< VarType, VarType, VarType > Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::getStats ( ) const
pure virtual

◆ size()

template<typename VarType , typename WeightType = float>
size_t Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::size ( ) const
inline

Member Data Documentation

◆ m_clip_left

template<typename VarType , typename WeightType = float>
ssize_t Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::m_clip_left

◆ m_clip_right

template<typename VarType , typename WeightType = float>
ssize_t Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::m_clip_right

◆ m_counts

template<typename VarType , typename WeightType = float>
std::shared_ptr<std::vector<WeightType> > Euclid::Histogram::Histogram< VarType, WeightType >::ComputationInterface::m_counts

Definition at line 318 of file Histogram.h.


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