Class: NVector

Inherits:
Object
  • Object
show all
Defined in:
lib/narray_extext.rb

Instance Method Summary collapse

Instance Method Details

#normObject



110
111
112
# File 'lib/narray_extext.rb', line 110

def norm
  Math.sqrt(self.mul_add(self.conjugate, 0).real)
end

#normalizeObject



106
107
108
# File 'lib/narray_extext.rb', line 106

def normalize
  self / norm
end