.. updated to have a more Qt/C++ friendly interface:
Voronoi *test = new Voronoi();
test->addSite(QPointF(2,5));
test->addSite(QPointF(3,2));
test->addSite(QPointF(6,4));
test->run(QRectF());
delete test;
the output is still written to standard out as a
series of points, lines, vertexes and edges. This
was to enable validation against the original
c program.
.. whilst the original functionality is now embedded a
further update will need to convert the output into
a vector of lines to draw.
will do this as part of adding it to a plot as an
annotation.
.. from C to a C++ class.
Moved the original code to a sundirectory for reference and
moved all the global variables and methods into a new class
called Voronoi.
.. the code still needs more work but wanted to remove the global
variables as there were lots and a big risk they interact
with other parts of the codebase and libraries.
.. kmeans(centers|assignments, k, dim1, dim2 .. dimn)
perform a k means cluster on data with multiple dimensions
and return the centers, or the assignments.
the return values are ordered so they can be displayed
easily in an overview table e.g.
values {
kmeans(centers, 3, metrics(TSS), metrics(IF));
}
.. will look at how we might plot these in charts with either
color coding of points or perhaps voronoi diagrams.
.. with grateful thanks to Greg Hamerly
A fast kmeans algorithm described here:
https://epubs.siam.org/doi/10.1137/1.9781611972801.12
The source repository is also here:
https://github.com/ghamerly/fast-kmeans
NOTE:
The original source has been included largely as-is with
a view to writing a wrapper around it using Qt semantics
for use in GoldenCheetah (e.g. via datafilter)
The original source included multiple kmeans algorithms
we have only kept the `fast' Hamerly variant.
.. the side bar, bottom bar and related buttons were still
following a skeuomorphic design that has long since
fallen into disuse.
.. now have a more muted feel with hover/press colors active
on mouse events.
.. moved the whatsthis button to the far right since this
is quite a common placement in other apps.
.. it is noticeable how we use many many different schemes
for hover/pressed colors across the UI- at some point
this should be unified.
.. also deprecated the segmentcontrol.
.. Makes it easier to identify code that has been snaffled in from
other repositories and check licensing
.. The httpserver is now no longer optional, since it is delivered
as contributed source.
- Fortius read was timing out on some hardware
- If read fails then write fails
- Moved write before read to rectify
- Added windows 10 x64 compatible driver inf built with Zadig
... removing tests,... from LIBKML build
... allowing building of base functionality of LIBKML on Windows with MinGW
... covering the LIBKML functional scope used by GoldenCheetah