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;
41 SpeedQuantizer(unsigned);
43 void learn(unsigned, float, float);
44 float get_speed(unsigned) const;
45 float quantize_speed(float) const;
46 unsigned find_speed_step(float) const;
48 void save(std::list<Msp::DataFile::Statement> &) const;