Disaggregate
Disaggregate Smart Meter data

Histogram Class Reference

#include <Histogram.h>

Inheritance diagram for Histogram:
Collaboration diagram for Histogram:

List of all members.

Public Member Functions

 Histogram (const Array< Sample_t > &source, const size_t xaxis=MAX_WATTAGE)
 Create a (relative) histogram from a sample array.
virtual const std::string getBaseFilename () const
virtual void drawGraph ()
const size_t getSizeOfSource () const

Protected Attributes

size_t sizeOfSource

Detailed Description

Definition at line 14 of file Histogram.h.


Constructor & Destructor Documentation

Histogram::Histogram ( const Array< Sample_t > &  source,
const size_t  xaxis = MAX_WATTAGE 
)

Create a (relative) histogram from a sample array.

Parameters:
xaxisNumber of elements on the xaxis of the histogram

Definition at line 13 of file Histogram.cpp.

References Array< Histogram_t >::data, Array< Histogram_t >::deviceName, Array< T >::getDeviceName(), Array< T >::getSmoothing(), Utils::roundToNearestInt(), Array< Histogram_t >::setAllEntriesTo(), Array< Histogram_t >::setSize(), sizeOfSource, Array< Histogram_t >::smoothing, and Array< Histogram_t >::upstreamSmoothing.

Here is the call graph for this function:


Member Function Documentation

void Histogram::drawGraph ( ) [virtual]

Definition at line 42 of file Histogram.cpp.

References GNUplot::PlotVars::data, Array< Histogram_t >::dumpToFile(), getBaseFilename(), GNUplot::PlotVars::inFilename, GNUplot::PlotVars::outFilename, GNUplot::plot(), GNUplot::PlotVars::plotArgs, GNUplot::PlotVars::title, GNUplot::PlotVars::xlabel, and GNUplot::PlotVars::ylabel.

Referenced by Signature::updatePowerStates().

Here is the call graph for this function:

Here is the caller graph for this function:

const std::string Histogram::getBaseFilename ( ) const [virtual]

Reimplemented from Array< Histogram_t >.

Definition at line 34 of file Histogram.cpp.

References Array< Histogram_t >::deviceName, Utils::size_t_to_s(), Array< Histogram_t >::smoothing, and Array< Histogram_t >::upstreamSmoothing.

Referenced by drawGraph(), and Signature::drawHistWithStateBars().

Here is the call graph for this function:

Here is the caller graph for this function:

const size_t Histogram::getSizeOfSource ( ) const

Definition at line 64 of file Histogram.cpp.

References sizeOfSource.

Referenced by Statistic< Sample_t >::Statistic().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 30 of file Histogram.h.

Referenced by getSizeOfSource(), and Histogram().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends