fuzzydl
Class TriangularFuzzyNumber

java.lang.Object
  extended by fuzzydl.Concept
      extended by fuzzydl.FuzzyConcreteConcept
          extended by fuzzydl.TriangularConcreteConcept
              extended by fuzzydl.TriangularFuzzyNumber

public class TriangularFuzzyNumber
extends TriangularConcreteConcept

Fuzzy number defined with a triangular function.


Field Summary
static double K1
          Lower bound of the range of the fuzzy numbers.
static double K2
          Upper bound of the range of the fuzzy numbers.
 
Fields inherited from class fuzzydl.TriangularConcreteConcept
a, b, c
 
Fields inherited from class fuzzydl.FuzzyConcreteConcept
k1, k2
 
Fields inherited from class fuzzydl.Concept
ALL, AND, AT_LEAST_VALUE, AT_MOST_VALUE, ATOMIC, BOTTOM, c1, c2, COMPLEMENT, CONCEPT_BOTTOM, CONCEPT_TOP, CONCRETE, CONCRETE_COMPLEMENT, EXACT_VALUE, EXT_NEG_THRESHOLD, EXT_POS_THRESHOLD, FUZZY_NUMBER, FUZZY_NUMBER_COMPLEMENT, G_AND, G_IMPLIES, G_OR, L_AND, L_OR, LOOSE_LOWER_APPROX, LOOSE_UPPER_APPROX, LOWER_APPROX, MODIFIED, MODIFIED_COMPLEMENT, NEG_THRESHOLD, NOT_AT_LEAST_VALUE, NOT_AT_MOST_VALUE, NOT_EXACT_VALUE, NOT_EXT_NEG_THRESHOLD, NOT_EXT_POS_THRESHOLD, NOT_G_IMPLIES, NOT_NEG_THRESHOLD, NOT_POS_THRESHOLD, NOT_W_SUM, NOT_WEIGHTED, OR, POS_THRESHOLD, SELF, SOME, TIGHT_LOWER_APPROX, TIGHT_UPPER_APPROX, TOP, type, UPPER_APPROX, W_SUM, WEIGHTED
 
Constructor Summary
TriangularFuzzyNumber(double a, double b, double c)
           
TriangularFuzzyNumber(java.lang.String name, double a, double b, double c)
           
TriangularFuzzyNumber(java.lang.String name, int type, double a, double b, double c)
           
 
Method Summary
static TriangularFuzzyNumber add(TriangularFuzzyNumber t1, TriangularFuzzyNumber t2)
          Adds two triangular fuzzy numbers.
 Concept complement()
          Gets the complement of the concept.
static TriangularFuzzyNumber dividedBy(TriangularFuzzyNumber t1, TriangularFuzzyNumber t2)
          Divides two triangular fuzzy numbers.
 boolean equals(TriangularFuzzyNumber t)
          Indicates whether some other fuzzy number is "equal to" this one.
 double getBestNonFuzzyPerformance()
          Gets the Best Non fuzzy Performance (BNP) of the fuzzy number.
static boolean hasDefinedRange()
          Checks if the range of the fuzzy numbers has been defined.
static TriangularFuzzyNumber minus(TriangularFuzzyNumber t1, TriangularFuzzyNumber t2)
          Subtracts two triangular fuzzy numbers.
static void setRange(double minRange, double maxRange)
          Sets the range of the fuzzy numbers.
static TriangularFuzzyNumber times(TriangularFuzzyNumber t1, TriangularFuzzyNumber t2)
          Multiplies two triangular fuzzy numbers.
 java.lang.String toString()
           
 
Methods inherited from class fuzzydl.TriangularConcreteConcept
getA, getB, getC, getMembershipDegree, solveAssertion, solveComplementAssertion
 
Methods inherited from class fuzzydl.FuzzyConcreteConcept
setK1, setK2
 
Methods inherited from class fuzzydl.Concept
all, and, and, atLeastValue, atMostValue, complement, exactValue, extendedNegThreshold, extendedPosThreshold, g_and, g_and, g_and, g_implies, g_or, g_or, getAtomicConcepts, getFuzzydlName, getName, getRole, getType, getValue, getWeight, getWeightVar, isConcrete, kd_implies, l_and, l_and, l_implies, l_or, l_or, looseLowerApprox, looseUpperApprox, lowerApprox, negThreshold, newAtomicConcept, or, or, posThreshold, self, setName, setType, setValue, some, tightLowerApprox, tightUpperApprox, upperApprox, weightedConcept, z_implies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

K1

public static double K1
Lower bound of the range of the fuzzy numbers.


K2

public static double K2
Upper bound of the range of the fuzzy numbers.

Constructor Detail

TriangularFuzzyNumber

public TriangularFuzzyNumber(java.lang.String name,
                             int type,
                             double a,
                             double b,
                             double c)
                      throws FuzzyOntologyException
Throws:
FuzzyOntologyException

TriangularFuzzyNumber

public TriangularFuzzyNumber(java.lang.String name,
                             double a,
                             double b,
                             double c)
                      throws FuzzyOntologyException
Throws:
FuzzyOntologyException

TriangularFuzzyNumber

public TriangularFuzzyNumber(double a,
                             double b,
                             double c)
                      throws FuzzyOntologyException
Throws:
FuzzyOntologyException
Method Detail

add

public static TriangularFuzzyNumber add(TriangularFuzzyNumber t1,
                                        TriangularFuzzyNumber t2)
                                 throws FuzzyOntologyException
Adds two triangular fuzzy numbers.

Parameters:
t1 - A triangular fuzzy numbers.
t2 - Another triangular fuzzy numbers.
Returns:
Sum of the fuzzy numbers.
Throws:
FuzzyOntologyException

minus

public static TriangularFuzzyNumber minus(TriangularFuzzyNumber t1,
                                          TriangularFuzzyNumber t2)
                                   throws FuzzyOntologyException
Subtracts two triangular fuzzy numbers.

Parameters:
t1 - Subject of the subtraction.
t2 - Object of the subtraction.
Returns:
Subtraction of the fuzzy numbers.
Throws:
FuzzyOntologyException

times

public static TriangularFuzzyNumber times(TriangularFuzzyNumber t1,
                                          TriangularFuzzyNumber t2)
                                   throws FuzzyOntologyException
Multiplies two triangular fuzzy numbers.

Parameters:
t1 - A triangular fuzzy numbers.
t2 - Another triangular fuzzy numbers.
Returns:
Product of the fuzzy numbers.
Throws:
FuzzyOntologyException

dividedBy

public static TriangularFuzzyNumber dividedBy(TriangularFuzzyNumber t1,
                                              TriangularFuzzyNumber t2)
                                       throws FuzzyOntologyException
Divides two triangular fuzzy numbers.

Parameters:
t1 - Subject of the division.
t2 - Object of the division.
Returns:
Division of the fuzzy numbers.
Throws:
FuzzyOntologyException

hasDefinedRange

public static boolean hasDefinedRange()
Checks if the range of the fuzzy numbers has been defined.

Returns:
true if the range of the fuzzy numbers has been defined; false otherwise.

setRange

public static void setRange(double minRange,
                            double maxRange)
Sets the range of the fuzzy numbers.

Parameters:
minRange - Lower bound of the range.
maxRange - Upper bound of the range.

getBestNonFuzzyPerformance

public double getBestNonFuzzyPerformance()
Gets the Best Non fuzzy Performance (BNP) of the fuzzy number.

Returns:
BNP of the fuzzy number.

equals

public boolean equals(TriangularFuzzyNumber t)
Indicates whether some other fuzzy number is "equal to" this one.

Parameters:
t - The reference object with which to compare.
Returns:
true if this object is the same as the argument; false otherwise.

complement

public Concept complement()
Description copied from class: FuzzyConcreteConcept
Gets the complement of the concept.

Overrides:
complement in class TriangularConcreteConcept
Returns:
The complement of the concept.

toString

public java.lang.String toString()
Overrides:
toString in class TriangularConcreteConcept