java.lang.Object
java.lang.Enum<SetSimilarity>
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.SetSimilarity
All Implemented Interfaces:
Serializable, Comparable<SetSimilarity>, java.lang.constant.Constable

public enum SetSimilarity extends Enum<SetSimilarity>
Different methods for set comparison like Overlap coefficient, Jaccard or Sørensen–Dice_coefficient (DSC).
  • Enum Constant Details

    • BOOLEAN

      public static final SetSimilarity BOOLEAN
      Returns 1 if intersection is not empty and 0 if it is empty.
    • ABSOLUTE

      public static final SetSimilarity ABSOLUTE
      Returns absolute number of the intersection. Not a real comparison.
    • MIN

      public static final SetSimilarity MIN
      The intersection divided by the smaller of the size of the two sets. Also known as Overlap coefficient.
    • MAX

      public static final SetSimilarity MAX
      The intersection divided by the larger of the size of the two sets.
    • JACCARD

      public static final SetSimilarity JACCARD
      Jaccard index: intersection divided by the size of the union.
    • DICE

      public static final SetSimilarity DICE
      Sørensen-Dice coefficient (DSC): twice the number of intersection set divided by the sum of the number of elements in each set.
  • Constructor Details

    • SetSimilarity

      private SetSimilarity()
  • Method Details

    • values

      public static SetSimilarity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SetSimilarity valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • compute

      public <E> double compute(Set<E> x, Set<E> y)
      Compute the set comparison.
      Type Parameters:
      E - Generic type of the sets
      Parameters:
      x - set x
      y - set y
      Returns:
      set comparison value
    • compute

      public double compute(int sizeIntersection, int sizeX, int sizeY)
      Compute the set comparison.
      Parameters:
      sizeIntersection - the number of intersection of the two sets
      sizeX - size of set x
      sizeY - size of set y
      Returns:
      set comparison value