50 Commits

Author SHA1 Message Date
43d8957e48 Add main.py to run example code
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-08 16:04:10 +02:00
c3a82ff300 Add tests for linesegment module
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-22 18:41:17 +01:00
cf004ec5de Add __getitem__ and __setitem__ for linesegment
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-22 18:40:54 +01:00
a348c9c035 Fix __str__() function for linesegment 2020-03-22 18:40:14 +01:00
55be8b1c68 Add test for str() for class Point
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-22 17:45:02 +01:00
f87e59f954 Improve test coverage for point.py 2020-03-22 17:42:53 +01:00
4ae3fb1a78 Add coverage to requirements.txt 2020-03-22 17:31:34 +01:00
1dabb12a85 Update draw function ConvexHull
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-20 13:26:54 +01:00
fd3d055115 Add missing parts of ConvexHullIncremental
All checks were successful
continuous-integration/drone/push Build is passing
The algorithm parts to clean up the four parts of the convex hull were
not implemented yet. Also added draw function for completed algorithm.
2020-03-20 12:06:10 +01:00
89d8ff4b3f Set point outline color correctly
All checks were successful
continuous-integration/drone/push Build is passing
The outline of the oval drawn now has the same color as the fill color
to display the whole point in this color.
2020-03-20 12:03:22 +01:00
8a3910497e Add algorithm class ConvexHullIncremental
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-16 19:48:02 +01:00
94ad6def57 Update linesegment.py
All checks were successful
continuous-integration/drone/push Build is passing
Don't sort start and endpoint by x coordinate
2020-03-16 19:46:36 +01:00
91d3dcd9e9 Add vscode debug configuration
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-16 19:45:33 +01:00
28097c2f2e Fix algorithm.py and draw final result
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-11 22:34:35 +01:00
867745fe4e Add draw implementation for existing classes
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-11 19:49:47 +01:00
8040ecbd55 Update test_point.py
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-11 18:10:22 +01:00
d891b586b4 Update str operator of Point class
The coordinates now get rounded to 2 decimals
2020-03-11 18:09:43 +01:00
004408e37f Fix test_is_equal()
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-11 12:59:27 +01:00
2f4161a040 Update 'test/test_point.py'
Some checks failed
continuous-integration/drone/push Build is failing
Add some more tests for point class
2020-03-11 12:58:35 +01:00
ba3fdd6204 Fix 'point.py'
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-11 12:57:52 +01:00
d85aa7a76d Update 'point.py'
Some checks failed
continuous-integration/drone/push Build is failing
Add __ne__ operator to class Point
2020-03-11 12:55:19 +01:00
ff5742b08c Update 'point.py'
Some checks failed
continuous-integration/drone/push Build is failing
Add __eq__ operator to class point
2020-03-11 12:50:22 +01:00
3bfdab784b Update 'point.py'
All checks were successful
continuous-integration/drone/push Build is passing
Random coordinates are now float values.
2020-03-11 12:35:01 +01:00
0d30b0b123 Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
Added drone build status.
2020-03-11 09:07:09 +01:00
916cd60424 Update 'requirements.txt'
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-10 13:45:58 +01:00
e0a76612f4 Add test_setup.py
All checks were successful
continuous-integration/drone/push Build is passing
This file makes sure that the test files in test/ can import the
submodules.

To run a single test file run:

pytest test_setup.py test/test_module.py
2020-03-10 12:41:48 +01:00
a94c5f9840 Move tests to a subdirectory
Some checks failed
continuous-integration/drone/push Build is failing
2020-03-10 12:33:00 +01:00
76aff48b34 Add test_point.py
All checks were successful
continuous-integration/drone/push Build is passing
2020-03-10 12:10:52 +01:00
9627ae1309 Add requirements.txt
Some checks failed
continuous-integration/drone/push Build is failing
2020-03-10 12:05:40 +01:00
afb8ad24a3 Add drone ci configuration
Some checks failed
continuous-integration/drone/push Build was killed
2020-03-10 12:01:11 +01:00
b0d83a9116 Update algorithm.py
Methods str of point and linesegment are now operators
2020-03-10 08:38:33 +01:00
6bf4368c60 Update linesegment.py
Make method str() to an overwritten operator __str__()
2020-03-10 08:36:47 +01:00
e3aad40d1d Update point.py
Remove type checking and make an overwritten operator from method str()
2020-03-10 08:35:45 +01:00
048f6a08e6 Add function intersection for line segments 2020-03-09 20:15:56 +01:00
5fc13e0e07 Fix method set_y 2020-03-09 20:14:39 +01:00
70bb80e445 FIx comments 2020-03-09 19:18:07 +01:00
978bb9b789 Add function to generate random line segments 2020-03-09 18:51:41 +01:00
c96c1fc8bc Rename sort method for points 2020-03-09 18:43:24 +01:00
2d4ee80b4c Move set_random() out of class
As generating a random Point is mostly not used on an existing object,
the method is now an independent function get_random() instead of a
class method.
2020-03-09 18:42:46 +01:00
f19dcee20b Modify algorithm module to be more common to use
Method exec() is now in base class algorithm and called run().
The algorithm class should now be better to use for various algorithms.
2020-03-09 18:18:52 +01:00
7210a94995 Convert sweep module and class to algorithm
Since an algorithm can use more than one sweep, the sweep class doesn't
fit very good as it is right now. For this reasen it got converted to a
more general class named algorithm, that shall be used as parent for
every individual algorithm. The exact behaviour of the algorithm is
then defined in the child classes.
2020-03-09 17:41:37 +01:00
0065733bcf Add MIT license to the project 2020-03-09 09:47:03 +01:00
Pascal Lais
1a53f7aaa1 Enable unsafe-load-any-extension for pylint 2020-03-09 07:51:13 +01:00
Pascal Lais
d8cc7fc6f9 Add sweep module
The sweep module contains a sweep class and a class for the nearest
neighbor sweep alorithm.
2020-03-09 07:50:28 +01:00
Pascal Lais
4a483b939a Add method str to linesegment
The method str returns the line segment coordinates as string.
2020-03-09 07:49:10 +01:00
Pascal Lais
6f83b57ffb Add sort function and class methods to class Point
The sort function takes a list of Point objects and sorts them either
by their x or y coordinate using merge sort.
Also added a method set_random, that sets the coordinates to random
values and a method str, that returns the coordinates as string.
2020-03-09 07:48:07 +01:00
Pascal Lais
778240a1d3 Add linesegment module
The module defines a LineSegment class that displays a line segment in
two-dimensional coordinate system. It is defined by a start- and an
endpoint. It also contains a method to calculate the length.
2020-03-08 11:00:14 +01:00
Pascal Lais
a14f96ab2a Add point module
The point module defines a Point class, that displays a Point in a
two-dimensional coordinate system. An object of the class contains a x-
and y-coordinate and a setter and getter method for each at this point.
2020-03-08 10:57:40 +01:00
Pascal Lais
5df3f47563 Add code-vorkspace files to .gitignore 2020-03-07 12:00:23 +01:00
87ab6091b3 Initial commit 2020-03-07 08:39:25 +01:00