Method: FuzzyLogic::Set#initialize
- Defined in:
- lib/fuzzy-logic/set.rb
#initialize(height = nil, &fuzzyproc) ⇒ Set
Returns a new instance of Set.
9 10 11 12 13 14 15 16 |
# File 'lib/fuzzy-logic/set.rb', line 9 def initialize(height=nil, &fuzzyproc) if height != nil then raise ArgumentError, "Initial Height should be numeric" unless height.is_a? Numeric raise ArgumentError, "Initial Height should be between 0 and 1" if height < 0 or height > 1 end @fuzzyproc = fuzzyproc @height = height end |