class MonteCarlo::Result
Class that contains the result of a single sample of a {MonteCarlo::Experiment}
Attributes
index[RW]
@!attribute value
@return the value returned after the computation
@!attribute sample_value
@return the raw value returned from the sample method
@!attribute index
@return [Fixnum] the index of the iteration the result was generated at
sample_value[RW]
@!attribute value
@return the value returned after the computation
@!attribute sample_value
@return the raw value returned from the sample method
@!attribute index
@return [Fixnum] the index of the iteration the result was generated at
value[RW]
@!attribute value
@return the value returned after the computation
@!attribute sample_value
@return the raw value returned from the sample method
@!attribute index
@return [Fixnum] the index of the iteration the result was generated at
Public Class Methods
new(index = nil, value = nil, sample_value = nil)
click to toggle source
# File lib/monte_carlo/result.rb, line 14 def initialize(index = nil, value = nil, sample_value = nil) @value = value @sample_value = sample_value @index = index end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/monte_carlo/result.rb, line 20 def <=> other self.to_i <=> other.to_i end
to_i()
click to toggle source
# File lib/monte_carlo/result.rb, line 24 def to_i @value end