com.groupdocs.search

Class TableDiscreteFunction



  • public class TableDiscreteFunction
    extends FuzzyAlgorithm

    Represents the discrete function that is specified by a table of correspondences.

    • Constructor Detail

      • TableDiscreteFunction

        public TableDiscreteFunction(int offsetOfInputs,
                             int[] tableOfOutputs)

        Initializes a new instance of the TableDiscreteFunction class.

        Parameters:
        offsetOfInputs - The offset of the table indeces relative to the input values.
        tableOfOutputs - The table of output values.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when tableOfOutputs is null.
        com.aspose.ms.System.ArgumentException - Thrown when number of table elements is 0.
      • TableDiscreteFunction

        public TableDiscreteFunction(int firstStepLevel,
                             Step... steps)

        Initializes a new instance of the TableDiscreteFunction class.

        Parameters:
        firstStepLevel - The level of the first step of the step function.
        steps - The next steps of the step function.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when steps is null.
        com.aspose.ms.System.ArgumentException - Thrown when limits of steps are not strictly increasing.
    • Method Detail

      • getSimilarityLevel

        public double getSimilarityLevel(int termLength)

        Gets a similarity level for specified term length.

        Specified by:
        getSimilarityLevel in class FuzzyAlgorithm
        Parameters:
        termLength - The term length.
        Returns:
        A similarity level.
      • getMaxMistakeCount

        public int getMaxMistakeCount(int termLength)

        Gets a maximum allowed number of mistakes for specified term length.

        Specified by:
        getMaxMistakeCount in class FuzzyAlgorithm
        Parameters:
        termLength - The term length.
        Returns:
        A maximum allowed number of mistakes.