Class: Triangular

Inherits:
Function show all
Defined in:
lib/rfuzzy/triangular.rb

Overview

Triangular adherence function

Constant Summary

Constants inherited from Function

Function::EPSILON

Constants included from Defuzz

Defuzz::DEFUZZ_METHODS

Constants included from Norm

Norm::NORM_METHODS

Instance Attribute Summary

Attributes inherited from Function

#name, #points

Instance Method Summary collapse

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

defuzz_method

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) ⇒ Triangular

.new(Float a, Float b, Float c)



5
6
7
8
# File 'lib/rfuzzy/triangular.rb', line 5

def initialize(name, a, b, c)
	p = [a,b,c].sort
	super(name, Point.new(p[0],0),Point.new(p[1],1),Point.new(p[2],0))
end