Sha256: fd8cfa517bbe2681831bd5bf16f143329fb7865d3e31a0552a542921cbe1f921
Contents?: true
Size: 1.13 KB
Versions: 22
Compression:
Stored size: 1.13 KB
Contents
module Math class Function attr_reader :x_start, :x_end # # +Math::Function.new+: # # abstract base class function # #:nodoc: def initialize setup end #:doc: # # +y(x)+: # # Returns a real value given x # #:nodoc: def y(x) x end #:doc: # # +xy(step)+ # # Returns a full deployment of the function evaluated with a step of # +step+. It is returned in two arrays - one for the +x+ values and the # other for the +y+ values. # # This method is mainly for testing purposes with the dataxy method of +gruff+ # #:nodoc: def xy(s) resx = [] resy = [] self.x_start.step(x_end, s) do |x| resx << x resy << self.y(x) end [resx, resy] end #:doc: # # +label+ # # Returns a label which can be used in plots # def label '' end # # +Mext::Utilities+ # # add several (class) methods like: +from_yaml+ # include Mext::Utilities private def setup raise Mext::PureAbstractMethodCalled end end end
Version data entries
22 entries across 22 versions & 1 rubygems