nrc.fuzzy.jess
Class FuzzyFunctions.setDefaultSimilarityOperator

java.lang.Object
  |
  +--nrc.fuzzy.jess.FuzzyFunctions.setDefaultSimilarityOperator
All Implemented Interfaces:
jess.Userfunction
Enclosing class:
FuzzyFunctions

public class FuzzyFunctions.setDefaultSimilarityOperator
extends java.lang.Object
implements jess.Userfunction

Userfunction class:

Implements the Jess user function (set-default-similarity-operator the-operator)

The function takes one argument that specifies the way similarity between 2 Fuzzy Values should be calculated The values can be one of:

area - use ratio of aarea of intersection and area of union (see java class SimilarityByAreaOperator).
possibility - use possibility and necessity calculations (this is the default) (see java class SimilarityByPossibilityOperator).


Constructor Summary
FuzzyFunctions.setDefaultSimilarityOperator()
           
 
Method Summary
 jess.Value call(jess.ValueVector vv, jess.Context context)
           
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FuzzyFunctions.setDefaultSimilarityOperator

public FuzzyFunctions.setDefaultSimilarityOperator()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface jess.Userfunction
Returns:
String the name of the Jess function

call

public jess.Value call(jess.ValueVector vv,
                       jess.Context context)
                throws jess.JessException
Specified by:
call in interface jess.Userfunction
Parameters:
vv - a ValueVector with the function arguments (1 argument). The argument is a symbol or string and must be one of 'area' or 'possibility'.
context -
Returns:
Value TRUE if the setting of the default similarity operator is successful or FALSE if it fails (argument was not in correct range of allowed values).
Throws:
jess.JessException