Class: Kamelopard::Functions::FunctionMultiDim
- Defined in:
- lib/kamelopard/function.rb
Overview
get_value and run_function return an array of values
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ndims ⇒ Object
readonly
Returns the value of attribute ndims.
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
#ndims ⇒ Object (readonly)
Returns the value of attribute ndims.
93 94 95 |
# File 'lib/kamelopard/function.rb', line 93 def ndims @ndims end |
Instance Method Details
#compose=(f) ⇒ Object
95 96 97 98 |
# File 'lib/kamelopard/function.rb', line 95 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 |