File tree 1 file changed +21
-17
lines changed
1 file changed +21
-17
lines changed Original file line number Diff line number Diff line change 6
6
"""
7
7
8
8
import math
9
- from typing import dict , list
9
+ from typing import Dict , List
10
10
11
11
import matplotlib .pyplot as plt
12
12
import pandas as pd
@@ -39,20 +39,7 @@ def __init__(
39
39
self ,
40
40
minpts : int ,
41
41
radius : int ,
42
- file : str = (
43
- {"x" : 3 , "y" : 7 },
44
- {"x" : 4 , "y" : 6 },
45
- {"x" : 5 , "y" : 5 },
46
- {"x" : 6 , "y" : 4 },
47
- {"x" : 7 , "y" : 3 },
48
- {"x" : 6 , "y" : 2 },
49
- {"x" : 7 , "y" : 2 },
50
- {"x" : 8 , "y" : 4 },
51
- {"x" : 3 , "y" : 3 },
52
- {"x" : 2 , "y" : 6 },
53
- {"x" : 3 , "y" : 5 },
54
- {"x" : 2 , "y" : 4 },
55
- ),
42
+ file : str = "None" ,
56
43
) -> None :
57
44
"""
58
45
Constructor
@@ -85,10 +72,27 @@ def __init__(
85
72
"""
86
73
self .minpts = minpts
87
74
self .radius = radius
88
- self .file = file
75
+ self .file = (
76
+ file
77
+ if file != "None"
78
+ else (
79
+ {"x" : 3 , "y" : 7 },
80
+ {"x" : 4 , "y" : 6 },
81
+ {"x" : 5 , "y" : 5 },
82
+ {"x" : 6 , "y" : 4 },
83
+ {"x" : 7 , "y" : 3 },
84
+ {"x" : 6 , "y" : 2 },
85
+ {"x" : 7 , "y" : 2 },
86
+ {"x" : 8 , "y" : 4 },
87
+ {"x" : 3 , "y" : 3 },
88
+ {"x" : 2 , "y" : 6 },
89
+ {"x" : 3 , "y" : 5 },
90
+ {"x" : 2 , "y" : 4 },
91
+ )
92
+ )
89
93
self .dict1 = self .perform_dbscan ()
90
94
91
- def perform_dbscan (self ) -> dict [int , list [int ]]:
95
+ def perform_dbscan (self ) -> Dict [int , List [int ]]:
92
96
"""
93
97
Args:
94
98
-----------
You can’t perform that action at this time.
0 commit comments