Class DegreeComparator

java.lang.Object
org.tweetyproject.arg.adf.reasoner.heuristics.DegreeComparator
All Implemented Interfaces:
Comparator<Argument>

@Deprecated(forRemoval=true) public final class DegreeComparator extends Object implements Comparator<Argument>
Deprecated, for removal: This API element is subject to removal in a future version.
This class is no longer used and will be removed in a future version.
A comparator for comparing arguments in an Abstract Dialectical Framework (ADF) based on their degree. The degree can be based on incoming, outgoing, or undirected links in the framework. This class is deprecated and should not be used anymore.
Author:
Mathias Hofer
  • Constructor Details

    • DegreeComparator

      public DegreeComparator(AbstractDialecticalFramework adf, DegreeComparator.DegreeType degreeType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new DegreeComparator with the specified ADF and degree type.
      Parameters:
      adf - the Abstract Dialectical Framework (ADF) to be used for calculating degrees
      degreeType - the type of degree to be used for comparison (e.g., INCOMING, OUTGOING, or UNDIRECTED)
      Throws:
      NullPointerException - if either adf or degreeType is null
  • Method Details

    • compare

      public int compare(Argument a1, Argument a2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Compares two arguments in the ADF based on their degree. The degree type (incoming, outgoing, or undirected) is specified at the time of the comparator's construction.
      Specified by:
      compare in interface Comparator<Argument>
      Parameters:
      a1 - the first argument to compare
      a2 - the second argument to compare
      Returns:
      a negative integer, zero, or a positive integer as the degree of a1 is less than, equal to, or greater than the degree of a2