Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
TimeSeriesPanel.hh
1
#ifndef VTESTBED_GUI_TIMESERIESPANEL_HH
2
#define VTESTBED_GUI_TIMESERIESPANEL_HH
3
4
#include <vtestbed/base/minmaxmean.hh>
5
#include <vtestbed/core/grid.hh>
6
#include <vtestbed/core/statistics.hh>
7
#include <vtestbed/gui/Window.hh>
8
#include <vtestbed/gui/types.hh>
9
10
namespace
vtb
{
11
12
namespace
gui {
13
14
template
<
class
T>
15
class
TimeSeriesPanel
:
public
Window
{
16
17
private
:
18
typedef
vtb::core::Statistics<T>
statistics_type
;
19
typedef
typename
statistics_type::time_series
time_series
;
20
typedef
vtb::core::Grid<T,1>
grid1
;
21
22
private
:
23
std::vector<Float>
_series;
24
vtb::base::MinMaxMean<T>
_stats;
25
static
constexpr
const
T min_range = T{0};
26
27
public
:
28
29
void
30
step(
31
const
time_series
& t,
32
const
time_series
& x,
33
const
grid1
& grid
34
);
35
36
void
37
draw();
38
39
inline
void
clear() { this->_stats.clear(); }
40
41
};
42
43
}
44
45
}
46
47
#endif // vim:filetype=cpp
vtb::gui::TimeSeriesPanel
Definition:
TimeSeriesPanel.hh:15
vtb::base::MinMaxMean
Definition:
minmaxmean.hh:14
vtb::core::Grid
A region defined by start and end index and lower and upper bound for each dimension.
Definition:
core/grid.hh:25
vtb::core::Statistics
Definition:
statistics.hh:63
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< Float >
vtb::gui::Window
Definition:
Window.hh:12
vtb::core::Circular_buffer
Fixed-size circular buffer. Used as time series storage.
Definition:
circular_buffer.hh:20
Generated by
1.8.15