ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
InteractivePlot Class Referenceabstract

#include <plotter.h>

Inheritance diagram for InteractivePlot:
InteractiveTimeSeriesPlot Plotter

Classes

struct  NoValueHighlightedCallbackArgs
 
struct  RangeSelectedCallbackArgs
 
struct  ValueHighlightedCallbackArgs
 

Public Types

typedef std::function< void(RangeSelectedCallbackArgs)> onRangeSelectedCallback
 
typedef std::function< void(ValueHighlightedCallbackArgs)> onValueHighlightedCallback
 

Public Member Functions

 InteractivePlot ()
 
void onRangeSelected (const onRangeSelectedCallback &cb, void *data=nullptr)
 
template<typename T1 , typename arg , class T >
void onRangeSelected (T1 *owner, void(T::*listenerMethod)(arg), void *data=nullptr)
 
void onValueHighlighted (const onValueHighlightedCallback &cb, void *data=nullptr)
 
template<typename T1 , typename arg , class T >
void onValueHighlighted (T1 *owner, void(T::*listenerMethod)(arg), void *data=nullptr)
 
virtual MatrixDouble getData (uint32_t x_start_idx, uint32_t x_end_idx)=0
 
virtual vector< double > getData (uint32_t x_idx)=0
 
std::pair< uint32_t, uint32_t > getSelection ()
 
void clearSelection ()
 

Protected Member Functions

virtual uint32_t mouseCoordinateToIndex (uint32_t x)=0
 
bool contains (uint32_t x, uint32_t y)
 
void mouseMoved (ofMouseEventArgs &arg)
 
void startSelection (ofMouseEventArgs &arg)
 
void duringSelection (ofMouseEventArgs &arg)
 
void normalize ()
 
void endSelection (ofMouseEventArgs &arg)
 

Protected Attributes

uint32_t x_
 
uint32_t y_
 
uint32_t w_
 
uint32_t h_
 
uint32_t x_move_
 
uint32_t x_click_
 
uint32_t x_release_
 
uint32_t x_start_
 
uint32_t x_end_
 
bool is_tracking_mouse_
 
onRangeSelectedCallback range_selected_callback_
 
void * range_selected_callback_data_
 
onValueHighlightedCallback value_highlighted_callback_
 
void * value_highlighted_callback_data_
 

Member Typedef Documentation

Constructor & Destructor Documentation

InteractivePlot::InteractivePlot ( )
inline

Member Function Documentation

void InteractivePlot::clearSelection ( )
inline
bool InteractivePlot::contains ( uint32_t  x,
uint32_t  y 
)
inlineprotected
void InteractivePlot::duringSelection ( ofMouseEventArgs &  arg)
inlineprotected
void InteractivePlot::endSelection ( ofMouseEventArgs &  arg)
inlineprotected
virtual MatrixDouble InteractivePlot::getData ( uint32_t  x_start_idx,
uint32_t  x_end_idx 
)
pure virtual

Implemented in InteractiveTimeSeriesPlot, and Plotter.

virtual vector<double> InteractivePlot::getData ( uint32_t  x_idx)
pure virtual

Implemented in InteractiveTimeSeriesPlot, and Plotter.

std::pair<uint32_t, uint32_t> InteractivePlot::getSelection ( )
inline
virtual uint32_t InteractivePlot::mouseCoordinateToIndex ( uint32_t  x)
protectedpure virtual

Implemented in InteractiveTimeSeriesPlot, and Plotter.

void InteractivePlot::mouseMoved ( ofMouseEventArgs &  arg)
inlineprotected
void InteractivePlot::normalize ( )
inlineprotected
void InteractivePlot::onRangeSelected ( const onRangeSelectedCallback cb,
void *  data = nullptr 
)
inline
template<typename T1 , typename arg , class T >
void InteractivePlot::onRangeSelected ( T1 *  owner,
void(T::*)(arg)  listenerMethod,
void *  data = nullptr 
)
inline
void InteractivePlot::onValueHighlighted ( const onValueHighlightedCallback cb,
void *  data = nullptr 
)
inline
template<typename T1 , typename arg , class T >
void InteractivePlot::onValueHighlighted ( T1 *  owner,
void(T::*)(arg)  listenerMethod,
void *  data = nullptr 
)
inline
void InteractivePlot::startSelection ( ofMouseEventArgs &  arg)
inlineprotected

Member Data Documentation

uint32_t InteractivePlot::h_
protected
bool InteractivePlot::is_tracking_mouse_
protected
onRangeSelectedCallback InteractivePlot::range_selected_callback_
protected
void* InteractivePlot::range_selected_callback_data_
protected
onValueHighlightedCallback InteractivePlot::value_highlighted_callback_
protected
void* InteractivePlot::value_highlighted_callback_data_
protected
uint32_t InteractivePlot::w_
protected
uint32_t InteractivePlot::x_
protected
uint32_t InteractivePlot::x_click_
protected
uint32_t InteractivePlot::x_end_
protected
uint32_t InteractivePlot::x_move_
protected
uint32_t InteractivePlot::x_release_
protected
uint32_t InteractivePlot::x_start_
protected
uint32_t InteractivePlot::y_
protected

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