Accumulating histogram of values. Specified bin resolution automatic generation of bins. More...
Public Member Functions | |
TypeName ("distribution") | |
Runtime type information. More... | |
distribution () | |
Construct null. More... | |
distribution (const scalar binWidth) | |
Construct from binWidth. More... | |
distribution (const distribution &) | |
Construct as copy. More... | |
virtual | ~distribution () |
Destructor. More... | |
label | totalEntries () const |
scalar | approxTotalEntries () const |
scalar | mean () const |
scalar | median () |
void | add (const scalar valueToAdd) |
Add a value to the appropriate bin of the distribution. More... | |
void | add (const label valueToAdd) |
void | insertMissingKeys () |
List< Pair< scalar > > | normalised () |
List< Pair< scalar > > | normalisedMinusMean () |
List< Pair< scalar > > | normalisedShifted (scalar shiftValue) |
List< Pair< scalar > > | raw () |
scalar | binWidth () const |
void | operator= (const distribution &) |
![]() | |
Map (const label size=128) | |
Construct given initial size. More... | |
Map (Istream &is) | |
Construct from Istream. More... | |
Map (const Map< T > &map) | |
Construct as copy. More... | |
Map (const Xfer< Map< T > > &map) | |
Construct by transferring the parameter contents. More... | |
Map (const Xfer< HashTable< T, label, Hash< label > > > &map) | |
Construct by transferring the parameter contents. More... | |
Static Public Member Functions | |
static void | write (const fileName &file, const List< Pair< scalar > > &pairs) |
Write to file. More... | |
Private Attributes | |
scalar | binWidth_ |
Friends | |
Ostream & | operator<< (Ostream &, const distribution &) |
Additional Inherited Members | |
![]() | |
typedef HashTable< T, label, Hash< label > >::iterator | iterator |
typedef HashTable< T, label, Hash< label > >::const_iterator | const_iterator |
Accumulating histogram of values. Specified bin resolution automatic generation of bins.
Definition at line 51 of file distribution.H.
distribution | ( | ) |
Construct null.
Definition at line 55 of file distribution.C.
distribution | ( | const scalar | binWidth | ) |
Construct from binWidth.
Definition at line 62 of file distribution.C.
distribution | ( | const distribution & | d | ) |
Construct as copy.
Definition at line 69 of file distribution.C.
|
virtual |
Destructor.
Definition at line 78 of file distribution.C.
TypeName | ( | "distribution" | ) |
Runtime type information.
Foam::label totalEntries | ( | ) | const |
Definition at line 84 of file distribution.C.
References Foam::endl(), forAllConstIter(), and WarningInFunction.
Foam::scalar approxTotalEntries | ( | ) | const |
Definition at line 112 of file distribution.C.
References forAllConstIter().
Foam::scalar mean | ( | ) | const |
Definition at line 125 of file distribution.C.
Foam::scalar median | ( | ) |
Definition at line 148 of file distribution.C.
References forAll, and List::size().
void add | ( | const scalar | valueToAdd | ) |
Add a value to the appropriate bin of the distribution.
Definition at line 212 of file distribution.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, insert(), n, and Foam::neg().
void add | ( | const label | valueToAdd | ) |
Definition at line 242 of file distribution.C.
References Foam::add().
void insertMissingKeys | ( | ) |
Definition at line 248 of file distribution.C.
References insert(), k, List::size(), and Foam::sort().
Foam::List< Foam::Pair< Foam::scalar > > normalised | ( | ) |
Definition at line 271 of file distribution.C.
References Foam::endl(), forAll, Foam::Info, k, and Foam::sort().
Foam::List< Foam::Pair< Foam::scalar > > normalisedMinusMean | ( | ) |
Definition at line 301 of file distribution.C.
Foam::List< Foam::Pair< Foam::scalar > > normalisedShifted | ( | scalar | shiftValue | ) |
Definition at line 308 of file distribution.C.
References Foam::endl(), forAll, Foam::Info, Foam::nl, Foam::sign(), and List::size().
Foam::List< Foam::Pair< Foam::scalar > > raw | ( | ) |
Definition at line 419 of file distribution.C.
References forAll, k, and Foam::sort().
|
inline |
Definition at line 28 of file distributionI.H.
References distribution::binWidth_.
Referenced by distribution::operator=().
void operator= | ( | const distribution & | rhs | ) |
Definition at line 444 of file distribution.C.
References Foam::abort(), distribution::binWidth(), Foam::FatalError, and FatalErrorInFunction.
|
friend |
|
private |
Definition at line 57 of file distribution.H.
Referenced by distribution::binWidth().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.