3 This file is part of R²C²
4 Copyright © 2011 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_SPEEDQUANTIZER_H_
9 #define LIBR2C2_SPEEDQUANTIZER_H_
13 #include <msp/datafile/objectloader.h>
20 class Loader: public Msp::DataFile::ObjectLoader<SpeedQuantizer>
23 Loader(SpeedQuantizer &);
25 void step(unsigned, float, float);
35 void add(float, float);
38 std::vector<SpeedStep> steps;
42 SpeedQuantizer(unsigned);
44 void learn(unsigned, float, float);
45 float get_speed(unsigned) const;
46 float quantize_speed(float) const;
47 unsigned find_speed_step(float) const;
49 void save(std::list<Msp::DataFile::Statement> &) const;