nrc.fuzzy
Class TriangleFuzzySet

java.lang.Object
  |
  +--nrc.fuzzy.FuzzySet
        |
        +--nrc.fuzzy.LRFuzzySet
              |
              +--nrc.fuzzy.TrapezoidFuzzySet
                    |
                    +--nrc.fuzzy.TriangleFuzzySet
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
SingletonFuzzySet

public class TriangleFuzzySet
extends TrapezoidFuzzySet
implements java.io.Serializable

Used to build specialized FuzzySets that have a triangle shape. The diagram below shows a TriangleFuzzySet.



Note that the Constructors have been defined to make the generation of such curves as simple as possible. Only 3 points are required to define the triangle shape.

This is a specialization of the TrapezoidFuzzySet where the left and right shapes meet at the same point (oneLeftX equals oneRightX for a Trapezoid).

See Also:
FuzzySet, LRFuzzySet, TrapezoidFuzzySet, Serialized Form

Nested Class Summary
 
Nested classes inherited from class nrc.fuzzy.FuzzySet
FuzzySet.UITools
 
Field Summary
 
Fields inherited from class nrc.fuzzy.FuzzySet
BFALSE, BTRUE, COLLINEAR_OR_PARALLEL, INCREMENT, INTERSECTION, MAX_INITIAL_POINTS, MAXMIN, NO_INTERSECTION, numPoints, set, simplified, SUM, tool, toStringPrecision, UNION
 
Constructor Summary
TriangleFuzzySet(double middleTop, double baseWidth)
          Generate a FuzzySet with a symmetric triangle shape, specifying the centre point and the full width of the base of the triangle
TriangleFuzzySet(double leftBottom, double middleTop, double rightBottom)
          Generate a FuzzySet with a triangle shape, specifying the centre value and the left and right values of the triangle.
 
Methods inherited from class nrc.fuzzy.LRFuzzySet
checkParameters
 
Methods inherited from class nrc.fuzzy.FuzzySet
appendSetPoint, appendSetPoint, centerOfAreaDefuzzify, checkXValueOrder, checkYValueRange, concat, concat, confineToXBounds, copyFuzzySet, equals, findMaxYOverlapValue, fuzzyComplement, fuzzyEqual, fuzzyIntersection, fuzzyIntersection, fuzzyIntersectionUnion, fuzzyNormalize, fuzzyScale, fuzzySum, fuzzySum, fuzzyUnion, fuzzyUnion, getAlphaCut, getArea, getArea, getMaxY, getMembership, getMinY, getPoint, getSupport, getUITools, getX, getXforMembership, getY, goingDown, goingUp, horizontalIntersection, horizontalIntersectionUnion, horizontalUnion, incrementArrayLength, incrementArrayLength, insertSetPoint, insertSetPoint, isConvex, isEmpty, isNormal, isSimplified, maximumDefuzzify, maximumOfIntersection, maximumOfIntersection, momentDefuzzify, noIntersectionTest, nonIntersectionTest, plotFuzzySet, plotFuzzySets, removeSetPoint, removeSetPoint, sameDirection, sameSign, setToStringPrecision, shiftArrayLeft, shiftArrayRight, simplifySet, size, testArrayLength, toString, trimToSize, weightedAverageDefuzzify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriangleFuzzySet

public TriangleFuzzySet(double leftBottom,
                        double middleTop,
                        double rightBottom)
                 throws XValuesOutOfOrderException
Generate a FuzzySet with a triangle shape, specifying the centre value and the left and right values of the triangle.

Parameters:
leftBottom - the start of the curve at the left with a membership value of 0
middleTop - the middle point with a membership value of 1
rightBottom - the end of the curve with a membership value of 0
Throws:
XValuesOutOfOrderException - if the x values are not in correct increasing order

TriangleFuzzySet

public TriangleFuzzySet(double middleTop,
                        double baseWidth)
                 throws XValuesOutOfOrderException
Generate a FuzzySet with a symmetric triangle shape, specifying the centre point and the full width of the base of the triangle

Parameters:
middleTop - the middle point with a membership value of 1
baseWidth - the full width of the base of the triangle
Throws:
XValuesOutOfOrderException - if the values create an impossible situation (eg. negative width)