コード例 #1
0
 def __init__(self, candidates, epsilon):
     ClusterCandidateIndex.__init__(self, candidates, epsilon)
     self.candidates_by_ids = [None] * len(candidates)
     self.idx = index.Index()
     for cluster_candidate in candidates:
         if self.candidates_by_ids[cluster_candidate.id] != None:
             raise Exception("should have all unique ids")
         
         self.candidates_by_ids[cluster_candidate.id] = cluster_candidate
         line_seg = cluster_candidate.line_segment
         bounding_box = self.get_bounding_box_of_line_segment(line_seg)
         self.idx.insert(cluster_candidate.id, bounding_box, cluster_candidate)
コード例 #2
0
 def __init__(self, candidates, epsilon):
     ClusterCandidateIndex.__init__(self, candidates, epsilon)
     self.candidates_by_ids = [None] * len(candidates)
     self.idx = index.Index()
     for cluster_candidate in candidates:
         if self.candidates_by_ids[cluster_candidate.id] != None:
             raise Exception("should have all unique ids")
         
         self.candidates_by_ids[cluster_candidate.id] = cluster_candidate
         line_seg = cluster_candidate.line_segment
         bounding_box = self.get_bounding_box_of_line_segment(line_seg)
         self.idx.insert(cluster_candidate.id, bounding_box, cluster_candidate)
コード例 #3
0
ファイル: trajectory.py プロジェクト: dh-shin/traclus_impl
 def find_neighbors_of(self, cluster_candidate):
     neighbors = ClusterCandidateIndex.find_neighbors_of(
         self, cluster_candidate)
     cluster_candidate.set_num_neighbors(len(neighbors))
     return neighbors
コード例 #4
0
ファイル: trajectory.py プロジェクト: dh-shin/traclus_impl
 def __init__(self, candidates, epsilon):
     ClusterCandidateIndex.__init__(self, candidates, epsilon)
コード例 #5
0
 def find_neighbors_of(self, cluster_candidate):
     neighbors = ClusterCandidateIndex.find_neighbors_of(self, cluster_candidate)
     cluster_candidate.set_num_neighbors(len(neighbors))
     return neighbors
コード例 #6
0
 def __init__(self, candidates, epsilon):
     ClusterCandidateIndex.__init__(self, candidates, epsilon)