Class: Kamelopard::Functions::FunctionMultiDim

Inherits:
Function
  • Object
show all
Defined in:
lib/kamelopard/function.rb

Overview

get_value and run_function return an array of values

Direct Known Subclasses

LatLonInterp, SplineFunction

Instance Attribute Summary collapse

Attributes inherited from Function

#append, #compose, #end, #max, #min, #start, #verbose

Instance Method Summary collapse

Methods inherited from Function

#get_value, #initialize, interpolate, #run_function

Constructor Details

This class inherits a constructor from Kamelopard::Functions::Function

Instance Attribute Details

#ndimsObject (readonly)

Returns the value of attribute ndims


94
95
96
# File 'lib/kamelopard/function.rb', line 94

def ndims
  @ndims
end

Instance Method Details

#compose=(f) ⇒ Object


96
97
98
99
# File 'lib/kamelopard/function.rb', line 96

def compose=(f)
    raise "Can only compose another #{@ndims}-dimensional function" unless (f.kind_of? FunctionMultiDim and @ndims = f.ndims) or f.nil?
    @compose = f
end