Record Class PartitionEvaluator.EvaluationResult

java.lang.Object
java.lang.Record
com.apple.foundationdb.kmeans.PartitionEvaluator.EvaluationResult
Record Components:
decision - the evaluator's decision for this candidate
currentStats - quality statistics of the current (existing) partitioning
candidateStats - quality statistics of the proposed candidate partitioning
relativeSseGain - relative improvement in SSE: (currentSSE - candidateSSE) / currentSSE
scoreGain - composite quality score difference between candidate and current
reason - human-readable explanation of why this decision was made
Enclosing class:
PartitionEvaluator

public static record PartitionEvaluator.EvaluationResult(@Nonnull PartitionEvaluator.Decision decision, @Nonnull PartitionEvaluator.PartitionStats currentStats, @Nonnull PartitionEvaluator.PartitionStats candidateStats, double relativeSseGain, double scoreGain, String reason) extends Record
The outcome of evaluating a candidate partitioning against the current layout. Contains the decision (accept, keep current, or invalid), the statistics for both partitionings, and the computed quality metrics that led to the decision.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • decision

      @Nonnull public PartitionEvaluator.Decision decision()
      Returns the value of the decision record component.
      Returns:
      the value of the decision record component
    • currentStats

      @Nonnull public PartitionEvaluator.PartitionStats currentStats()
      Returns the value of the currentStats record component.
      Returns:
      the value of the currentStats record component
    • candidateStats

      @Nonnull public PartitionEvaluator.PartitionStats candidateStats()
      Returns the value of the candidateStats record component.
      Returns:
      the value of the candidateStats record component
    • relativeSseGain

      public double relativeSseGain()
      Returns the value of the relativeSseGain record component.
      Returns:
      the value of the relativeSseGain record component
    • scoreGain

      public double scoreGain()
      Returns the value of the scoreGain record component.
      Returns:
      the value of the scoreGain record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component