Class: RubyPager::Coord
- Inherits:
-
Object
- Object
- RubyPager::Coord
- Defined in:
- lib/ruby_pager/coord.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
- #get_consolidated_data ⇒ Object
-
#initialize(ex_index, ex_data) ⇒ Coord
constructor
A new instance of Coord.
- #vertical_noise(ex_std_dev) ⇒ Object
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
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/ruby_pager/coord.rb', line 5 def id @id end |
#x ⇒ Object
Returns the value of attribute x.
5 6 7 |
# File 'lib/ruby_pager/coord.rb', line 5 def x @x end |
#y ⇒ Object
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_data ⇒ Object
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 |