721
edits
(Created page with "=Homework= This week your task will be to modify the code from monday's session to work on n-dimensional data points. Clusterer-2D Feel free to fork the repl.it and in...") |
|||
Line 1: | Line 1: | ||
=Homework= | =Homework= | ||
This week your task will be to modify the code from monday's session to work on n-dimensional data points. | This week your task will be to modify the code from monday's session to work on n-dimensional data points. "N-dimensional" means the number of dimension can be chosen by the user. So the same code should work for 2 dimension (as we programmed it already), 3 dimension, 4 dimensions and so on... | ||
Feel free to fork the repl.it and include a new class "PointND": | |||
[https://replit.com/@abnutzer/SoSe2021-Clusterer2D Clusterer-2D] | |||
The Class PointND should should be structured as shown in the following header file: | The Class PointND should should be structured as shown in the following header file: | ||
<syntaxhighlight lang="c++"> | <syntaxhighlight lang="c++"> | ||
Line 41: | Line 42: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Your task is to: | |||
* Implement a PointND.cpp file that behaves like our class Point2D on n-dimensional points | |||
* Test that class with a 3D distance measurement, and on success | |||
* Modify our clusterer to work with the new PointND class! | |||