public class MembershipFunction
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
MembershipFunction()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
double |
calculateOverlapLength(MembershipFunction membership_function)
It computes the overlap length of a membership functions with respect to another one
|
MembershipFunction |
clone()
It allows to clone correctly a membership function
|
int |
compareTo(java.lang.Object obj)
It compares a membership function with another one in order to accomplish ordering (ascending) later.
|
double |
getC()
It returns the center of an isosceles-triangle
|
double |
getW()
It returns the spread of an isosceles-triangle
|
void |
setC(double c)
It sets the center of an isosceles-triangle
|
void |
setW(double w)
It sets the spread of an isosceles-triangle
|
java.lang.String |
toString()
It returns a raw string representation of a membership function
|
public double getC()
It returns the center of an isosceles-triangle
public void setC(double c)
It sets the center of an isosceles-triangle
c
- A value representing the center of the isosceles-trianglepublic double getW()
It returns the spread of an isosceles-triangle
public void setW(double w)
It sets the spread of an isosceles-triangle
w
- A value representing the spread of the isosceles-trianglepublic double calculateOverlapLength(MembershipFunction membership_function)
membership_function
- The membership function with which to compute the overlap lengthpublic MembershipFunction clone()
It allows to clone correctly a membership function
clone
in class java.lang.Object
public int compareTo(java.lang.Object obj)
It compares a membership function with another one in order to accomplish ordering (ascending) later. The comparison is achieved by considering the values of the centers. For this reason, note that this method provides a natural ordering that is inconsistent with equals
compareTo
in interface java.lang.Comparable
obj
- The object to be comparedpublic java.lang.String toString()
It returns a raw string representation of a membership function
toString
in class java.lang.Object