class Mspire::TaggedPeak
A TaggedPeak
has a sample_id
attribute. In the rest of its interface it behaves like a normal Mspire::Peak
. There are no forward compatible guarantees if you use the array interface, but currently the TaggedPeak
is arranged internally like this:
[x, sample_id, y]
Note that the object is instantiated like this:
TaggedPeak.new( [x,y], sample_id )
x and y value access are very fast because they are merely aliases against first and last.
Public Class Methods
new(data, sample_id)
click to toggle source
# File lib/mspire/tagged_peak.rb, line 30 def initialize(data, sample_id) self[0] = data.first self[1] = sample_id self[2] = data.last end
Public Instance Methods
sample_id()
click to toggle source
# File lib/mspire/tagged_peak.rb, line 36 def sample_id self[1] end
sample_id=(val)
click to toggle source
# File lib/mspire/tagged_peak.rb, line 40 def sample_id=(val) self[1] = val end
x=(val)
click to toggle source
# File lib/mspire/tagged_peak.rb, line 22 def x=(val) self[0] = val end
y=(val)
click to toggle source
# File lib/mspire/tagged_peak.rb, line 26 def y=(val) self[2] = val end