Class: DBSCAN::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/gtfs_stops_clustering/dbscan.rb

Overview

Point class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(point, label) ⇒ Point

Returns a new instance of Point.



140
141
142
143
144
145
146
147
148
149
150
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 140

def initialize(point, label)
  @items,
  @cluster,
  @visited,
  @label = point,
  nil,
  false,
  label,
  @cluster_name,
  @cluster_pos = []
end

Instance Attribute Details

#clusterObject

Returns the value of attribute cluster.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def cluster
  @cluster
end

#cluster_nameObject

Returns the value of attribute cluster_name.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def cluster_name
  @cluster_name
end

#cluster_posObject

Returns the value of attribute cluster_pos.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def cluster_pos
  @cluster_pos
end

#itemsObject

Returns the value of attribute items.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def items
  @items
end

#labelObject

Returns the value of attribute label.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def label
  @label
end

#visitedObject

Returns the value of attribute visited.



136
137
138
# File 'lib/gtfs_stops_clustering/dbscan.rb', line 136

def visited
  @visited
end