Enum Class ForgettingCurve

java.lang.Object
java.lang.Enum<ForgettingCurve>
com.tnsai.session.consolidation.ForgettingCurve
All Implemented Interfaces:
Serializable, Comparable<ForgettingCurve>, Constable

public enum ForgettingCurve extends Enum<ForgettingCurve>
Memory decay strategies based on forgetting curves.

Controls how memory importance decays over time when not accessed.

  • Enum Constant Details

    • NONE

      public static final ForgettingCurve NONE
      No decay - all memories retain full importance.
    • LINEAR

      public static final ForgettingCurve LINEAR
      Linear decay: score decreases linearly over time.
    • EXPONENTIAL

      public static final ForgettingCurve EXPONENTIAL
      Exponential decay (Ebbinghaus-inspired).
  • Method Details

    • values

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

      public static ForgettingCurve valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • decay

      public abstract double decay(double currentScore, Duration age)
      Calculates the decayed score based on age.
      Parameters:
      currentScore - Current importance score (0.0 - 1.0)
      age - How old the memory is
      Returns:
      Decayed score