A line graph plotter.
More...
#include <klang.h>
Definition at line 2042 of file klang.h.
◆ add() [1/2]
◆ add() [2/2]
◆ capacity()
◆ clear()
Definition at line 1759 of file klang.h.
1759 {
1762 for (int s = 0; s < GRAPH_SERIES; s++)
1765 }
◆ getAxes() [1/2]
◆ getAxes() [2/2]
Definition at line 1904 of file klang.h.
1904 {
1905 if (!
axes.x.valid()) {
1907 for (int s = 0; s < GRAPH_SERIES; s++)
1909 if (!
axes.y.valid() &&
axes.y.max != 0)
1911 }
1912 if (!
axes.y.valid()) {
1914 for (int s = 0; s < GRAPH_SERIES; s++)
1916 if (!
axes.y.valid() &&
axes.y.max != 0)
1918 }
1919 }
◆ getData()
◆ isDirty()
◆ operator Series &()
◆ operator()() [1/2]
Definition at line 1790 of file klang.h.
1790 {
1793 return *this;
1794 }
TYPE1 max(TYPE1 a, TYPE2 b)
Return the minimum of two values.
TYPE1 min(TYPE1 a, TYPE2 b)
Return the minimum of two values.
◆ operator()() [2/2]
Definition at line 1805 of file klang.h.
1805 {
1807 axes.x.min = x_min;
axes.x.max = x_max;
1808 axes.y.min = y_min;
axes.y.max = y_max;
1809 return *this;
1810 }
◆ operator+=() [1/3]
Definition at line 1870 of file klang.h.
1870{
add(pt);
return *
this; }
◆ operator+=() [2/3]
Definition at line 1885 of file klang.h.
1885 {
1886 for (const auto& value : values)
1888 return *this;
1889 }
◆ operator+=() [3/3]
Definition at line 1868 of file klang.h.
1868{
add(y);
return *
this; }
◆ operator<<() [1/4]
Definition at line 1898 of file klang.h.
1898{
add(in);
return *
this; }
◆ operator<<() [2/4]
Definition at line 1892 of file klang.h.
1892 {
1893 plot(
function.with());
1894 return *this;
1895 }
void plot(Generic::Function< SIGNAL, Args... > &function)
◆ operator<<() [3/4]
Definition at line 1897 of file klang.h.
1897{
add(in);
return *
this; }
◆ operator<<() [4/4]
template<typename... Args>
Graph & klang::Graph::operator<< |
( |
Function< Args... > & | function | ) |
|
|
inline |
Definition at line 2047 of file klang.h.
2047 {
2048 plot(function.with());
2049 return *this;
2050 }
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ plot() [1/3]
Definition at line 1847 of file klang.h.
1847 {
1848 thread_local static Function fun(f);
1850 if (!series)
1852 if (series) {
1854 if (!
axes.x.valid())
1856 series->plot(fun.with(values...),
axes.x);
1857 }
1858 }
Function() -> Function< signal, Args... >
void add(const TYPE &item)
Add the specified item to the end of the array.
Series * find(void *function)
◆ plot() [2/3]
Definition at line 1819 of file klang.h.
1819 {
1821 if (!series)
1823 if (series) {
1825 if (!
axes.x.valid())
1827 series->plot(
function,
axes.x);
1828 }
1829 }
◆ plot() [3/3]
Definition at line 1833 of file klang.h.
1833 {
1835 if (!series)
1837 if (series) {
1839 if (!
axes.x.valid())
1841 series->plot(
function,
axes.x);
1842 }
1843 }
◆ setDirty()
◆ truncate()
Definition at line 1925 of file klang.h.
1925 {
1926 if (count <
data.count)
1928
1929 for (int s = 0; s < GRAPH_SERIES; s++)
1930 if (count <
data[s].count)
1931 data[s].count = count;
1932 }
◆ axes
◆ data
◆ dirty