Public Member Functions | Private Member Functions | Private Attributes
Histogram< List > Class Template Reference

Calculates the counts per bin of a list. More...

Collaboration diagram for Histogram< List >:
Collaboration graph
[legend]

Public Member Functions

 Histogram (const List &bins, const List &l)
 Construct given bin values and input list. More...
 
 Histogram (const typename List::const_reference min, const typename List::const_reference max, const label nBins, const List &l)
 Construct given min, max, number of bins and input list. More...
 
const labelListcounts () const
 Return the counts per bin. More...
 
label nLow () const
 Return the number of elements <= bins[0]. More...
 
label nHigh () const
 Return the number of elements > bins[bins.size()-1]. More...
 

Private Member Functions

void count (const List &bins, const List &l)
 
 Histogram (const Histogram &)
 Disallow default bitwise copy construct. More...
 
void operator= (const Histogram &)
 Disallow default bitwise assignment. More...
 

Private Attributes

labelList counts_
 Counts per bin. More...
 
label nLow_
 Number of <= lowest bin. More...
 
label nHigh_
 Number of > highest bin. More...
 

Detailed Description

template<class List>
class Foam::Histogram< List >

Calculates the counts per bin of a list.

Source files

Definition at line 50 of file Histogram.H.

Constructor & Destructor Documentation

◆ Histogram() [1/3]

Histogram ( const Histogram< List > &  )
private

Disallow default bitwise copy construct.

◆ Histogram() [2/3]

Histogram ( const List bins,
const List l 
)

Construct given bin values and input list.

Definition at line 71 of file Histogram.C.

◆ Histogram() [3/3]

Histogram ( const typename List::const_reference  min,
const typename List::const_reference  max,
const label  nBins,
const List l 
)

Construct given min, max, number of bins and input list.

Definition at line 79 of file Histogram.C.

References Foam::max(), and Foam::min().

Here is the call graph for this function:

Member Function Documentation

◆ count()

void count ( const List bins,
const List l 
)
private

Definition at line 33 of file Histogram.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findLower(), forAll, and List::size().

Here is the call graph for this function:

◆ operator=()

void operator= ( const Histogram< List > &  )
private

Disallow default bitwise assignment.

◆ counts()

const labelList& counts ( ) const
inline

Return the counts per bin.

Definition at line 95 of file Histogram.H.

References Histogram< List >::counts_.

◆ nLow()

label nLow ( ) const
inline

Return the number of elements <= bins[0].

(so inclusive lowest bin value)

Definition at line 102 of file Histogram.H.

◆ nHigh()

label nHigh ( ) const
inline

Return the number of elements > bins[bins.size()-1].

(so exclusive highest bin value)

Definition at line 109 of file Histogram.H.

Field Documentation

◆ counts_

labelList counts_
private

Counts per bin.

Definition at line 55 of file Histogram.H.

Referenced by Histogram< List >::counts().

◆ nLow_

label nLow_
private

Number of <= lowest bin.

Definition at line 58 of file Histogram.H.

◆ nHigh_

label nHigh_
private

Number of > highest bin.

Definition at line 61 of file Histogram.H.


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