10 #include "util/SimpleRNG.hpp"
15 #include <boost/iostreams/device/mapped_file.hpp>
26 static inline bool compare(std::string file1, std::string file2)
28 boost::iostreams::mapped_file_source f1(file1);
29 boost::iostreams::mapped_file_source f2(file2);
31 if( f1.size() == f2.size() && std::equal(f1.data(), f1.data() + f1.size(), f2.data()) )
52 return std::to_string(
R) +
" " + std::to_string(
G) +
" " + std::to_string(
B);
77 static inline struct RGB getColor(int group,
SimpleRNG & d)
81 float s = (float)d.GetUniform();
85 #ifdef ON_IO_UNIT_TESTS
149 else if (group == 10)
171 static inline bool hasEnding (std::string
const &fullString, std::string
const &ending)
173 if (fullString.length() >= ending.length())
174 {
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));}
std::string toString()
Return the color as string.
SimpleRNG is a simple random number generator based on George Marsaglia's MWC (multiply with carry) g...