Class: Trapezoidal
Overview
Trapezoidal adherence function
Constant Summary
Constants inherited from Function
Constants included from Defuzz
Constants included from Norm
Instance Attribute Summary
Attributes inherited from Function
Instance Method Summary collapse
-
#initialize(name, a, b, c, d) ⇒ Trapezoidal
constructor
.new(Float a, Float b, Float c, Float d).
Methods inherited from Function
#*, #add, #and, #at, #cut_at, #defuzz, #initialize_copy, #not, #or, #remove, step_size, #to_gplot, #to_s
Methods included from Defuzz
Methods included from Norm
norm_method, #s_norm_max_min, #s_norm_prob, #t_norm_max_min, #t_norm_prob
Constructor Details
#initialize(name, a, b, c, d) ⇒ Trapezoidal
.new(Float a, Float b, Float c, Float d)
5 6 7 8 |
# File 'lib/rfuzzy/trapezoidal.rb', line 5 def initialize(name, a, b, c, d) p = [a,b,c,d].sort super(name, Point.new(p[0],0),Point.new(p[1],1),Point.new(p[2],1),Point.new(p[3],0)) end |