yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::Scatter Class Referenceabstract

A base class for common operations on scatter types (Scatter1D, etc.) More...

#include <Scatter.h>

Inheritance diagram for YODA::Scatter:
YODA::ScatterND< N >

Public Member Functions

virtual ~Scatter ()
 Virtual destructor for inheritance.
 
virtual size_t dim () const noexcept=0
 Dimension of this data object.
 
Modifiers
virtual void reset ()=0
 Clear all points.
 
virtual size_t numPoints () const =0
 Scaling along direction i.
 
Point removers
virtual void rmPoint (size_t index)=0
 Remove the point with index index.
 
virtual void rmPoints (std::vector< size_t > indices)
 Safely remove the points with indices indices.
 

Detailed Description

A base class for common operations on scatter types (Scatter1D, etc.)

Definition at line 44 of file Scatter.h.

Constructor & Destructor Documentation

◆ ~Scatter()

virtual YODA::Scatter::~Scatter ( )
inlinevirtual

Virtual destructor for inheritance.

Todo:
Add a generic Scatter base class, providing reset(), rmPoint(), etc.

Definition at line 50 of file Scatter.h.

50{}

Member Function Documentation

◆ dim()

virtual size_t YODA::Scatter::dim ( ) const
pure virtualnoexcept

Dimension of this data object.

Implemented in YODA::ScatterND< N >.

◆ numPoints()

virtual size_t YODA::Scatter::numPoints ( ) const
pure virtual

Scaling along direction i.

Number of points in the scatter

Implemented in YODA::ScatterND< N >.

◆ reset()

virtual void YODA::Scatter::reset ( )
pure virtual

Clear all points.

Implemented in YODA::ScatterND< N >.

◆ rmPoint()

virtual void YODA::Scatter::rmPoint ( size_t  index)
pure virtual

Remove the point with index index.

Implemented in YODA::ScatterND< N >.

Referenced by rmPoints().

◆ rmPoints()

virtual void YODA::Scatter::rmPoints ( std::vector< size_t >  indices)
inlinevirtual

Safely remove the points with indices indices.

Definition at line 85 of file Scatter.h.

85 {
86 // remove points in decreasing order, so the numbering isn't invalidated mid-loop:
87 std::sort(indices.begin(), indices.end(), std::greater<size_t>()); //< reverse-sort
88 for (size_t i : indices) rmPoint(i);
89 }
virtual void rmPoint(size_t index)=0
Remove the point with index index.

References rmPoint().


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