From e6ab4a8ed100d5d5b7611c74cf3ccd556f1f1d71 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:04:34 +0100 Subject: Initial commit --- include/HyperNeat/QuadTree.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/HyperNeat/QuadTree.hpp (limited to 'include/HyperNeat/QuadTree.hpp') diff --git a/include/HyperNeat/QuadTree.hpp b/include/HyperNeat/QuadTree.hpp new file mode 100644 index 0000000..8090254 --- /dev/null +++ b/include/HyperNeat/QuadTree.hpp @@ -0,0 +1,30 @@ +#ifndef __HYPERNEAT_QUADTREE_HPP__ +#define __HYPERNEAT_QUADTREE_HPP__ + +#include +#include + +namespace hyperneat +{ + class QuadTree + { + public: + QuadTree() = default; + QuadTree(double segment, double x, double y); + + double getSegment() const; + double getX() const; + double getY() const; + + void subdivide(Function subdivider); + void traverse(Function traverser) const; + + private: + Vector _children; + double _segment = 0.0; + double _x = 0.0; + double _y = 0.0; + }; +} + +#endif -- cgit v1.2.1