FuzzyAlgebra.java

// FILE. . . . . d:/hak/hlt/src/hlt/math/fuzzy/sources/FuzzyAlgebra.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Tue Dec  3 17:40:58 2019

package hlt.math.fuzzy;

package hlt.math.fuzzy package documentation listing


import hlt.math.matrix.NumberAlgebra;


This is an abstract subclass of hlt.math.matrix.NumberAlgebra defining its NumberAlgebra operations as the fuzzy algebra with the final methods zero() as 0.0, one() as 1.0, negation(x) as one()-x, and difference(x,y) as sum(x,negation(y)). The methods sum and product are abstract and expected to be redefined in concrete subclasses. Default implementations are provided for sum as Math.max, and product as Math.min.

N.B.: For this to work correctly, all values must be doubles in [0.0,1.0]. This methods defined in this class do not check whether their arguments are such doubles.

Contents (package hlt.math.matrix documentation listing)

See also:  ZadehAlgebra, LukasieviczAlgebra, ProbabilisticAlgebra, /matrix/Matrix, /matrix/NumberAlgebra, /matrix/MatrixPackageDescription
Copyright:  © by the author
Author:  Hassan Aït-Kaci
Version:  Last modified on Sun Dec 15 11:32:32 2019 by hak

abstract public class FuzzyAlgebra extends NumberAlgebra
{
  

Defines the String form for this FuzzyAlgebra. It must be redefined in a subclass.

  public String toString ()
  {
    return "Abstract Fuzzy Algebra";
  }

  

Fuzzy Algebra Operations


  

Define zero() as 0.0.

  public final double zero ()
  {
    return 0.0;
  }

  

Return the one of this algebra as 1.0. It verifies product(x,one()) = product(one(),x) = x, for any double x.

  public final double one ()
  {
    return 1.0;
  }

  

Define negation(x) as one()-x.

  public final double negation (double x)
  {
    return one()-x;
  }

  

Define difference(x,y) as sum(x,negation(y)).

  public final double difference (double x, double y)
  {
    return sum(x,negation(y));	
  }

  /* ************************************************************************ */
  

Defined Fuzzy Algebras


  

Set the current fuzzy algebra to the canonical default FuzzyAlgebra (zadehAlgebra).

  static final public void setDefaultAlgebra ()
  {
    NumberAlgebra.setCurrentAlgebra(zadehAlgebra);
  }

  

A package-accessible handle to a canonical ZadehAlgebra.

  static final ZadehAlgebra zadehAlgebra
    = (ZadehAlgebra)NumberAlgebra.registeredAlgebra(new ZadehAlgebra());

  

Return the canonical ZadehAlgebra.

  static public final ZadehAlgebra zadehAlgebra ()
  {
    return zadehAlgebra;
  }

  

Set the current fuzzy algebra to the canonical ZadehAlgebra.

  static final public void setZadehAlgebra ()
  {
    NumberAlgebra.setCurrentAlgebra(zadehAlgebra);
  }

  

A package-accessible handle to a canonical LukasieviczAlgebra.

  static final LukasieviczAlgebra lukasieviczAlgebra
    = (LukasieviczAlgebra)NumberAlgebra.registeredAlgebra(new LukasieviczAlgebra());
  
  

Set the current fuzzy algebra to the canonical LukasieviczAlgebra.

  static public final void setLukasieviczAlgebra ()
  {
    NumberAlgebra.setCurrentAlgebra(lukasieviczAlgebra);
  }

  

A package-accessible handle to a canonical ProbabilisticAlgebra.

  static final ProbabilisticAlgebra probabilisticAlgebra
    = (ProbabilisticAlgebra)NumberAlgebra.registeredAlgebra(new ProbabilisticAlgebra());
  
  

Set the current fuzzy algebra to the canonical ProbabilisticAlgebra.

  static public final void setProbabilisticAlgebra ()
  {
    NumberAlgebra.setCurrentAlgebra(probabilisticAlgebra);
  }

}


This file was generated on Wed Dec 18 03:38:08 PST 2019 from file FuzzyAlgebra.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci