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... | |
void | clear () |
A function used to clear the contents of the histogram, deleting the pointers contained by the boost containers used to store the histogram's data. 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... | |
bool | isSummarized () |
It returns a boolean that holds whether the histogram has been created from summarized values or not. 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 | setSummarized (bool summarized) |
It sets the property that holds whether the histogram has been created from summarized values or not. More... | |
void | setType (int new_type) |
It sets the histogram's type. More... | |
void | setValues (std::map< te::dt::AbstractData *, unsigned int > values) |
It sets the histogram's values. More... | |
~Histogram () | |
Destructor. More... | |
Private Attributes | |
int | m_histogramType |
Histogram's type. More... | |
double | m_interval |
Histogram's numeric interval. More... | |
bool | m_isSummarized |
This property holds whether the histogram has been created from summarized values or not. 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 | ( | ) |
te::qt::widgets::Histogram::~Histogram | ( | ) |
Destructor.
Definition at line 37 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 220 of file Histogram.cpp.
void te::qt::widgets::Histogram::clear | ( | ) |
A function used to clear the contents of the histogram, deleting the pointers contained by the boost containers used to store the histogram's data.
Definition at line 146 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 165 of file Histogram.cpp.
References te::da::ObjectIdSet::add().
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 185 of file Histogram.cpp.
References te::da::ObjectIdSet::add().
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 210 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 105 of file Histogram.cpp.
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 95 of file Histogram.cpp.
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 115 of file Histogram.cpp.
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 86 of file Histogram.cpp.
int & te::qt::widgets::Histogram::getType | ( | ) |
It returns the histogram's type.
Definition at line 42 of file Histogram.cpp.
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 62 of file Histogram.cpp.
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 125 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 131 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 136 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 141 of file Histogram.cpp.
References insert().
bool te::qt::widgets::Histogram::isSummarized | ( | ) |
It returns a boolean that holds whether the histogram has been created from summarized values or not.
Definition at line 52 of file Histogram.cpp.
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 110 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 100 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 120 of file Histogram.cpp.
Referenced by te::qt::widgets::createHistogram().
void te::qt::widgets::Histogram::setSummarized | ( | bool | summarized | ) |
It sets the property that holds whether the histogram has been created from summarized values or not.
summarized | A boolean that holds whether the histogram has been created from summarized values or not |
Definition at line 57 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 47 of file Histogram.cpp.
Referenced by te::qt::widgets::createHistogram().
void te::qt::widgets::Histogram::setValues | ( | std::map< te::dt::AbstractData *, unsigned int > | values | ) |
It sets the histogram's values.
values | The new values. /note Any current data will be lost. /noter The ObjectIds will have to be manually adjusted later. |
Definition at line 73 of file Histogram.cpp.
|
private |
Histogram's type.
Definition at line 251 of file Histogram.h.
|
private |
Histogram's numeric interval.
Definition at line 253 of file Histogram.h.
Referenced by Histogram().
|
private |
This property holds whether the histogram has been created from summarized values or not.
Definition at line 250 of file Histogram.h.
|
private |
Histogram's minimum numeric value.
Definition at line 252 of file Histogram.h.
Referenced by Histogram().
|
private |
Histogram unique strings set, represents string intervals.
Definition at line 254 of file Histogram.h.
|
private |
Histogram's values;.
Definition at line 255 of file Histogram.h.
|
private |
The intervals and ObjecIds ordered in a boost multi index container.
Definition at line 256 of file Histogram.h.