Limited ErrorPlotter buffer size
This commit is contained in:
parent
0f7c617f9c
commit
c5fbe764a6
@ -28,6 +28,11 @@ void ErrorPlotter::clear()
|
||||
|
||||
void ErrorPlotter::addErrorValue(double errorValue)
|
||||
{
|
||||
if (m_errorValues.size() == m_bufferSize)
|
||||
{
|
||||
m_errorValues.pop_front();
|
||||
}
|
||||
|
||||
m_errorValues.push_back(errorValue);
|
||||
m_maxErrorValue = std::max<double>(m_maxErrorValue, errorValue);
|
||||
|
||||
|
@ -11,6 +11,8 @@ private:
|
||||
std::list<double> m_errorValues;
|
||||
double m_maxErrorValue;
|
||||
|
||||
size_t m_bufferSize = 10000;
|
||||
|
||||
public:
|
||||
explicit ErrorPlotter(QWidget *parent = 0);
|
||||
|
||||
|
Reference in New Issue
Block a user