![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
A line graph plotter. More...
#include <klang.h>
Classes | |
| struct | Axes |
| Graph axes (x/y) More... | |
| struct | Axis |
| Graph axis. More... | |
| struct | Data |
| Graph data. More... | |
| struct | Point |
| A data point. More... | |
| struct | Series |
| Data series. More... | |
Public Member Functions | |
| virtual | ~Graph () |
| size_t | capacity () const |
| void | clear () |
| Graph & | operator() (double min, double max) |
| Graph::Series & | operator[] (int index) |
| const Graph::Series & | operator[] (int index) const |
| Graph & | operator() (double x_min, double x_max, double y_min, double y_max) |
| operator Series & () | |
| template<typename SIGNAL , typename... Args> | |
| void | plot (Generic::Function< SIGNAL, Args... > &function) |
| Plot the given Function. | |
| template<typename TYPE > | |
| void | plot (TYPE(*function)(TYPE)) |
| Plot the given function of x. | |
| template<typename FUNCTION , typename... VALUES> | |
| void | plot (FUNCTION f, VALUES... values) |
| Plot the given function for x plus additional arguments. | |
| template<typename TYPE > | |
| void | add (TYPE y) |
| Add a data point (incrementing x) | |
| void | add (const Point pt) |
| Add a data point. | |
| template<typename TYPE > | |
| Graph & | operator+= (TYPE y) |
| Add a data point (incrementing x) | |
| Graph & | operator+= (const Point pt) |
| Add a data point. | |
| template<typename TYPE > | |
| Graph & | operator= (TYPE(*function)(TYPE)) |
| Plot the given function of x. | |
| Graph & | operator= (std::initializer_list< Point > values) |
| Plot the given data points. | |
| Graph & | operator+= (std::initializer_list< Point > values) |
| Plot the given data points. | |
| template<typename... Args> | |
| Graph & | operator<< (Function< Args... > &function) |
| Plot the given function for x plus additional arguments. | |
| template<typename TYPE > | |
| Graph & | operator<< (TYPE &in) |
| template<typename TYPE > | |
| Graph & | operator<< (const TYPE &in) |
| const Axes & | getAxes () const |
| void | getAxes (Axes &axes) const |
| const Data & | getData () const |
| bool | isDirty () const |
| void | setDirty (bool dirty) |
| void | truncate (unsigned int count) |
Protected Attributes | |
| Axes | axes |
| Data | data |
| bool | dirty = false |
|
inlinevirtual |
|
inline |
Definition at line 3558 of file klang.h.
References klang::Array< TYPE, CAPACITY >::add(), klang::Generic::Graph< SIZE >::data, and klang::Generic::Graph< SIZE >::dirty.
|
inline |
Definition at line 3556 of file klang.h.
References klang::Array< TYPE, CAPACITY >::add(), klang::Generic::Graph< SIZE >::data, and klang::Generic::Graph< SIZE >::dirty.
Referenced by klang::Generic::Graph< SIZE >::operator+=(), klang::Generic::Graph< SIZE >::operator+=(), klang::Generic::Graph< SIZE >::operator+=(), klang::Generic::Graph< SIZE >::operator<<(), and klang::Generic::Graph< SIZE >::operator<<().
|
inline |
|
inline |
Definition at line 3453 of file klang.h.
References klang::Generic::Graph< SIZE >::axes, klang::Array< TYPE, CAPACITY >::clear(), klang::Generic::Graph< SIZE >::Axes::clear(), klang::Generic::Graph< SIZE >::clear(), klang::Generic::Graph< SIZE >::data, and klang::Generic::Graph< SIZE >::dirty.
Referenced by klang::Generic::Graph< SIZE >::clear(), and klang::Generic::Graph< SIZE >::operator=().
|
inline |
|
inline |
Definition at line 3598 of file klang.h.
References klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::Axis::clear(), klang::Generic::Graph< SIZE >::data, klang::Generic::Graph< SIZE >::Axis::from(), klang::Generic::Graph< SIZE >::Axis::max, klang::Generic::Graph< SIZE >::Axis::min, klang::Generic::Graph< SIZE >::Axis::valid(), klang::Generic::Graph< SIZE >::Axes::x, klang::Generic::Graph< SIZE >::Point::x, klang::Generic::Graph< SIZE >::Axes::y, and klang::Generic::Graph< SIZE >::Point::y.
|
inline |
|
inline |
|
inline |
Definition at line 3506 of file klang.h.
References klang::Generic::Graph< SIZE >::data, and klang::Generic::Graph< SIZE >::dirty.
|
inline |
Definition at line 3484 of file klang.h.
References klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::dirty, klang::Generic::Graph< SIZE >::Axis::max, klang::Generic::Graph< SIZE >::Axis::min, and klang::Generic::Graph< SIZE >::Axes::x.
|
inline |
Definition at line 3499 of file klang.h.
References klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::dirty, klang::Generic::Graph< SIZE >::Axis::max, klang::Generic::Graph< SIZE >::Axis::min, klang::Generic::Graph< SIZE >::Axes::x, and klang::Generic::Graph< SIZE >::Axes::y.
|
inline |
|
inline |
Definition at line 3579 of file klang.h.
References klang::Generic::Graph< SIZE >::add().
|
inline |
Definition at line 3562 of file klang.h.
References klang::Generic::Graph< SIZE >::add().
Referenced by klang::Generic::Graph< SIZE >::operator=().
|
inline |
|
inline |
Definition at line 3586 of file klang.h.
References klang::Generic::Graph< SIZE >::plot(), and klang::Generic::Function< SIGNAL, Args >::with().
|
inline |
|
inline |
Definition at line 3574 of file klang.h.
References klang::Generic::Graph< SIZE >::clear(), and klang::Generic::Graph< SIZE >::operator+=().
|
inline |
Definition at line 3568 of file klang.h.
References klang::Generic::Graph< SIZE >::plot().
|
inline |
Definition at line 3490 of file klang.h.
References klang::Generic::Graph< SIZE >::data, and klang::Generic::Graph< SIZE >::dirty.
|
inline |
Definition at line 3495 of file klang.h.
References klang::Generic::Graph< SIZE >::data.
|
inline |
Definition at line 3541 of file klang.h.
References klang::Array< TYPE, CAPACITY >::add(), klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::data, klang::Generic::Graph< SIZE >::dirty, klang::Generic::Graph< SIZE >::Data::find(), klang::Generic::Graph< SIZE >::Series::plot(), klang::Generic::Graph< SIZE >::Axis::valid(), klang::Generic::Function< SIGNAL, Args >::with(), and klang::Generic::Graph< SIZE >::Axes::x.
|
inline |
Definition at line 3513 of file klang.h.
References klang::Array< TYPE, CAPACITY >::add(), klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::data, klang::Generic::Graph< SIZE >::dirty, klang::Generic::Graph< SIZE >::Data::find(), klang::Generic::Graph< SIZE >::Series::plot(), klang::Generic::Graph< SIZE >::Axis::valid(), and klang::Generic::Graph< SIZE >::Axes::x.
Referenced by klang::Generic::Graph< SIZE >::operator<<(), klang::Graph::operator<<(), klang::Generic::Graph< SIZE >::operator=(), klang::Generic::Function< SIGNAL, Args >::operator>>(), and klang::Generic::Function< SIGNAL, Args >::operator>>().
|
inline |
Definition at line 3527 of file klang.h.
References klang::Array< TYPE, CAPACITY >::add(), klang::Generic::Graph< SIZE >::axes, klang::Generic::Graph< SIZE >::data, klang::Generic::Graph< SIZE >::dirty, klang::Generic::Graph< SIZE >::Data::find(), klang::Generic::Graph< SIZE >::Series::plot(), klang::Generic::Graph< SIZE >::Axis::valid(), and klang::Generic::Graph< SIZE >::Axes::x.
|
inline |
|
inline |
Definition at line 3619 of file klang.h.
References klang::Array< TYPE, CAPACITY >::count, and klang::Generic::Graph< SIZE >::data.
|
protected |
Definition at line 3629 of file klang.h.
Referenced by klang::Generic::Graph< SIZE >::clear(), klang::Generic::Graph< SIZE >::getAxes(), klang::Generic::Graph< SIZE >::getAxes(), klang::Generic::Graph< SIZE >::operator()(), klang::Generic::Graph< SIZE >::operator()(), klang::Generic::Graph< SIZE >::plot(), klang::Generic::Graph< SIZE >::plot(), and klang::Generic::Graph< SIZE >::plot().
|
protected |
Definition at line 3630 of file klang.h.
Referenced by klang::Generic::Graph< SIZE >::add(), klang::Generic::Graph< SIZE >::add(), klang::Generic::Graph< SIZE >::clear(), klang::Generic::Graph< SIZE >::getAxes(), klang::Generic::Graph< SIZE >::getData(), klang::Generic::Graph< SIZE >::operator Series &(), klang::Generic::Graph< SIZE >::operator[](), klang::Generic::Graph< SIZE >::operator[](), klang::Generic::Graph< SIZE >::plot(), klang::Generic::Graph< SIZE >::plot(), klang::Generic::Graph< SIZE >::plot(), and klang::Generic::Graph< SIZE >::truncate().
|
protected |
Definition at line 3631 of file klang.h.
Referenced by klang::Generic::Graph< SIZE >::add(), klang::Generic::Graph< SIZE >::add(), klang::Generic::Graph< SIZE >::clear(), klang::Generic::Graph< SIZE >::isDirty(), klang::Generic::Graph< SIZE >::operator Series &(), klang::Generic::Graph< SIZE >::operator()(), klang::Generic::Graph< SIZE >::operator()(), klang::Generic::Graph< SIZE >::operator[](), klang::Generic::Graph< SIZE >::plot(), klang::Generic::Graph< SIZE >::plot(), klang::Generic::Graph< SIZE >::plot(), and klang::Generic::Graph< SIZE >::setDirty().