-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainuml.puml
96 lines (85 loc) · 2.31 KB
/
mainuml.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@startuml
package de.tsteffek {
package math {
class Geometry {
{static} + distance(a: Point, b: Point)
{static} + distance(p: Point, l: Line)
{static} + ... ()
}
}
package algorithms {
class ModelFitting {
{static} + <T : Point> fitLines(graph: NeighborhoodGraph<T>)
}
}
package io {
class Reader {
{static} + readFromTSV(tsv: File)
{static} + readFromTSV(tsv: String)
}
}
package "model" {
class Scanner {
~ incremental: Boolean
~ stepAngle: Double
~ clockwise: Boolean
~ qualityMax: Int
...
}
class NeighborhoodGraph< T: GeometricObject > {
+ getSize()
+ getObjects()
+ getNeighbors(t: T)
{static} + fromBruteForce(objects: T[], closestNeighbors: Int = 2)
{static} + fromPolarPoints(points: PolarPoint[])
}
class Scan2D {
+ rotateBy(angle: Double)
{static} + fromTSV(tsv: File)
{static} + fromTSV(tsv: String)
}
package "geometry" {
interface GeometricObject {
+ distanceTo(other: GeometricObject)
+ toTSVString()
}
class Point {
+ x: Double
+ y: Double
+ plus(other: Point)
+ minus(other: Point)
+ times(constant: Double)
+ liesOn(lineSeg: LineSegment)
}
class PolarPoint {
+ angle: Double
+ distance: Double
+ normalizedDirection()
+ rotateBy(angle: Double)
}
class Line {
+ slope: Double
+ intercept: Double
{static} + fromTwoPoints(a: Point, b: Point)
{static} + fromSeveralPoints(points: Point[])
}
class LineSegment {
+ startPoint: Point
+ endPoint: Point
~ inBoundingBox(p: Point)
{static} + fromSeveralPoints(points: PolarPoint[])
}
}
}
}
ModelFitting ..> NeighborhoodGraph : <<builds upon>>
NeighborhoodGraph "1..*" o- "+graph *" GeometricObject
NeighborhoodGraph ..> Geometry : <<uses>>
GeometricObject <|-- Point
GeometricObject <|-- Line
Point <|-- PolarPoint
Line <|-- LineSegment
Scan2D "1..*" o-- "*" PolarPoint: consists of
Scan2D "1..*" o-- "-scanner 1" Scanner
Scan2D "1..*" ..> Reader : <<uses>>
@enduml