Class: RubyPager::Coord

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_pager/coord.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ex_index, ex_data) ⇒ Coord

Returns a new instance of Coord.



6
7
8
9
10
# File 'lib/ruby_pager/coord.rb', line 6

def initialize(ex_index,ex_data)
  @data = ex_data
  @id = ex_index
  load_coords()
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/ruby_pager/coord.rb', line 5

def id
  @id
end

#xObject

Returns the value of attribute x.



5
6
7
# File 'lib/ruby_pager/coord.rb', line 5

def x
  @x
end

#yObject

Returns the value of attribute y.



5
6
7
# File 'lib/ruby_pager/coord.rb', line 5

def y
  @y
end

Instance Method Details

#get_consolidated_dataObject



26
27
28
29
# File 'lib/ruby_pager/coord.rb', line 26

def get_consolidated_data
  consolidate_data()
  return @data
end

#vertical_noise(ex_std_dev) ⇒ Object



31
32
33
34
# File 'lib/ruby_pager/coord.rb', line 31

def vertical_noise(ex_std_dev)
  noise_generator=GaussianNoise.new(@y,ex_std_dev)
  @y=noise_generator.rand.to_i
end