Class: Newral::Functions::RickerWavelet

Inherits:
Gaussian show all
Defined in:
lib/newral/functions/ricker_wavelet.rb

Instance Attribute Summary

Attributes inherited from Gaussian

#factors

Attributes inherited from Base

#center

Instance Method Summary collapse

Methods inherited from Gaussian

#calculate, create_random, #initialize, #move, #number_of_directions

Methods inherited from Base

#calculate, #calculate_descent, #calculate_error, create_random, #error_gradient_approximation, #find_minimum, #move, #move_random, #move_several, #move_with_gradient, #number_of_directions

Constructor Details

This class inherits a constructor from Newral::Functions::Gaussian

Instance Method Details

#calculate_for_center_distance(vector1) ⇒ Object

The mexican sombrero function



6
7
8
9
# File 'lib/newral/functions/ricker_wavelet.rb', line 6

def calculate_for_center_distance( vector1  ) 
  distance = Newral::Tools.euclidian_distance( vector1, @center )
  (1-distance**2)*Math.exp(-distance.to_f**2/2)*@factor
end