autoweka

## Class Trajectory

- java.lang.Object
- - autoweka.Trajectory

-     public class Trajectory
      extends java.lang.Object

  Class that captures a trajectory of an optimisation run

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Trajectory.Point` Representation of a single point along the optimisation run

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Trajectory(java.lang.String seed)` makes a new empty trajectory with the given seed

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPoint(Trajectory.Point newPoint)` Inserts a new point onto the end of this trajectory
    `Trajectory.Point` | `getLastPoint()` Gets the last point in the trajectory, ie the best one
    `Trajectory.Point` | `getNextPoint(double time)` Gets the next point in the trajectory after the given time
    `int` | `getNumEvaluations()` Gets the total number of evaluations that were performed
    `int` | `getNumMemOutEvaluations()` Gets the number of evaluations that hit the memory limit (-1 if not recorded)
    `int` | `getNumTimedOutEvaluations()` Gets the number of evaluations that timed out (-1 if not recorded)
    `Trajectory.Point` | `getPointAtTime(double time)` Gets the point in the trajectory that's closest to this time
    `java.util.List<Trajectory.Point>` | `getPoints()` Gets all the points inside this trajectory
    `java.lang.String` | `getSeed()` Gets the seed for this trajectory
    `void` | `setEvaluationCounts(int numTotalEvaluations, int numMemOutEvaluations, int numTimeOutEvaluations)` Set all the statistics regarding the number of evaluations performed for this trajectory
    `java.lang.String` | `toString()`
    `void` | `truncateToTime(float maxTime)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Trajectory

          public Trajectory(java.lang.String seed)

      makes a new empty trajectory with the given seed
      Parameters:
        `seed` - The seed.

  - ### Method Detail

    - #### getSeed

          public java.lang.String getSeed()

      Gets the seed for this trajectory
      Returns:
        The seed.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getPoints

          public java.util.List<Trajectory.Point> getPoints()

      Gets all the points inside this trajectory
      Returns:
        The list of points.

    - #### addPoint

          public void addPoint(Trajectory.Point newPoint)

      Inserts a new point onto the end of this trajectory
      Parameters:
        `newPoint` - The new point.

    - #### getPointAtTime

          public Trajectory.Point getPointAtTime(double time)

      Gets the point in the trajectory that's closest to this time
      Parameters:
        `time` - The time for the point.
      Returns:
        The point closest to the time.

    - #### getNextPoint

          public Trajectory.Point getNextPoint(double time)

      Gets the next point in the trajectory after the given time
      Parameters:
        `time` - The time before the point.
      Returns:
        The point.

    - #### getLastPoint

          public Trajectory.Point getLastPoint()

      Gets the last point in the trajectory, ie the best one
      Returns:
        The best point.

    - #### truncateToTime

          public void truncateToTime(float maxTime)

    - #### setEvaluationCounts

          public void setEvaluationCounts(int numTotalEvaluations,
                                          int numMemOutEvaluations,
                                          int numTimeOutEvaluations)

      Set all the statistics regarding the number of evaluations performed for this trajectory
      Parameters:
        `numTotalEvaluations` - The total number of evaluations.
        `numMemOutEvaluations` - The number of evaluations with memout errors.
        `numTimeOutEvaluations` - The number of evaluations with timeout errors.

    - #### getNumEvaluations

          public int getNumEvaluations()

      Gets the total number of evaluations that were performed
      Returns:
        The total number of evaluations.

    - #### getNumMemOutEvaluations

          public int getNumMemOutEvaluations()

      Gets the number of evaluations that hit the memory limit (-1 if not recorded)
      Returns:
        The number of evaluations that exceeded the memory limit.

    - #### getNumTimedOutEvaluations

          public int getNumTimedOutEvaluations()

      Gets the number of evaluations that timed out (-1 if not recorded)
      Returns:
        The number of evaluations that timed out.