39 const std::vector<geometrize::Scanline>& lines,
40 const std::uint32_t alpha,
57 const std::vector<geometrize::Scanline>& lines,
58 const std::uint32_t alpha,
75 const std::vector<geometrize::Scanline>& lines,
101 const std::vector<Scanline>& lines);
117 const std::function<std::shared_ptr<geometrize::Shape>(
void)>& shapeCreator,
The Bitmap class is a helper class for working with bitmap data.
Definition: bitmap.h:16
The State class relates a shape and related properties to a measure of how close it brings the workin...
Definition: state.h:21
std::function< double(const std::vector< geometrize::Scanline > &lines, const std::uint32_t alpha, const geometrize::Bitmap &target, const geometrize::Bitmap ¤t, geometrize::Bitmap &buffer, double score)> EnergyFunction
EnergyFunction Type alias for a function that calculates a measure of the improvement adding the scan...
Definition: core.h:44
double differenceFull(const geometrize::Bitmap &first, const geometrize::Bitmap &second)
differenceFull Calculates the root-mean-square error between two bitmaps.
Definition: core.cpp:174
geometrize::rgba computeColor(const geometrize::Bitmap &target, const geometrize::Bitmap ¤t, const std::vector< geometrize::Scanline > &lines, const std::uint8_t alpha)
computeColor Calculates the color of the scanlines.
Definition: core.cpp:122
double defaultEnergyFunction(const std::vector< geometrize::Scanline > &lines, const std::uint32_t alpha, const geometrize::Bitmap &target, const geometrize::Bitmap ¤t, geometrize::Bitmap &buffer, const double score)
defaultEnergyFunction The default/built-in energy function that calculates a measure of the improveme...
Definition: core.cpp:108
double differencePartial(const geometrize::Bitmap &target, const geometrize::Bitmap &before, const geometrize::Bitmap &after, const double score, const std::vector< Scanline > &lines)
differencePartial Calculates the root-mean-square error between the parts of the two bitmaps within t...
Definition: core.cpp:198
geometrize::State bestHillClimbState(const std::function< std::shared_ptr< geometrize::Shape >(void)> &shapeCreator, const std::uint32_t alpha, const std::uint32_t n, const std::uint32_t age, const geometrize::Bitmap &target, const geometrize::Bitmap ¤t, geometrize::Bitmap &buffer, const double lastScore, const EnergyFunction &customEnergyFunction)
bestHillClimbState Gets the best state using a hill climbing algorithm.
Definition: core.cpp:233
The rgba struct is a helper for manipulating RGBA8888 color data.
Definition: rgba.h:13