Method: BOAST::Sqrt#initialize

Defined in:
lib/BOAST/Language/HighLevelOperators.rb

#initialize(a) ⇒ Sqrt

Returns a new instance of Sqrt.



15
16
17
18
19
20
21
# File 'lib/BOAST/Language/HighLevelOperators.rb', line 15

def initialize(a)
  @operand = a
  @return_type = a.to_var
  unless @return_type.type.kind_of?(Real) then
    @return_type = Variable::new(:sqrt_type, Real, :vector_length => @return_type.type.vector_length)
  end
end