Files
Upsilon/apps/graph/values/interval.h
Émilie Feral eb976ad0cf [apps/graph/values] Enable to delete row by row
Change-Id: I25b14091711af3d7afd64413839a2664fc98a051
2017-01-09 15:08:56 +01:00

36 lines
782 B
C++

#ifndef GRAPH_VALUES_INTERVAL_H
#define GRAPH_VALUES_INTERVAL_H
namespace Graph {
class Interval {
public:
Interval();
// Delete the implicit copy constructor: the object is heavy
Interval(const Interval&) = delete;
int numberOfElements();
void deleteElementAtIndex(int index);
float element(int i);
float start();
float end();
float step();
void setStart(float f);
void setEnd(float f);
void setStep(float f);
void setElement(int i, float f);
// TODO: decide the max number of elements after optimization
constexpr static int k_maxNumberOfElements = 500;
private:
void computeElements();
int m_numberOfElements;
float m_intervalBuffer[k_maxNumberOfElements];
float m_start;
float m_end;
float m_step;
bool m_needCompute;
};
}
#endif