Class LeapFrogging.DynamicsState

  • Enclosing class:
    LeapFrogging

    public static final class LeapFrogging.DynamicsState
    extends Object
    Contains the entire state (both the position and the momentum) at a given point in time.
    • Constructor Detail

      • DynamicsState

        public DynamicsState​(Vector x,
                             Vector p)
        Constructs a new instance with the given position and momentum.
        Parameters:
        x - the position
        p - the momentum
    • Method Detail

      • x

        public Vector x()
        Gets the position.
        Returns:
        the position vector
      • p

        public Vector p()
        Gets the momentum.
        Returns:
        the momentum vector