DiscretizationIntervalExt
public class DiscretizationInterval
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
CLOSED |
Indicates left-closed or right-closed interval.
|
static int |
FUZZY |
Indicates left-fuzzy or right-fuzzy interval.
|
double |
fuzzyLeft |
Bottom left bound of this interval.
|
double |
fuzzyRight |
Bottom right bound of this interval.
|
double |
left |
(Top) left bound of this interval.
|
int |
leftType |
Type of left bound of this interval.
|
java.lang.String |
name |
Name of this interval.
|
static int |
OPEN |
Indicates left-open or right-open interval.
|
double |
right |
(Top) right bound of this interval.
|
int |
rightType |
Type of right bound of this interval.
|
Constructor | Description |
---|---|
DiscretizationInterval(java.lang.String name,
int leftType,
int rightType,
double fuzzyLeft,
double left,
double right,
double fuzzyRight) |
The sole constructor.
|
Modifier and Type | Method | Description |
---|---|---|
double |
contains(double value) |
Returns membership degree of
value to this interval. |
java.lang.String |
toString() |
public final java.lang.String name
public final int leftType
CLOSED
, OPEN
, FUZZY
.public final int rightType
CLOSED
, OPEN
, FUZZY
.public final double fuzzyLeft
leftType != FUZZY
.public final double left
public final double right
public final double fuzzyRight
rightType != FUZZY
.public static final int CLOSED
public static final int OPEN
public static final int FUZZY
public DiscretizationInterval(java.lang.String name, int leftType, int rightType, double fuzzyLeft, double left, double right, double fuzzyRight)
name
- the name of this intervalleftType
- type of left boundrightType
- type of right boundfuzzyLeft
- bottom left bound of this intervalleft
- (top) left bound of this intervalright
- (top) right bound of this intervalfuzzyRight
- bottom bound value of this intervalConsistencyException
- if name is not a valid identifierjava.lang.IllegalArgumentException
- if bounds to not form a valid intervaljava.lang.NullPointerException
- if name is null
public double contains(double value)
value
to this interval. The
value returned is a floating point value between 0 and 1 inclusive.value
- membership degreepublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()