mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
The default value of the first column is set to have the same increment as the two previous rows, when possible. This allow faster data entry when the values of the first column are evenly separated.
31 lines
685 B
C++
31 lines
685 B
C++
#ifndef SHARED_FLOAT_PAIR_STORE_H
|
|
#define SHARED_FLOAT_PAIR_STORE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace Shared {
|
|
|
|
class FloatPairStore {
|
|
public:
|
|
FloatPairStore();
|
|
// Delete the implicit copy constructor: the object is heavy
|
|
FloatPairStore(const FloatPairStore&) = delete;
|
|
double get(int i, int j);
|
|
void set(double f, int i, int j);
|
|
int numberOfPairs();
|
|
void deletePairAtIndex(int j);
|
|
void deleteAllPairs();
|
|
void resetColumn(int i);
|
|
double sumOfColumn(int i);
|
|
uint32_t storeChecksum();
|
|
constexpr static int k_maxNumberOfPairs = 100;
|
|
protected:
|
|
virtual double defaultValue(int i, int j);
|
|
int m_numberOfPairs;
|
|
double m_data[2][k_maxNumberOfPairs];
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|