public class FuzzyPartition
extends java.lang.Object
Represents a partition of fuzzy sets.
Constructor and Description |
---|
FuzzyPartition(double[] values)
A constructor for a fuzzy partition of n fuzzy sets whose support is given in a vector.
|
FuzzyPartition(double min,
double max,
int n)
A constructor for a fuzzy partition of n fuzzy sets whose support is uniformely defined between min and max.
|
FuzzyPartition(FuzzyPartition p)
A copy constructor for fuzy partition, given other fuzzy partition.
|
FuzzyPartition(int n)
A constructor for a fuzzy partition of n singleton fuzzy sets with values i.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
aString()
Returns a printable version of the instance.
|
FuzzyPartition |
clone()
Creates and returns a copy of this object.
|
Fuzzy |
getComponent(int n)
Returns the characteristic points of the fuzzy set n.
|
void |
set(FuzzyPartition p)
Copies the Fuzzy partition parameter over the present instance.
|
void |
setComponent(int n,
Fuzzy b)
Rewrites the fuzzy set n of current partition.
|
int |
size()
Returns the number of fuzzy sets in the partition
|
double[] |
toVector()
Characteristic points from fuzzy partition are copied to a vector of numbers.
|
public FuzzyPartition(double min, double max, int n)
A constructor for a fuzzy partition of n fuzzy sets whose support is uniformely defined between min and max. The first and last fuzzy set are a FuzzyNumberTRLEFT and FuzzyNumberTRRIGHT respectively while the middle fuzzy sets are triangular fuzzy sets.
min
- the lower extreme of the support set in the whole fuzzy partition.max
- the upper extreme of the support set in the whole fuzzy partition.n
- the number of fuzzy sets in the partition.public FuzzyPartition(double[] values)
A constructor for a fuzzy partition of n fuzzy sets whose support is given in a vector. This type of partition is not separated uniformely. The first and last fuzzy set are a FuzzyNumberTRLEFT and FuzzyNumberTRRIGHT respectively while the middle fuzzy sets are triangular fuzzy sets.
values
- the shared extremes for each fuzzy set in the partition.public FuzzyPartition(int n)
A constructor for a fuzzy partition of n singleton fuzzy sets with values i.
n
- the number of singleton fuzzy sets in the partition.public FuzzyPartition(FuzzyPartition p)
A copy constructor for fuzy partition, given other fuzzy partition.
p
- to be copied.public double[] toVector()
Characteristic points from fuzzy partition are copied to a vector of numbers. If partition is defined in N instead R, this method is not necessary.
public FuzzyPartition clone()
Creates and returns a copy of this object.
clone
in class java.lang.Object
public void set(FuzzyPartition p)
Copies the Fuzzy partition parameter over the present instance.
p
- a fuzzy partition object to be copiedpublic Fuzzy getComponent(int n)
Returns the characteristic points of the fuzzy set n.
n
- the index of the partition content to return.public void setComponent(int n, Fuzzy b)
Rewrites the fuzzy set n of current partition.
n
- the index of the fuzzy set in the partition.b
- the new fuzzy set.public int size()
Returns the number of fuzzy sets in the partition
public java.lang.String aString()
Returns a printable version of the instance.