MINT2
Classes | Public Member Functions | Protected Attributes | List of all members
FitFractionList Class Reference

#include <FitFractionList.h>

Inheritance diagram for FitFractionList:
MINT::PolymorphVector< FitFraction >

Classes

class  antiSmallerFitFractionByMagnitude
 
class  antiSmallerFitFractionBySize
 
class  smallerFitFractionByMagnitude
 
class  smallerFitFractionByName
 
class  smallerFitFractionBySize
 

Public Member Functions

 FitFractionList ()
 
 FitFractionList (const FitFractionList &other)
 
void add (const FitFraction &f)
 
const FitFractionsum () const
 
void setSumFitError (double sfe)
 
void setSumIntegError (double sie)
 
void print (std::ostream &os) const
 
void sortBySizeAscending ()
 
void sortBySizeDecending ()
 
void sortByMagnitudeAscending ()
 
void sortByMagnitudeDecending ()
 
void sortByName ()
 
- Public Member Functions inherited from MINT::PolymorphVector< FitFraction >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const FitFraction &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< FitFraction > &other)
 
virtual ~PolymorphVector ()
 
std::vector< FitFraction > & theVector ()
 
const std::vector< FitFraction > & theVector () const
 
FitFractionoperator[] (unsigned int i)
 
const FitFractionoperator[] (unsigned int i) const
 
FitFractionat (unsigned int i)
 
const FitFractionat (unsigned int i) const
 
std::vector< FitFraction >::iterator begin ()
 
std::vector< FitFraction >::const_iterator begin () const
 
std::vector< FitFraction >::iterator end ()
 
std::vector< FitFraction >::const_iterator end () const
 
std::vector< FitFraction >::iterator find (const FitFraction &c)
 
std::vector< FitFraction >::const_iterator find (const FitFraction &c) const
 
FitFractionfront ()
 
const FitFractionfront () const
 
FitFractionback ()
 
const FitFractionback () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const FitFraction &c)
 
void pop_back ()
 
void erase (typename std::vector< FitFraction >::iterator pos)
 
void erase (typename std::vector< FitFraction >::iterator first, typename std::vector< FitFraction >::iterator last)
 
PolymorphVector< FitFraction > & operator= (const PolymorphVector< FitFraction > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const FitFraction &c)
 
 operator const typename std::vector< FitFraction > & () const
 
 operator typename std::vector< FitFraction > & ()
 
bool operator== (const MINT::PolymorphVector< FitFraction > &v2) const
 
bool operator!= (const MINT::PolymorphVector< FitFraction > &v2) const
 
bool operator< (const MINT::PolymorphVector< FitFraction > &v2) const
 
bool operator> (const MINT::PolymorphVector< FitFraction > &v2) const
 

Protected Attributes

FitFraction _sum
 
- Protected Attributes inherited from MINT::PolymorphVector< FitFraction >
std::vector< FitFraction_vec
 

Detailed Description

Definition at line 18 of file FitFractionList.h.

Constructor & Destructor Documentation

◆ FitFractionList() [1/2]

FitFractionList::FitFractionList ( )

Definition at line 6 of file FitFractionList.cpp.

◆ FitFractionList() [2/2]

FitFractionList::FitFractionList ( const FitFractionList other)

Definition at line 12 of file FitFractionList.cpp.

Member Function Documentation

◆ add()

void FitFractionList::add ( const FitFraction f)

Definition at line 18 of file FitFractionList.cpp.

18  {
19  _sum.frac() += f.frac();
20  this->push_back(f);
21 }
void push_back(const FitFraction &c)
FitFraction _sum
double & frac()
Definition: FitFraction.h:21

◆ print()

void FitFractionList::print ( std::ostream &  os) const

Definition at line 29 of file FitFractionList.cpp.

29  {
30  for(unsigned int i=0; i < this->size(); i++){
31  if(i > 0) os << '\n';
32  os << "\t(" << i+1 << ") " << (*this)[i];
33  }
34  if(_sum.frac() > -9998){
35  os << "\n=========================================================="
36  << "\n\t " << _sum
37  << "\n (can differ from 1 due to interference effects)";
38  }
39 }
FitFraction _sum
double & frac()
Definition: FitFraction.h:21

◆ setSumFitError()

void FitFractionList::setSumFitError ( double  sfe)

Definition at line 22 of file FitFractionList.cpp.

22  {
23  _sum.sigmaFit()=sfe;
24 }
double & sigmaFit()
Definition: FitFraction.h:24
FitFraction _sum

◆ setSumIntegError()

void FitFractionList::setSumIntegError ( double  sie)

Definition at line 25 of file FitFractionList.cpp.

25  {
26  _sum.sigmaInteg()=sie;
27 }
FitFraction _sum
double & sigmaInteg()
Definition: FitFraction.h:27

◆ sortByMagnitudeAscending()

void FitFractionList::sortByMagnitudeAscending ( )

Definition at line 49 of file FitFractionList.cpp.

49  {
51  sort(this->begin(), this->end(), sorter);
52 }
std::vector< FitFraction >::iterator end()
std::vector< FitFraction >::iterator begin()

◆ sortByMagnitudeDecending()

void FitFractionList::sortByMagnitudeDecending ( )

Definition at line 53 of file FitFractionList.cpp.

53  {
55  sort(this->begin(), this->end(), sorter);
56 }
std::vector< FitFraction >::iterator end()
std::vector< FitFraction >::iterator begin()

◆ sortByName()

void FitFractionList::sortByName ( )

Definition at line 57 of file FitFractionList.cpp.

57  {
59  sort(this->begin(), this->end(), sorter);
60 }
std::vector< FitFraction >::iterator end()
std::vector< FitFraction >::iterator begin()

◆ sortBySizeAscending()

void FitFractionList::sortBySizeAscending ( )

Definition at line 41 of file FitFractionList.cpp.

41  {
43  sort(this->begin(), this->end(), sorter);
44 }
std::vector< FitFraction >::iterator end()
std::vector< FitFraction >::iterator begin()

◆ sortBySizeDecending()

void FitFractionList::sortBySizeDecending ( )

Definition at line 45 of file FitFractionList.cpp.

45  {
47  sort(this->begin(), this->end(), sorter);
48 }
std::vector< FitFraction >::iterator end()
std::vector< FitFraction >::iterator begin()

◆ sum()

const FitFraction& FitFractionList::sum ( ) const
inline

Definition at line 27 of file FitFractionList.h.

27 {return _sum;}
FitFraction _sum

Member Data Documentation

◆ _sum

FitFraction FitFractionList::_sum
protected

Definition at line 20 of file FitFractionList.h.


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