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::ObjectIdSet * | find (te::dt::AbstractData *interval) |
It returns an ObjectIdSet containing all the object Ids associeted with the given interval. More... | |
te::da::ObjectIdSet * | find (std::vector< te::dt::AbstractData * > intervals) |
It returns an ObjectIdSet containing all the object Ids associeted with the given interval list. More... | |
const te::dt::AbstractData * | find (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... | |
A class to represent a Histogram.
Definition at line 56 of file Histogram.h.
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.
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.
interval | The interval that contains the given objectIds. |
valuesOIds | The vector containing the ObjectIds related to the given interval |
Definition at line 199 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.
interval | The interval that will be searched. |
Definition at line 134 of file Histogram.cpp.
References te::da::ObjectIdSet::add(), and te::da::ObjectId::addValue().
te::da::ObjectIdSet * te::qt::widgets::Histogram::find | ( | std::vector< te::dt::AbstractData * > | intervals | ) |
It returns an ObjectIdSet containing all the object Ids associeted with the given interval list.
intervals | A vector containing all the intervals within the selection box |
Definition at line 161 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.
oid | The ObjectId that will be searched. |
Definition at line 192 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.
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.
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.
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.
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.
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.
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.
new_value | The value that will be added. The AbstractData represents the interval and the unsigned int represents that interval's frequency. |
valuesOIds | A vector containing all the ObjectIds contained by the interval |
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.
new_value | The 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.
interval | The AbstractData that represents the interval and the unsigned int wil represent that intervals frequency. |
frequency | The unsigned int that represents that interval's frequency. |
valuesOIds | A vector containing all the ObjectIds contained by the interval |
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.
interval | The AbstractData that represents the interval and the unsigned int wil represent that intervals frequency. |
frequency | The 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.
new_values | The 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.
new_minValue | The 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.
new_values | The 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.
new_type | The new type |
Definition at line 58 of file Histogram.cpp.
Referenced by te::qt::widgets::createHistogram().
|
private |
Histogram's type.
Definition at line 221 of file Histogram.h.
|
private |
Histogram's numeric interval.
Definition at line 224 of file Histogram.h.
|
private |
Histogram's minimum numeric value.
Definition at line 223 of file Histogram.h.
|
private |
Histogram unique strings set, represents string intervals.
Definition at line 225 of file Histogram.h.
|
private |
Histogram's values;.
Definition at line 222 of file Histogram.h.
|
private |
The intervals and ObjecIds ordered in a boost multi index container.
Definition at line 226 of file Histogram.h.