Blame view

build3/apps/shared/float_pair_store.h 678 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #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 m_numberOfPairs;
    double m_data[2][k_maxNumberOfPairs];
  };
  
  }
  
  #endif