All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
te::qt::widgets::Histogram Class Reference

A class to represent a Histogram. More...

#include <Histogram.h>

Public Member Functions

void adjustOids (te::dt::AbstractData *interval, std::vector< te::da::ObjectId * > valuesOIds)
 It will populate the IntervalToObjectIdSet with the given interval and it's matching objectIds. More...
 
te::da::ObjectIdSetfind (te::dt::AbstractData *interval)
 It returns an ObjectIdSet containing all the object Ids associeted with the given interval. More...
 
const te::dt::AbstractDatafind (const te::da::ObjectId *oid)
 It returns an AbstractData representing the interval that contains the given ObjectId. More...
 
double & getInterval ()
 It returns the histogram's interval. Will be invalid if the histogram was created based on string intervals. More...
 
double & getMinValue ()
 It returns the histogram's minimum value. Will be invalid if the histogram was created based on string intervals. More...
 
std::set< std::string > & getStringInterval ()
 It returns the histogram's string set of intervals. Will be invalid if the histogram was created based on numeric (double, float, etc) intervals. More...
 
std::map< std::string,
unsigned int > 
getStringValues ()
 It returns the map containing the histogram String values. The key is a unique string that represents an interval and the unsigned int is the frequency of that interval. More...
 
int & getType ()
 It returns the histogram's type. More...
 
std::map< double, unsigned int > getValues ()
 It returns the map containing the histogram values. The key is the minimum values of the histogram's interval, and the unsigned int is the frequency of that interval. More...
 
 Histogram ()
 Constructor. More...
 
void insert (std::pair< te::dt::AbstractData *, unsigned int > new_value, std::vector< te::da::ObjectId * > valuesOIds)
 It adds a new value to the map containing the histogram values. More...
 
void insert (std::pair< te::dt::AbstractData *, unsigned int > new_value)
 It adds a new value to the map containing the histogram values. The AbstractData represents the interval and the unsigned int represents that interval's frequency. More...
 
void insert (te::dt::AbstractData *interval, unsigned int frequency, std::vector< te::da::ObjectId * > valuesOIds)
 It adds a new value to the map containing the histogram values. More...
 
void insert (te::dt::AbstractData *interval, unsigned int frequency)
 It adds a new value to the map containing the histogram values. The AbstractData will represent the interval and the unsigned int wil represent that intervals frequency. More...
 
void setInterval (double new_Interval)
 It sets the histogram's interval. More...
 
void setMinValue (double new_minValue)
 It sets the histogram's minimum value. More...
 
void setStringInterval (std::set< std::string > new_Interval)
 It sets the histogram's string set of intervals. More...
 
void setType (int new_type)
 It sets the histogram's type. More...
 
 ~Histogram ()
 Destructor. More...
 

Private Attributes

int m_histogramType
 Histogram's type. More...
 
double m_interval
 Histogram's numeric interval. More...
 
double m_minValue
 Histogram's minimum numeric value. More...
 
std::set< std::string > m_StringIntervals
 Histogram unique strings set, represents string intervals. More...
 
HistogramValues m_values
 Histogram's values;. More...
 
IntervalToObjectIdSet m_valuesOids
 The intervals and ObjecIds ordered in a boost multi index container. More...
 

Detailed Description

A class to represent a Histogram.

Definition at line 56 of file Histogram.h.

Constructor & Destructor Documentation

te::qt::widgets::Histogram::Histogram ( )

Constructor.

Definition at line 31 of file Histogram.cpp.

te::qt::widgets::Histogram::~Histogram ( )

Destructor.

Definition at line 36 of file Histogram.cpp.

Member Function Documentation

void te::qt::widgets::Histogram::adjustOids ( te::dt::AbstractData interval,
std::vector< te::da::ObjectId * >  valuesOIds 
)

It will populate the IntervalToObjectIdSet with the given interval and it's matching objectIds.

Parameters
intervalThe interval that contains the given objectIds.
valuesOIdsThe vector containing the ObjectIds related to the given interval

Definition at line 167 of file Histogram.cpp.

te::da::ObjectIdSet * te::qt::widgets::Histogram::find ( te::dt::AbstractData interval)

It returns an ObjectIdSet containing all the object Ids associeted with the given interval.

Parameters
intervalThe interval that will be searched.
Note
it can return an empty ObjectIdSet if none ObjectIds were found. (f.e. if the user clicks on an empty area of the chart)
The caller will take ownership of the returned pointer

Definition at line 134 of file Histogram.cpp.

References te::da::ObjectIdSet::add(), and te::da::ObjectId::addValue().

const te::dt::AbstractData * te::qt::widgets::Histogram::find ( const te::da::ObjectId oid)

It returns an AbstractData representing the interval that contains the given ObjectId.

Parameters
oidThe ObjectId that will be searched.

Definition at line 160 of file Histogram.cpp.

References te::da::ObjectId::getValueAsString().

double & te::qt::widgets::Histogram::getInterval ( )

It returns the histogram's interval. Will be invalid if the histogram was created based on string intervals.

Returns
The histogram's interval.

Definition at line 93 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram(), and te::qt::widgets::HistogramChart::HistogramChart().

double & te::qt::widgets::Histogram::getMinValue ( )

It returns the histogram's minimum value. Will be invalid if the histogram was created based on string intervals.

Returns
The histogram's minimum value.

Definition at line 83 of file Histogram.cpp.

Referenced by te::qt::widgets::HistogramChart::HistogramChart().

std::set< std::string > & te::qt::widgets::Histogram::getStringInterval ( )

It returns the histogram's string set of intervals. Will be invalid if the histogram was created based on numeric (double, float, etc) intervals.

Returns
The histogram's interval.

Definition at line 103 of file Histogram.cpp.

Referenced by te::qt::widgets::HistogramChart::HistogramChart().

std::map< std::string, unsigned int > te::qt::widgets::Histogram::getStringValues ( )

It returns the map containing the histogram String values. The key is a unique string that represents an interval and the unsigned int is the frequency of that interval.

Returns
A map containing the histogram values.

Definition at line 74 of file Histogram.cpp.

Referenced by te::qt::widgets::HistogramChart::HistogramChart().

int & te::qt::widgets::Histogram::getType ( )

It returns the histogram's type.

Returns
And int that represents the histogram's type.

Definition at line 53 of file Histogram.cpp.

Referenced by te::qt::widgets::HistogramChart::HistogramChart().

std::map< double, unsigned int > te::qt::widgets::Histogram::getValues ( )

It returns the map containing the histogram values. The key is the minimum values of the histogram's interval, and the unsigned int is the frequency of that interval.

Returns
A map containing the histogram values.

Definition at line 63 of file Histogram.cpp.

Referenced by te::qt::widgets::HistogramChart::HistogramChart().

void te::qt::widgets::Histogram::insert ( std::pair< te::dt::AbstractData *, unsigned int >  new_value,
std::vector< te::da::ObjectId * >  valuesOIds 
)

It adds a new value to the map containing the histogram values.

Parameters
new_valueThe value that will be added. The AbstractData represents the interval and the unsigned int represents that interval's frequency.
valuesOIdsA vector containing all the ObjectIds contained by the interval
Note
It will take the ownwership of the given pointers

Definition at line 113 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram().

void te::qt::widgets::Histogram::insert ( std::pair< te::dt::AbstractData *, unsigned int >  new_value)

It adds a new value to the map containing the histogram values. The AbstractData represents the interval and the unsigned int represents that interval's frequency.

Parameters
new_valueThe value that will be added.

Definition at line 119 of file Histogram.cpp.

void te::qt::widgets::Histogram::insert ( te::dt::AbstractData interval,
unsigned int  frequency,
std::vector< te::da::ObjectId * >  valuesOIds 
)

It adds a new value to the map containing the histogram values.

Parameters
intervalThe AbstractData that represents the interval and the unsigned int wil represent that intervals frequency.
frequencyThe unsigned int that represents that interval's frequency.
valuesOIdsA vector containing all the ObjectIds contained by the interval
Note
It will take the ownwership of the given pointers

Definition at line 124 of file Histogram.cpp.

References insert().

void te::qt::widgets::Histogram::insert ( te::dt::AbstractData interval,
unsigned int  frequency 
)

It adds a new value to the map containing the histogram values. The AbstractData will represent the interval and the unsigned int wil represent that intervals frequency.

Parameters
intervalThe AbstractData that represents the interval and the unsigned int wil represent that intervals frequency.
frequencyThe unsigned int that represents that interval's frequency.

Definition at line 129 of file Histogram.cpp.

References insert().

void te::qt::widgets::Histogram::setInterval ( double  new_Interval)

It sets the histogram's interval.

Parameters
new_valuesThe new histogram's interval.

Definition at line 98 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram().

void te::qt::widgets::Histogram::setMinValue ( double  new_minValue)

It sets the histogram's minimum value.

Parameters
new_minValueThe new minimum value.

Definition at line 88 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram().

void te::qt::widgets::Histogram::setStringInterval ( std::set< std::string >  new_Interval)

It sets the histogram's string set of intervals.

Parameters
new_valuesThe new histogram's interval.

Definition at line 108 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram().

void te::qt::widgets::Histogram::setType ( int  new_type)

It sets the histogram's type.

Parameters
new_typeThe new type

Definition at line 58 of file Histogram.cpp.

Referenced by te::qt::widgets::createHistogram().

Member Data Documentation

int te::qt::widgets::Histogram::m_histogramType
private

Histogram's type.

Definition at line 209 of file Histogram.h.

double te::qt::widgets::Histogram::m_interval
private

Histogram's numeric interval.

Definition at line 212 of file Histogram.h.

double te::qt::widgets::Histogram::m_minValue
private

Histogram's minimum numeric value.

Definition at line 211 of file Histogram.h.

std::set<std::string> te::qt::widgets::Histogram::m_StringIntervals
private

Histogram unique strings set, represents string intervals.

Definition at line 213 of file Histogram.h.

HistogramValues te::qt::widgets::Histogram::m_values
private

Histogram's values;.

Definition at line 210 of file Histogram.h.

IntervalToObjectIdSet te::qt::widgets::Histogram::m_valuesOids
private

The intervals and ObjecIds ordered in a boost multi index container.

Definition at line 214 of file Histogram.h.


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