SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Constructs and maintains a histogram of input data. More...
#include <rw/histo.h>
Public Member Functions | |
Histogram () | |
Histogram (const Histogram &) | |
Histogram (const RWMathVec< double > &b) | |
Histogram (size_t nbins, const RWMathVec< double > &v) | |
Histogram (size_t nbins, double min, double max) | |
void | addCount (const RWMathVec< double > &v) |
void | addCount (double a) |
size_t | binaryStoreSize () const |
RWMathVec< double > | binBoundaries () const |
size_t | bins () const |
size_t | larger () const |
Histogram & | operator= (const Histogram &h) |
Histogram & | resetCounts () |
size_t | smaller () const |
size_t | totalCount () const |
![]() | |
RWMathVec () | |
RWMathVec (const char *s) | |
RWMathVec (const int *dat, size_t n) | |
RWMathVec (const RWMathVec< double > &re, const RWMathVec< double > &im) | |
RWMathVec (const RWMathVec< int > &a) | |
RWMathVec (const RWMathVecPick< int > &p) | |
RWMathVec (size_t n, const int &initval) | |
RWMathVec (size_t n, const int &initval, const int &incr) | |
RWMathVec (size_t n, RWRandInterface &r) | |
RWMathVec (size_t n, RWUninitialized) | |
RWMathVec< int > | apply (typename rw_numeric_traits< int >::mathFunType f) const |
RWMathVec< norm_type > | apply2 (mathFunType2 f) const |
iterator | begin () |
const_iterator | begin () const |
size_t | binaryStoreSize () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
RWMathVec< int > | copy () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
int * | data () |
const int * | data () const |
RWMathVec< int > | deepCopy () const |
void | deepenShallowCopy () |
iterator | end () |
const_iterator | end () const |
size_t | length () const |
operator RWMathVec< promote_type > () | |
bool | operator!= (const RWMathVec< int > &v) const |
RWMathVec< int > | operator() (const RWSlice &) |
const RWMathVec< int > | operator() (const RWSlice &) const |
int & | operator() (int i) |
int | operator() (int i) const |
RWMathVec< int > & | operator*= (const int &v) |
RWMathVec< int > & | operator*= (const RWMathVec< int > &v) |
RWMathVec< int > & | operator++ () |
void | operator++ (int) |
RWMathVec< int > & | operator+= (const int &v) |
RWMathVec< int > & | operator+= (const RWMathVec< int > &v) |
RWMathVec< int > & | operator-- () |
void | operator-- (int) |
RWMathVec< int > & | operator-= (const int &v) |
RWMathVec< int > & | operator-= (const RWMathVec< int > &v) |
RWMathVec< int > & | operator/= (const int &v) |
RWMathVec< int > & | operator/= (const RWMathVec< int > &v) |
RWMathVec< int > & | operator= (const int &v) |
RWMathVec< int > & | operator= (const RWMathVec< int > &v) |
RWMathVec< int > & | operator= (const RWMathVecPick< int > &v) |
bool | operator== (const RWMathVec< int > &) const |
RWMathVec< int > | operator[] (const RWSlice &) |
const RWMathVec< int > | operator[] (const RWSlice &) const |
int & | operator[] (int i) |
int | operator[] (int i) const |
RWMathVecPick< int > | pick (const RWIntVec &v) |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
RWMathVec< int > & | reference (const RWMathVec< int > &v) |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
void | reshape (size_t n) |
void | resize (size_t n) |
void | restoreFrom (RWFile &) |
void | restoreFrom (RWvistream &) |
void | saveOn (RWFile &) const |
void | saveOn (RWvostream &) const |
RWMathVec< int > | slice (int start, size_t n, int stride=1) const |
int | stride () const |
![]() | |
size_t | length () const |
int | stride () const |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Histogram &h) |
Additional Inherited Members | |
![]() | |
typedef RWMathVecConstIterator< int > | const_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
typedef RWMathVecIterator< int > | iterator |
typedef rw_numeric_traits< int >::mathFunType | mathFunType |
typedef rw_numeric_traits< int >::mathFunType2 | mathFunType2 |
typedef rw_numeric_traits< int >::norm_type | norm_type |
typedef rw_numeric_traits< int >::promote_type | promote_type |
typedef std::reverse_iterator< iterator > | reverse_iterator |
![]() | |
enum | Storage { COLUMN_MAJOR , ROW_MAJOR , RWEITHER } |
![]() | |
RWMathVec< double > | abs (const RWMathVec< DComplex > &) |
RWMathVec< double > | abs (const RWMathVec< double > &) |
RWMathVec< float > | abs (const RWMathVec< float > &) |
RWMathVec< int > | abs (const RWMathVec< int > &) |
RWMathVec< signed char > | abs (const RWMathVec< signed char > &) |
RWMathVec< int > | acos (const RWMathVec< int > &x) |
RWMathVec< double > | arg (const RWMathVec< DComplex > &v) |
RWMathVec< int > | asin (const RWMathVec< int > &x) |
RWMathVec< int > | atan (const RWMathVec< int > &x) |
RWMathVec< int > | atan2 (const RWMathVec< int > &x, const RWMathVec< int > &y) |
RWMathVec< int > | ceil (const RWMathVec< int > &x) |
RWMathVec< DComplex > | conj (const RWMathVec< DComplex > &x) |
DComplex | conjDot (const RWMathVec< DComplex > &x, const RWMathVec< DComplex > &y) |
RWMathVec< int > | cos (const RWMathVec< int > &x) |
RWMathVec< int > | cosh (const RWMathVec< int > &x) |
RWMathVec< int > | cumsum (const RWMathVec< int > &x) |
RWMathVec< int > | delta (const RWMathVec< int > &x) |
int | dot (const RWMathVec< int > &x, const RWMathVec< int > &y) |
RWMathVec< int > | exp (const RWMathVec< int > &x) |
RWMathVec< DComplex > | expandConjugateEven (const RWMathVec< DComplex > &) |
RWMathVec< DComplex > | expandConjugateOdd (const RWMathVec< DComplex > &) |
RWMathVec< int > | expandEven (const RWMathVec< int > &) |
RWMathVec< int > | expandOdd (const RWMathVec< int > &) |
RWMathVec< int > | floor (const RWMathVec< int > &V) |
double | frobNorm (const RWMathVec< DComplex > &v) |
double | frobNorm (const RWMathVec< double > &v) |
float | frobNorm (const RWMathVec< float > &v) |
double | kurtosis (const RWMathVec< double > &) |
double | l1Norm (const RWMathVec< DComplex > &v) |
double | l1Norm (const RWMathVec< double > &v) |
float | l1Norm (const RWMathVec< float > &v) |
double | l2Norm (const RWMathVec< DComplex > &v) |
double | l2Norm (const RWMathVec< double > &v) |
float | l2Norm (const RWMathVec< float > &v) |
double | linfNorm (const RWMathVec< DComplex > &v) |
double | linfNorm (const RWMathVec< double > &v) |
float | linfNorm (const RWMathVec< float > &v) |
RWMathVec< int > | log (const RWMathVec< int > &x) |
RWMathVec< int > | log10 (const RWMathVec< int > &x) |
int | maxIndex (const RWMathVec< int > &) |
double | maxNorm (const RWMathVec< DComplex > &v) |
double | maxNorm (const RWMathVec< double > &v) |
float | maxNorm (const RWMathVec< float > &v) |
int | maxValue (const RWMathVec< int > &) |
int | mean (const RWMathVec< int > &V) |
int | minIndex (const RWMathVec< int > &) |
int | minValue (const RWMathVec< int > &) |
RWMathVec< double > | norm (const RWMathVec< DComplex > &x) |
RWMathVec< int > | operator* (const int &s, const RWMathVec< int > &v) |
RWMathVec< int > | operator* (const RWMathVec< int > &u, const int &s) |
RWMathVec< int > | operator* (const RWMathVec< int > &u, const RWMathVec< int > &v) |
RWMathVec< int > | operator+ (const int &s, const RWMathVec< int > &v) |
RWMathVec< int > | operator+ (const RWMathVec< int > &u, const int &s) |
RWMathVec< int > | operator+ (const RWMathVec< int > &u, const RWMathVec< int > &v) |
RWMathVec< int > | operator+ (const RWMathVec< int > &v) |
RWMathVec< int > | operator- (const int &s, const RWMathVec< int > &v) |
RWMathVec< int > | operator- (const RWMathVec< int > &u, const int &s) |
RWMathVec< int > | operator- (const RWMathVec< int > &u, const RWMathVec< int > &v) |
RWMathVec< int > | operator- (const RWMathVec< int > &v) |
RWMathVec< int > | operator/ (const int &s, const RWMathVec< int > &v) |
RWMathVec< int > | operator/ (const RWMathVec< int > &u, const int &s) |
RWMathVec< int > | operator/ (const RWMathVec< int > &u, const RWMathVec< int > &v) |
std::ostream & | operator<< (std::ostream &s, const RWMathVec< int > &v) |
std::istream & | operator>> (std::istream &s, RWMathVec< int > &v) |
RWGenMat< int > | outerProduct (const RWMathVec< int > &x, const RWMathVec< int > &y) |
RWMathVec< int > | pow (const RWMathVec< int > &x, const RWMathVec< int > &y) |
RWMathVec< int > | pow (const RWMathVec< int > &x, int y) |
RWMathVec< int > | pow (int x, const RWMathVec< int > &y) |
int | prod (const RWMathVec< int > &) |
RWMathVec< int > | reverse (const RWMathVec< int > &) |
RWMathVec< DComplex > | rootsOfOne (int N) |
Returns a complex vector v containing the complex Nth roots of unity. | |
RWMathVec< DComplex > | rootsOfOne (int N, size_t nterms) |
Returns a complex vector v containing the complex Nth roots of unity. | |
RWMathVec< int > | sin (const RWMathVec< int > &V) |
RWMathVec< int > | sinh (const RWMathVec< int > &V) |
double | skewness (const RWMathVec< double > &) |
RWMathVec< double > | sort (const RWMathVec< double > &) |
double | spectralVariance (const RWMathVec< DComplex > &) |
RWMathVec< int > | sqrt (const RWMathVec< int > &V) |
int | sum (const RWMathVec< int > &) |
RWMathVec< int > | tan (const RWMathVec< int > &V) |
RWMathVec< int > | tanh (const RWMathVec< int > &V) |
RWMathVec< signed char > | toChar (const RWMathVec< int > &v) |
RWMathVec< float > | toFloat (const RWMathVec< double > &v) |
RWMathVec< int > | toInt (const RWMathVec< double > &v) |
RWMathVec< int > | toInt (const RWMathVec< float > &v) |
double | variance (const RWMathVec< DComplex > &) |
double | variance (const RWMathVec< double > &) |
float | variance (const RWMathVec< float > &) |
The class Histogram constructs and maintains a histogram of input data. The count is stored as a public RWMathVec base class. It can be used anywhere an RWMathVec can be used.
Histogram::Histogram | ( | ) |
Constructs a histogram with 0 bins.
Histogram::Histogram | ( | size_t | nbins, |
const RWMathVec< double > & | v ) |
Constructs a histogram from the data in v, with nbins bins of data. The bins are of equal size and are scaled with the maximum and minimum data in v. The count in the histogram is initialized with the contents of v.
Histogram::Histogram | ( | const RWMathVec< double > & | b | ) |
Constructs a histogram with no initial data, with bin boundaries defined by the data in b. The number of bins is b.length()-1
.
Histogram::Histogram | ( | size_t | nbins, |
double | min, | ||
double | max ) |
Constructs a histogram with no initial data, with nbins bins. The bins are of equal size and are scaled with max and min.
Histogram::Histogram | ( | const Histogram & | ) |
Copy constructor. The new histogram does not reference the old histogram's data.
void Histogram::addCount | ( | const RWMathVec< double > & | v | ) |
Adds the contents of the vector v to the histogram.
void Histogram::addCount | ( | double | a | ) |
Adds data value a to the histogram.
size_t Histogram::binaryStoreSize | ( | ) | const |
Returns the number of bytes required to store the vector to an RWFile using member function saveOn(RWFile&).
|
inline |
Returns the boundaries of the histogram's bins as a vector.
|
inline |
Returns the number of bins.
|
inline |
Returns the total accumulated number of data values that are greater than the largest bin.
Assignment operator. Self is a copy of the data in h.
Histogram & Histogram::resetCounts | ( | ) |
Removes all data values from the histogram. Each bin count, including larger and smaller counts, is set to 0. The bin boundaries are retained. Returns a reference to self.
|
inline |
Returns the total accumulated number of data values that are less than the smallest bin.
|
inline |
Returns the total accumulated number of data values in the histogram. This the sum of all the bin counts, plus the number of data values that are smaller than the smallest bin, and the number of data values that are larger than the largest bin.
|
friend |
Outputs a summary of the histogram h on std::ostream s.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |