Package opennlp.tools.ml.model

# Class ComparablePredicate

java.lang.Object
opennlp.tools.ml.model.ComparablePredicate

All Implemented Interfaces:
  `Comparable<ComparablePredicate>`

public class ComparablePredicate extends Object implements Comparable<ComparablePredicate>
A maxent predicate representation which we can use to sort based on the outcomes. This allows us to make the mapping of features to their parameters much more compact.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final String`
  `name`
  `final int[]`
  `outcomes`
  `final double[]`
  `params`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ComparablePredicate(String n, int[] ocs, double[] ps)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(ComparablePredicate cp)`
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### name

    public final String name

  - ### outcomes

    public final int[] outcomes

  - ### params

    public final double[] params

- ## Constructor Details

  - ### ComparablePredicate

    public ComparablePredicate(String n, int[] ocs, double[] ps)

- ## Method Details

  - ### compareTo

    public int compareTo(ComparablePredicate cp)
    Specified by:
      `compareTo` in interface `Comparable<ComparablePredicate>`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`