Class Statistics

java.lang.Object
io.github.cvc5.Statistics
All Implemented Interfaces:
Iterable<Map.Entry<String,Stat>>

public class Statistics extends Object implements Iterable<Map.Entry<String,Stat>>
Represents a snapshot of the solver statistics.
  • Field Details

    • pointer

      protected long pointer
      The raw native pointer value.
  • Method Details

    • deletePointer

      protected void deletePointer(long pointer)
      Delete the native resource associated with the specified pointer.

      Subclasses must implement this method to provide resource-specific cleanup logic.

      Parameters:
      pointer - the native pointer to delete
    • toString

      protected String toString(long pointer)
      Return a string representation of the specified native pointer.

      Subclasses must implement this method to convert the native pointer into a meaningful string.

      Parameters:
      pointer - the native pointer
      Returns:
      A string representation of this Statistics.
    • get

      public Stat get(String name)
      Retrieve the statistic with the given name. Asserts that a statistic with the given name actually exists and throws a CVC5ApiRecoverableException if it does not.
      Parameters:
      name - Name of the statistic.
      Returns:
      The statistic with the given name.
    • iterator

      public Statistics.ConstIterator iterator(boolean internal, boolean defaulted)
      Begin iteration over the statistics values. By default, only entries that are public (non-internal) and have been set are visible while the others are skipped.
      Parameters:
      internal - If set to true, internal statistics are shown as well.
      defaulted - If set to true, defaulted statistics are shown as well.
      Returns:
      A ConstIterator over the matching statistics entries.
    • iterator

      public Statistics.ConstIterator iterator()
      Specified by:
      iterator in interface Iterable<Map.Entry<String,Stat>>
    • getPointer

      public long getPointer()
      Return the raw native pointer.
      Returns:
      the pointer value
    • deletePointer

      public void deletePointer()
      Free the native resource associated with this pointer.

      This method should be called to explicitly clean up the underlying native resource. It removes this instance from the Context, then invokes the subclass-defined deletePointer(long) method to perform the actual cleanup.

    • toString

      public String toString()
      Return a string representation of the pointer.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the pointer