summaryrefslogtreecommitdiff
path: root/training/dpmert/error_surface.h
blob: bb65847b0a36af863148d0daf203bdd739489c05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef _ERROR_SURFACE_H_
#define _ERROR_SURFACE_H_

#include <vector>
#include <string>

#include "ns.h"

class Score;

struct ErrorSegment {
  double x;
  SufficientStats delta;
  ErrorSegment() : x(0), delta() {}
};

class ErrorSurface : public std::vector<ErrorSegment> {
 public:
  ~ErrorSurface();
  void Serialize(std::string* out) const;
  void Deserialize(const std::string& in);
};

#endif