Class: LazyMDArray::UnaryComp
- Inherits:
-
Object
- Object
- LazyMDArray::UnaryComp
- Defined in:
- lib/mdarray/lazy_mdarray.rb
Overview
Class UnaryComp applies a function f to one arguments. The arguments can be a function on its own right
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(f, x, *args) ⇒ UnaryComp
constructor
A new instance of UnaryComp.
Constructor Details
#initialize(f, x, *args) ⇒ UnaryComp
Returns a new instance of UnaryComp.
61 62 63 64 65 |
# File 'lib/mdarray/lazy_mdarray.rb', line 61 def initialize(f, x, *args) @x = x @f = f @other_args = args end |
Instance Method Details
#apply ⇒ Object
67 68 69 |
# File 'lib/mdarray/lazy_mdarray.rb', line 67 def apply @f.apply(@x.apply) end |