All arithmetic calculations in the Java classes produced by xfj are carried out in double precision, using Java native "double" variables.
Classes corresponding to xfl types have the same name of the type they implement and offer the following interface:
Three different constructors that initializes the status of the object:
to the center of the universe of discourse, in the case of the parameterless constructor.
to a given crisp value, if the constructor with a single "double" parameter is used.
to a given set of linguistic values, when the constructor that accepts an array of "double" values is used.
One static method for each membership function defined in the type, which calculates the membership degree of a given crisp value. The name of these methods is "toMFName", where "MFName" is the name of the corresponding membership function in the xfl type.
One method for each membership function defined in the type, which returns the current membership degree. The name of these methods is "getMFName", where "MFName" is the name of the correspnding membership function in the xfl type.
An overloaded version of the "equals" method to test for the equality of two objects belonging to the class that implements the xfl type.
A method called "fuzzy", which performs the fuzzification of a given crisp value, updating the object status.
The class corresponding to the inference engine offers the following interface:
A parameterless constructor.
One method for each of the outputs defined for the system, to perform defuzzification. The name of these methods is "outputNameCrisp", where "outputName" is the name of the corresponding output in the xfl system definition. These methods require a fuzzy variable (with the same type the output belongs to) as parameter.
A method with three different signatures. This method is called "iEngine" and carries out the inference process. The three different signatures correspond to the different ways to provide inputs and outputs:
In its first form, "iEngine" accepts inputs and returns outputs in fuzzy representation, i.e., using variables that belong to classes implementing xfl types.
In its second form, "iEngine" accepts crisp ("double") inputs and returns fuzzy outputs.
In its third form, "iEngine" accepts crisp inputs and returns crisp (defuzzified) outputs. In this case, an array of values is used. The mapping between elements in the array and the input/output elements is given by their order in the xfl definition.
Besides these methods, the engine class has a "main" static method that executes an inference using the values of the input variables passed as arguments in the invocation of the class.
A guide to xfl, Xfuzzy user guide