Karana.Math
===========

.. py:module:: Karana.Math

.. autoapi-nested-parse::

   Collection of classes to represent mathematical object used in Karana Dynamics simulations.

   Examples include unit quaternions, homogeneous transforms, and spatial vectors.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /generated/python_api/Karana/Math/Kquantities/index
   /generated/python_api/Karana/Math/Ktyping/index


Attributes
----------

.. autoapisummary::

   Karana.Math.MATH_EPSILON
   Karana.Math.notReadyNaN
   Karana.Math.notReadyPayload


Classes
-------

.. autoapisummary::

   Karana.Math.AABB
   Karana.Math.AkimaSplineInterpolator
   Karana.Math.BaseInterpolator
   Karana.Math.ConstantInterpolator
   Karana.Math.CubicHermiteInterpolator
   Karana.Math.DumpFormatType
   Karana.Math.EulerAngles
   Karana.Math.EulerSystem
   Karana.Math.HomTran
   Karana.Math.Jacobian
   Karana.Math.LinearInterpolator
   Karana.Math.NearestNeighborInterpolator
   Karana.Math.Ray
   Karana.Math.RotationMatrix
   Karana.Math.RotationVector
   Karana.Math.SS
   Karana.Math.SimTran
   Karana.Math.SpatialAcceleration
   Karana.Math.SpatialForce
   Karana.Math.SpatialInertia
   Karana.Math.SpatialMomentum
   Karana.Math.SpatialVector
   Karana.Math.SpatialVelocity
   Karana.Math.StateSpace
   Karana.Math.UnitQuaternion


Functions
---------

.. autoapisummary::

   Karana.Math.buildNaNWithPayload
   Karana.Math.floatingPointExceptions
   Karana.Math.isNaNWithPayload
   Karana.Math.isNotReadyNaN
   Karana.Math.ktimeToSeconds
   Karana.Math.secondsToKtime
   Karana.Math.solveLcpPgs
   Karana.Math.solveLcpPsor
   Karana.Math.tilde


Package Contents
----------------

.. py:class:: AABB
              AABB(min: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], max: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], fix_minmax: bool = True)
              AABB(other: AABB)

   .. py:method:: __add__(other: AABB) -> AABB

      Combines this AABB with another AABB.

      The resulting AABB will be a new box that encompasses both the
      original AABB and the 'other' AABB.

      :param other: The AABB to combine with this one.

      :returns: The combined AABB



   .. py:method:: __repr__() -> str


   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Prints a string representation of the AABB with options for
      formatting.

      :param prefix: A string to prepend to each line.
      :param precision: The number of decimal places for floating-point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 6, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> str

      Returns a string representation of the AABB with options for
      formatting.

      :param prefix: A string to prepend to each line.
      :param precision: The number of decimal places for floating-point values.
      :param format_type: The format type to use.

      :returns: A string containing the min and max corners.



   .. py:method:: max() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the minimum corner of the AABB.
      :returns: The minimum corner.



   .. py:method:: min() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the minimum corner of the AABB.
      :returns: The minimum corner.



   .. py:method:: rotate(q: UnitQuaternion) -> AABB

      Computes a new AABB by rotating this AABB by a given unit quaternion.

      :param q: The unit quaternion to rotate by.

      :returns: A new AABB that has been translated.



   .. py:method:: scale(s: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> AABB
                  scale(s: SupportsFloat | SupportsIndex) -> AABB

      Computes a new AABB by scaling this AABB by a given scalar.

      :param s: The scalar to scale by.

      :returns: A new AABB that has been scaled.



   .. py:method:: transform(t: HomTran) -> AABB

      Computes a new AABB by transforming this AABB by a given HomTran.

      :param t: The 3-vector to scale by.

      :returns: A new AABB that has been transformed.



   .. py:method:: translate(t: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3) -> AABB

      Computes a new AABB by translating this AABB by a given vector.

      :param t: The 3-vector to translate by.

      :returns: A new AABB that has been translated.



.. py:class:: AkimaSplineInterpolator(indep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], dep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], extrapolation: AkimaSplineInterpolator.Extrapolation | None = None)

   Bases: :py:obj:`BaseInterpolator`


   Akima spline interpolation method

   Uses a piecewise-cubic spline well-suited to cases where the
   underlying data has a rapidly varying second derivative.


   .. py:class:: Extrapolation(*args, **kwds)

      Bases: :py:obj:`enum.Enum`


      Create a collection of name/value pairs.

      Example enumeration:

      >>> class Color(Enum):
      ...     RED = 1
      ...     BLUE = 2
      ...     GREEN = 3

      Access them by:

      - attribute access:

        >>> Color.RED
        <Color.RED: 1>

      - value lookup:

        >>> Color(1)
        <Color.RED: 1>

      - name lookup:

        >>> Color['RED']
        <Color.RED: 1>

      Enumerations can be iterated over, and know how many members they have:

      >>> len(Color)
      3

      >>> list(Color)
      [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

      Methods can be added to enumerations, and members can have their own
      attributes -- see the documentation for details.


      .. py:attribute:: CONSTANT
         :type:  ClassVar[AkimaSplineInterpolator]


      .. py:attribute:: CUBIC
         :type:  ClassVar[AkimaSplineInterpolator]


      .. py:attribute:: LINEAR
         :type:  ClassVar[AkimaSplineInterpolator]



   .. py:attribute:: CONSTANT
      :type:  ClassVar[AkimaSplineInterpolator]


   .. py:attribute:: CUBIC
      :type:  ClassVar[AkimaSplineInterpolator]


   .. py:attribute:: LINEAR
      :type:  ClassVar[AkimaSplineInterpolator]


.. py:class:: BaseInterpolator

   Base class for interpolation methods


   .. py:method:: __call__(x: SupportsFloat | SupportsIndex) -> float
                  __call__(x: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], out: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]) -> None
                  __call__(x: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]

      Calculate the jacobian of the supplied function.

      :param x: The input vector we want to calculate the jacobian with respect
                to.

      :returns: The jacobian of the supplied function about x.



.. py:class:: ConstantInterpolator(constant: SupportsFloat | SupportsIndex)

   Bases: :py:obj:`BaseInterpolator`


   Constant value implementation of BaseInterpolator

   This just interpolates to the same constant value everywhere, which
   may be useful when a BaseInterpolator is expected but only a constant
   value is needed.


.. py:class:: CubicHermiteInterpolator(indep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], dep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], extrapolation: CubicHermiteInterpolator.Extrapolation | None = None, deriv: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]] | None = None)

   Bases: :py:obj:`BaseInterpolator`


   Interpolate using a cubic Hermite spline.


   .. py:class:: Extrapolation(*args, **kwds)

      Bases: :py:obj:`enum.Enum`


      Create a collection of name/value pairs.

      Example enumeration:

      >>> class Color(Enum):
      ...     RED = 1
      ...     BLUE = 2
      ...     GREEN = 3

      Access them by:

      - attribute access:

        >>> Color.RED
        <Color.RED: 1>

      - value lookup:

        >>> Color(1)
        <Color.RED: 1>

      - name lookup:

        >>> Color['RED']
        <Color.RED: 1>

      Enumerations can be iterated over, and know how many members they have:

      >>> len(Color)
      3

      >>> list(Color)
      [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

      Methods can be added to enumerations, and members can have their own
      attributes -- see the documentation for details.


      .. py:attribute:: CONSTANT
         :type:  ClassVar[CubicHermiteInterpolator]


      .. py:attribute:: CUBIC
         :type:  ClassVar[CubicHermiteInterpolator]


      .. py:attribute:: LINEAR
         :type:  ClassVar[CubicHermiteInterpolator]



   .. py:attribute:: CONSTANT
      :type:  ClassVar[CubicHermiteInterpolator]


   .. py:attribute:: CUBIC
      :type:  ClassVar[CubicHermiteInterpolator]


   .. py:attribute:: LINEAR
      :type:  ClassVar[CubicHermiteInterpolator]


   .. py:method:: derivatives() -> Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]

      Derivatives at each indep value
      :returns: A vector containing the derivatives



.. py:class:: DumpFormatType(*args, **kwds)

   Bases: :py:obj:`enum.Enum`


   Controls how floating-point values are formatted when dumping.


   .. py:attribute:: DEFAULT_FLOAT
      :type:  ClassVar[DumpFormatType]


   .. py:attribute:: FIXED
      :type:  ClassVar[DumpFormatType]


   .. py:attribute:: SCIENTIFIC
      :type:  ClassVar[DumpFormatType]


.. py:class:: EulerAngles(alpha: SupportsFloat | SupportsIndex | Karana.Math.Ktyping.Angle, beta: SupportsFloat | SupportsIndex | Karana.Math.Ktyping.Angle, gamma: SupportsFloat | SupportsIndex | Karana.Math.Ktyping.Angle, euler_system: EulerSystem = EulerSystem.XYZ)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(arg0: EulerAngles) -> bool


   .. py:method:: __repr__() -> str


   .. py:method:: alpha() -> Karana.Math.Ktyping.Angle

      First Euler angle.



   .. py:method:: alphaAxisVector() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      First Euler angle axis.



   .. py:method:: angles() -> Karana.Math.Ktyping.Angle3

      The three Euler angles.



   .. py:method:: beta() -> Karana.Math.Ktyping.Angle

      Second Euler angle.



   .. py:method:: betaAxisVector() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Second Euler angle axis.



   .. py:method:: gamma() -> Karana.Math.Ktyping.Angle

      Third Euler angle.



   .. py:method:: gammaAxisVector() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Third Euler angle axis.



   .. py:method:: isApprox(other: EulerAngles, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool


   .. py:property:: euler_system
      :type: EulerSystem



.. py:class:: EulerSystem

   Bases: :py:obj:`enum.IntEnum`


   Enum where members are also (and must be) ints


   .. py:attribute:: XYX
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: XYZ
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: XZX
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: XZY
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: YXY
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: YXZ
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: YZX
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: YZY
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: ZXY
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: ZXZ
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: ZYX
      :type:  ClassVar[EulerSystem]


   .. py:attribute:: ZYZ
      :type:  ClassVar[EulerSystem]


   .. py:method:: __format__(format_spec)

      Convert to a string according to format_spec.



.. py:class:: HomTran(vec: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3, epsilon: SupportsFloat | SupportsIndex = 1e-12)
              HomTran
              HomTran(q: UnitQuaternion, epsilon: SupportsFloat | SupportsIndex = 1e-12)
              HomTran(q: UnitQuaternion, vec: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3, epsilon: SupportsFloat | SupportsIndex = 1e-12)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(other: HomTran) -> bool

      Equality operator.
      :param other: Another HomTran instance.

      :returns: True if both transforms are equal.



   .. py:method:: __getstate__() -> tuple[UnitQuaternion, Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(T: HomTran) -> HomTran
                  __mul__(v: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]
                  __mul__(ray: Ray) -> Ray

      Apply transform to a 3D ray.
      :param ray: Input Ray.

      :returns: Transformed ray.



   .. py:method:: __repr__() -> str


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Print transform information to standard output.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT, skip_new_line: bool = False) -> str

      Get a string representation of the transform.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.
      :param skip_new_line: If true, do not add a new line at the end

      :returns: String dump of the transform.



   .. py:method:: getMatrix() -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 4]]

      Get the 4x4 homogeneous transformation matrix representation.
      :returns: The transformation matrix.



   .. py:method:: getTranslation() -> Karana.Math.Ktyping.Length3

      Get the translation vector.
      :returns: Translation vector.



   .. py:method:: getUnitQuaternion() -> UnitQuaternion

      Get the unit quaternion.
      :returns: Unit quaternion.



   .. py:method:: hasRotation() -> bool

      Check if transform has rotation.
      :returns: True if the unit quaternion is non-identity.



   .. py:method:: hasTranslation() -> bool

      Check if transform has translation.
      :returns: True if translation is non-zero.



   .. py:method:: inverse() -> HomTran

      Get the inverse of this transform.
      :returns: Inverse transform.



   .. py:method:: isApprox(other: HomTran, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Check if two transforms are approximately equal.
      :param other: The other HomTran to compare with.
      :param prec: Tolerance for comparison.

      :returns: True if approximately equal.



   .. py:method:: isIdentity() -> bool

      Check if transform is identity.
      :returns: True if identity.



   .. py:method:: phi(sv: SpatialVector) -> SpatialVector
                  phi(sv: SpatialForce) -> SpatialForce
                  phi(sv: SpatialMomentum) -> SpatialMomentum

      Apply the "phi" rigid body transform to a spatial force.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param V: Spatial force.

      :returns: Transformed spatial force.

      $See also:

      phiStar(), phiMatrix()



   .. py:method:: phiMat(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, n]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, n]]

      Apply phi transform to a 6xN matrix.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param m: Input matrix.

      :returns: Transformed matrix.

      $See also:

      phiStar(), phiMatrix()



   .. py:method:: phiMatrix() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Get the phi rigid body transformation matrix.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :returns: Phi matrix.

      $See also:

      phi(), phiStar()



   .. py:method:: phiStar(sv: SpatialVector) -> SpatialVector
                  phiStar(sv: SpatialVelocity) -> SpatialVelocity
                  phiStar(sv: SpatialAcceleration) -> SpatialAcceleration

      Apply the phi^* dual rigid body transformation to a spatial velocity.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param V: Input spatial velocity.

      :returns: Transformed velocity.

      $See also:

      phi(), phiMatrix()



   .. py:method:: phiStarMat(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, n]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, n]]

      Apply the phi^* dual rigid body transformation to a 6xN matrix.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param m: Input matrix.

      :returns: Transformed matrix.



   .. py:method:: phiStarSymmetric(sv: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Compute the phi^* * m * phi dual rigid body symmetric transformation
      for a 6x6 matrix.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param m: Input matrix.

      :returns: Transformed symmetric matrix.

      $See also:

      phi(), phiMatrix()



   .. py:method:: phiStarVec(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 1]]) -> SpatialVector

      Apply the phi^* dual rigid body transformation to a 6D vector.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param V: Input 6-vector.

      :returns: Transformed 6-vector.

      $See also:

      phi(), phiMatrix()



   .. py:method:: phiSymmetric(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Compute phi * m * phi^* symmetric rigid body transformation to a 6x6
      matrix.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param m: Input matrix.

      :returns: Transformed symmetric matrix.

      $See also:

      phiStar(), phiMatrix()



   .. py:method:: phiVec(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 1]]) -> SpatialVector

      Apply "phi" rigid body transform to a 6D vector.

      See :ref:`rigid body transformation matrix <phiDef>` for a definition of
      the transformation matrix.

      :param V: Input 6-vector.

      :returns: Transformed 6-vector.

      $See also:

      phiStar(), phiMatrix()



   .. py:method:: setIdentity() -> None

      Set the transform to identity.



   .. py:method:: setTranslation(vec: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3, epsilon: SupportsFloat | SupportsIndex = 1e-12) -> None

      Set the translation vector.
      :param vec: The translation vector.
      :param epsilon: Tolerance for checking whether the translation is zero.



   .. py:method:: setUnitQuaternion(q: UnitQuaternion, epsilon: SupportsFloat | SupportsIndex = 1e-12) -> None

      Set the unit quaternion (rotation part).
      :param q: Unit quaternion.
      :param epsilon: Tolerance for checking whether the unit quaternion is
                      identity.



   .. py:method:: toVector6() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 1]]

      Convert to a 6D vector [rotation_vector; translation].
      :returns: The 6D vector representation.



   .. py:method:: typeString() -> str

      Get a string representing the type.
      :returns: The string "HomTran".



.. py:class:: Jacobian(input_dim: SupportsInt | SupportsIndex, value_dim: SupportsInt | SupportsIndex, f: collections.abc.Callable[[Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]], None], mode: Literal['forward', 'central'] = 'forward')

   Class used to create a Jacobian for a given function using numerical
   differencing.


   .. py:method:: __call__(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      Calculate the jacobian of the supplied function.

      :param x: The input vector we want to calculate the jacobian with respect
                to.

      :returns: The jacobian of the supplied function about x.



   .. py:method:: getF() -> collections.abc.Callable[[Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]], None]

      Get the function that this Jacobian class calculates the jacobian of.
      :returns: f The function that this Jacobian class calculates the jacobian
                of.



   .. py:method:: getMode() -> str

      Get the finite difference mode.
      :returns: f The finite difference mode.



   .. py:method:: setF(f: collections.abc.Callable[[Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]], None]) -> None

      Set the function that this class calculates the jacobian of.
      :param f: The function that you want to calculate the jacobian of.



   .. py:method:: setMode(arg0: str) -> None

      Sets finite difference mode.
      :param mode: The finite difference mode. One of "forward" or "central".



.. py:class:: LinearInterpolator(indep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], dep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], extrapolation: LinearInterpolator.Extrapolation | None = None)

   Bases: :py:obj:`BaseInterpolator`


   Piecewise linear interpolation method


   .. py:class:: Extrapolation(*args, **kwds)

      Bases: :py:obj:`enum.Enum`


      Create a collection of name/value pairs.

      Example enumeration:

      >>> class Color(Enum):
      ...     RED = 1
      ...     BLUE = 2
      ...     GREEN = 3

      Access them by:

      - attribute access:

        >>> Color.RED
        <Color.RED: 1>

      - value lookup:

        >>> Color(1)
        <Color.RED: 1>

      - name lookup:

        >>> Color['RED']
        <Color.RED: 1>

      Enumerations can be iterated over, and know how many members they have:

      >>> len(Color)
      3

      >>> list(Color)
      [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

      Methods can be added to enumerations, and members can have their own
      attributes -- see the documentation for details.


      .. py:attribute:: Constant
         :type:  ClassVar[LinearInterpolator]


      .. py:attribute:: Linear
         :type:  ClassVar[LinearInterpolator]



   .. py:attribute:: Constant
      :type:  ClassVar[LinearInterpolator]


   .. py:attribute:: Linear
      :type:  ClassVar[LinearInterpolator]


.. py:data:: MATH_EPSILON
   :type:  float
   :value: 1e-12


.. py:class:: NearestNeighborInterpolator(indep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], dep: Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]])

   Bases: :py:obj:`BaseInterpolator`


   Nearest neighbor interpolation method


.. py:class:: Ray
              Ray(direction: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]])

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(other: Ray) -> bool


   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Write dumpString to standard output.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT, skip_new_line: bool = False) -> str

      Dump the object as a formatted string.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.
      :param skip_new_line: If true, do not add a new line at the end.

      :returns: Formatted string representation.



   .. py:method:: getDirection() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the direction of the ray.

      :returns: Const reference to the ray direction.



   .. py:method:: getOrigin() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the origin of the ray.

      :returns: Const reference to the ray origin.



   .. py:method:: isApprox(other: Ray, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool


   .. py:method:: setDirection(direction: Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]) -> None

      Set the direction of the ray.

      :param direction: New direction.



   .. py:method:: setOrigin(origin: Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]) -> None

      Set the origin of the ray.

      :param origin: New origin.



.. py:class:: RotationMatrix
              RotationMatrix(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 3]], orthogonalize: bool = False, skip_values_check: bool = False)
              RotationMatrix(rotvec: RotationVector)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(other: RotationMatrix) -> bool

      Equality operator.
      :param other: RotationMatrix to compare with.

      :returns: True if equal, false otherwise.



   .. py:method:: __repr__() -> str


   .. py:method:: asArray() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      Return the rotation matrix as a numpy array.



   .. py:method:: isApprox(other: RotationMatrix, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Approximate equality check.
      :param other: RotationMatrix to compare with.
      :param prec: Precision threshold.

      :returns: True if approximately equal, false otherwise.



   .. py:method:: setValues(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 3]], orthogonalize: bool = False, skip_values_check: bool = False) -> None

      Assign external values from a 3x3 matrix

      Since there is no guarantee on the values of the input matrix, we need
      to be careful to enable appropriate checks and orthogonalization as
      needed.

      :param mat: Input matrix.
      :param orthogonalize: If true, orthogonalize the input values.
      :param skip_values_check: If true, skip check that the matrix is
                                orthogonal.



   .. py:method:: typeString() -> str

      Get the type string of this class.
      :returns: "RotationMatrix"



.. py:class:: RotationVector(v: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]])

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(other: RotationVector) -> bool

      Equality operator.

      :param other: RotationVector to compare with.

      :returns: True if equal, false otherwise.



   .. py:method:: __repr__() -> str


   .. py:method:: angle() -> float

      Return rotation angle.

      :returns: The rotation angle.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 6, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> str

      Get a string representation of the RotationVector.
      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.

      :returns: String with information about this RotationVector.



   .. py:method:: isApprox(other: RotationVector, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Approximate equality check.

      :param other: RotationVector to compare with.
      :param prec: Precision threshold.

      :returns: True if approximately equal, false otherwise.



   .. py:method:: omegaToRates(omega: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], oframe: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Compute the coeff rates from the angular velocity

      :param omega: The 3-vector angular velocity.
      :param oframe: If true, the angular velocity is in the 'from' frame, else
                     in the 'to' frame.

      :returns: The coefficient rates from the omega angular velocity



   .. py:method:: omegaToRatesMap(arg0: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      Compute the angular velocity from coeff rates

      :param rates: The 3-vector with coefficient rates.
      :param oframe: If true, the angular velocity is in the 'from' frame, else
                     in the 'to' frame.

      :returns: The angular velocity that corresponds to the rates.



   .. py:method:: ratesToOmega(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], arg1: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Compute the angular velocity from coeff rates

      :param rates: The 3-vector with coefficient rates.
      :param oframe: If true, the angular velocity is in the 'from' frame, else
                     in the 'to' frame.

      :returns: The angular velocity that corresponds to the rates.



   .. py:method:: ratesToOmegaMap(arg0: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      Compute the angular velocity from coeff rates

      :param rates: The 3-vector with coefficient rates.
      :param oframe: If true, the angular velocity is in the 'from' frame, else
                     in the 'to' frame.

      :returns: The angular velocity that corresponds to the rates.



   .. py:method:: ratesToQuatRatesMap() -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      The 4x3 matrix that maps the rotation vector rates to quaternion
      rates.

      :returns: The 4x3 matrix map.



   .. py:method:: toVec3() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Return the RotationVector as a Vec3.

      :returns: This RotationVector as a Vec3.



   .. py:method:: unitAxis() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Return rotation angle.

      :returns: The rotation angle.



.. py:class:: SS

   State space return type. This holds the A, B, C, and D matrices that
   make up the state space model.


   .. py:property:: A
      :type: Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]



   .. py:property:: B
      :type: Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]



   .. py:property:: C
      :type: Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]



   .. py:property:: D
      :type: Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]



.. py:class:: SimTran(transform: HomTran)
              SimTran(scale: SupportsFloat | SupportsIndex)
              SimTran(transform: HomTran, scale: SupportsFloat | SupportsIndex)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(other: SimTran) -> bool

      Equality operator.
      :param other: SimTran to compare with.

      :returns: True if equal, false otherwise.



   .. py:method:: __mul__(T: SimTran) -> SimTran
                  __mul__(v: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Compose this SimTran with another.
      :param T: Another SimTran to apply after this one.

      :returns: Combined transform.



   .. py:method:: __repr__() -> str


   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Print dumpString to std::cout.

      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> str

      Get a string representation of the SimTran.

      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.

      :returns: String with information about this SimTran.



   .. py:method:: getMatrix() -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 4]]

      Get the full 4x4 transformation matrix.
      :returns: 4x4 transformation matrix.



   .. py:method:: getScale() -> float

      Get the scale factor.
      :returns: Scale factor.



   .. py:method:: getTransform() -> HomTran

      Get the homogeneous transform.
      :returns: Homogeneous transform.



   .. py:method:: hasRotation() -> bool

      Check if the SimTran has a rotation.
      :returns: True if unit quaternion is non-identity, false otherwise.



   .. py:method:: hasScale() -> bool

      Check if the SimTran includes a scale.
      :returns: True if scale is not 1.0, false otherwise.



   .. py:method:: hasTranslation() -> bool

      Check if the SimTran has a non-zero translation.
      :returns: True if translation is non-zero, false otherwise.



   .. py:method:: inverse() -> SimTran

      Get the inverse of this SimTran.
      :returns: Inverse SimTran.



   .. py:method:: isApprox(other: SimTran, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Approximate equality check.
      :param other: SimTran to compare with.
      :param prec: Precision threshold.

      :returns: True if approximately equal, false otherwise.



   .. py:method:: isIdentity() -> bool

      Check if the SimTran is identity.
      :returns: True if identity, false otherwise.



   .. py:method:: setIdentity() -> None

      Set the SimTran to identity.



   .. py:method:: setScale(scale: SupportsFloat | SupportsIndex) -> None

      Set the scale factor.
      :param scale: Scale value.



   .. py:method:: setTranslation(vec: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3, epsilon: SupportsFloat | SupportsIndex = 1e-12) -> None

      Set the translation vector.
      :param vec: Translation vector.
      :param epsilon: Precision threshold used to check if the translation is
                      zero.



   .. py:method:: setUnitQuaternion(q: UnitQuaternion, epsilon: SupportsFloat | SupportsIndex = 1e-12) -> None

      Set the rotation using a unit quaternion.
      :param q: Unit quaternion.
      :param epsilon: Precision threshold to check if the unit quaternion is
                      identity.



   .. py:method:: typeString() -> str

      Get the type string of this class.
      :returns: "SimTran"



.. py:class:: SpatialAcceleration(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularAcceleration3, arg1: numpy.typing.ArrayLike | Karana.Math.Ktyping.Acceleration3)

   Bases: :py:obj:`SpatialVector`


   .. py:method:: to_json(o: SpatialVector) -> dict[str, Any]
      :staticmethod:


      Class method used to represent SpatialVector in a json file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a SpatialVector from json file data.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: __add__(other: SpatialAcceleration) -> SpatialAcceleration

      Component-wise addition.

      :param other: The SpatialAcceleration to add to this one.

      :returns: Resulting SpatialAcceleration sum.



   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(arg0: SupportsFloat | SupportsIndex) -> SpatialAcceleration

      Scalar multiplication.

      :param scale: Scalar value to multiply by.

      :returns: Scaled SpatialAcceleration.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: __sub__(other: SpatialAcceleration) -> SpatialAcceleration

      Negation operator.

      :returns: Negated SpatialAcceleration.



   .. py:method:: barprod(other: SpatialAcceleration) -> SpatialAcceleration

      Compute the bar product with another spatial acceleration.

      \f[ \bar A B = - {\tilde A}^* B  = \begin{bmatrix} \tilde A_w & \tilde
      A_v \\  0  & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v
      \end{bmatrix} \f]

      :param other: The SpatialAcceleration to compute the bar product with.

      :returns: Resulting SpatialAcceleration.



   .. py:method:: cross(other: SpatialAcceleration) -> SpatialAcceleration

      Compute 6-D cross product with another spatial acceleration.

      @f[
       A \times B = \tilde A  B = \begin{bmatrix} \tilde A_w & \tilde A_v \\
       0 & \tilde A_w
      \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix}
       @f]

      :param other: The SpatialAcceleration to compute the cross product with.

      :returns: Resulting SpatialAcceleration.



   .. py:method:: getv() -> Karana.Math.Ktyping.Acceleration3

      Get the linear portion of the spatial vector.

      :returns: Const reference to linear vector.



   .. py:method:: getw() -> Karana.Math.Ktyping.AngularAcceleration3

      Get the angular portion of the spatial vector.

      :returns: Const reference to angular vector.



   .. py:method:: multiplyFromLeft(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> SpatialAcceleration

      Multiply the acceleration from left with a matrix, i.e v * mat.

      :param mat: Matrix to multiply.

      :returns: Resulting SpatialAcceleration.



   .. py:method:: setv(v: numpy.typing.ArrayLike | Karana.Math.Ktyping.Acceleration3) -> None

      Set the linear portion of the spatial vector.

      :param v: New linear vector.



   .. py:method:: setw(w: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularAcceleration3) -> None

      Set the angular portion of the spatial vector.

      :param w: New angular vector.



.. py:class:: SpatialForce(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.Torque3, arg1: numpy.typing.ArrayLike | Karana.Math.Ktyping.Force3)

   Bases: :py:obj:`SpatialVector`


   .. py:method:: to_json(o: SpatialVector) -> dict[str, Any]
      :staticmethod:


      Class method used to represent SpatialVector in a json file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a SpatialVector from json file data.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: __add__(other: SpatialForce) -> SpatialForce

      Component-wise addition.

      :param other: The SpatialForce to add to this one.

      :returns: Resulting SpatialForce sum.



   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(arg0: SupportsFloat | SupportsIndex) -> SpatialForce

      Scalar multiplication.

      :param scale: Scalar value to multiply by.

      :returns: Scaled SpatialForce.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: __sub__(other: SpatialForce) -> SpatialForce

      Negation operator.

      :returns: Negated SpatialForce.



   .. py:method:: barprod(other: SpatialForce) -> SpatialForce

      Compute the bar product with another spatial force.

      \f[ \bar A B = - {\tilde A}^* B  = \begin{bmatrix} \tilde A_w & \tilde
      A_v \\  0  & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v
      \end{bmatrix} \f]

      :param other: The SpatialForce to compute the bar product with.

      :returns: Resulting SpatialForce.



   .. py:method:: cross(other: SpatialForce) -> SpatialForce

      Compute 6-D cross product with another spatial force.

      @f[
       A \times B = \tilde A  B = \begin{bmatrix} \tilde A_w & \tilde A_v \\
       0 & \tilde A_w
      \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix}
       @f]

      :param other: The SpatialForce to compute the cross product with.

      :returns: Resulting SpatialForce.



   .. py:method:: getv() -> Karana.Math.Ktyping.Force3

      Get the linear portion of the spatial vector.

      :returns: Const reference to linear vector.



   .. py:method:: getw() -> Karana.Math.Ktyping.Torque3

      Get the angular portion of the spatial vector.

      :returns: Const reference to angular vector.



   .. py:method:: multiplyFromLeft(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> SpatialForce

      Multiply the force from left with a matrix, i.e v * mat.

      :param mat: Matrix to multiply.

      :returns: Resulting SpatialForce.



   .. py:method:: setv(v: numpy.typing.ArrayLike | Karana.Math.Ktyping.Force3) -> None

      Set the linear portion of the spatial vector.

      :param v: New linear vector.



   .. py:method:: setw(w: numpy.typing.ArrayLike | Karana.Math.Ktyping.Torque3) -> None

      Set the angular portion of the spatial vector.

      :param w: New angular vector.



.. py:class:: SpatialInertia
              SpatialInertia(mass: SupportsFloat | SupportsIndex | Karana.Math.Ktyping.Mass, body_to_cm: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3, inertia: numpy.typing.ArrayLike | Karana.Math.Ktyping.Inertia, validate: bool = True)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __add__(other: SpatialInertia) -> SpatialInertia

      Add SpatialInertias. The two SpatialInertias are assumed to be about a
      common frame.

      :param other: The SpatialInertia to add to this one.

      :returns: Resultant SpatialInertia.



   .. py:method:: __eq__(other: SpatialInertia) -> bool

      Equality operator.
      :param other: SpatialInertia to compare with.

      :returns: True if equal, false otherwise.



   .. py:method:: __iadd__(other: SpatialInertia) -> SpatialInertia

      Add another SpatialInertia to this one in-place. The two
      SpatialInertias are assumed to be about a common frame.

      :param other: The SpatialInertia to add to this one.

      :returns: Reference to this SpatialInertia.



   .. py:method:: __isub__(other: SpatialInertia) -> SpatialInertia

      Subtract another SpatialInertia from this one in-place. The two
      SpatialInertias are assumed to be about a common frame.

      :param other: The SpatialInertia to subtract from this one.

      :returns: Reference to this SpatialInertia.



   .. py:method:: __mul__(vec: SpatialVector) -> SpatialVector

      Multiplies the spatial inertia with a spatial vector.

      :param vec: The spatial vector to multiply.

      :returns: The resulting spatial vector after multiplication.



   .. py:method:: __repr__() -> str


   .. py:method:: __sub__(other: SpatialInertia) -> SpatialInertia

      Subtract SpatialInertias. The two SpatialInertias are assumed to be
      about a common frame.

      :param other: The SpatialInertia to subtract from this one.

      :returns: Resultant SpatialInertia.



   .. py:method:: bodyToCm() -> Karana.Math.Ktyping.Length3

      Returns the vector from the body frame to the center of mass.

      :returns: The vector from the body frame to the center of mass.



   .. py:method:: cmInertia() -> Karana.Math.Ktyping.Inertia

      Returns the inertia matrix about the center of mass.

      :returns: The inertia matrix about the center of mass.



   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Print dumpString to std::cout.

      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> str

      Get a string representation of this SpatialInertia.

      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.

      :returns: String with information about this SpatialInertia.



   .. py:method:: inertia() -> Karana.Math.Ktyping.Inertia

      Returns the inertia matrix in the body frame.

      :returns: The inertia matrix in the body frame.



   .. py:method:: isApprox(other: SpatialInertia, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Approximate equality check.
      :param other: SpatialInertia to compare with.
      :param prec: Precision threshold.

      :returns: True if approximately equal, false otherwise.



   .. py:method:: mass() -> Karana.Math.Ktyping.Mass

      Returns the mass of the object.

      :returns: The mass of the object.



   .. py:method:: matrix() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Returns the 6x6 matrix representation of the spatial inertia.

      :returns: The 6x6 matrix representation of the spatial inertia.



   .. py:method:: mp() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Returns the body_to_cm * mass.

      :returns: The mass * body_to_cm.



   .. py:method:: parallelAxis(arg0: HomTran) -> SpatialInertia

      Returns the type name of the object.

      :returns: A string representing the type name of the object.



   .. py:method:: setZero() -> None

      Zero out the spatial inertia.



   .. py:method:: typeString() -> str

      Returns the type name of the object.

      :returns: A string representing the type name of the object.



.. py:class:: SpatialMomentum(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularMomentum3, arg1: numpy.typing.ArrayLike | Karana.Math.Ktyping.Momentum3)

   Bases: :py:obj:`SpatialVector`


   .. py:method:: to_json(o: SpatialVector) -> dict[str, Any]
      :staticmethod:


      Class method used to represent SpatialVector in a json file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a SpatialVector from json file data.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: __add__(other: SpatialMomentum) -> SpatialMomentum

      Component-wise addition.

      :param other: The SpatialMomentum to add to this one.

      :returns: Resulting SpatialMomentum sum.



   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(arg0: SupportsFloat | SupportsIndex) -> SpatialMomentum

      Scalar multiplication.

      :param scale: Scalar value to multiply by.

      :returns: Scaled SpatialMomentum.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: __sub__(other: SpatialMomentum) -> SpatialMomentum

      Negation operator.

      :returns: Negated SpatialMomentum.



   .. py:method:: barprod(other: SpatialMomentum) -> SpatialMomentum

      Compute the bar product with another spatial momentum.

      \f[ \bar A B = - {\tilde A}^* B  = \begin{bmatrix} \tilde A_w & \tilde
      A_v \\  0  & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v
      \end{bmatrix} \f]

      :param other: The SpatialMomentum to compute the bar product with.

      :returns: Resulting SpatialMomentum.



   .. py:method:: cross(other: SpatialMomentum) -> SpatialMomentum

      Compute 6-D cross product with another spatial momentum.

      @f[
       A \times B = \tilde A  B = \begin{bmatrix} \tilde A_w & \tilde A_v \\
       0 & \tilde A_w
      \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix}
       @f]

      :param other: The SpatialMomentum to compute the cross product with.

      :returns: Resulting SpatialMomentum.



   .. py:method:: getv() -> Karana.Math.Ktyping.Momentum3

      Get the linear portion of the spatial vector.

      :returns: Const reference to linear vector.



   .. py:method:: getw() -> Karana.Math.Ktyping.AngularMomentum3

      Get the angular portion of the spatial vector.

      :returns: Const reference to angular vector.



   .. py:method:: multiplyFromLeft(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> SpatialMomentum

      Multiply the momentum from left with a matrix, i.e v * mat.

      :param mat: Matrix to multiply.

      :returns: Resulting SpatialMomentum.



   .. py:method:: setv(v: numpy.typing.ArrayLike | Karana.Math.Ktyping.Momentum3) -> None

      Set the linear portion of the spatial vector.

      :param v: New linear vector.



   .. py:method:: setw(w: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularMomentum3) -> None

      Set the angular portion of the spatial vector.

      :param w: New angular vector.



.. py:class:: SpatialVector
              SpatialVector(sv: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 1]])
              SpatialVector(w: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], v: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]])

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __add__(other: SpatialVector) -> SpatialVector

      Component-wise addition.

      :param other: The SpatialVector to add to this one.

      :returns: Resulting SpatialVector sum.



   .. py:method:: __eq__(other: SpatialVector) -> bool


   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]
                  __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(arg0: SpatialVector) -> float
                  __mul__(arg0: SupportsFloat | SupportsIndex) -> SpatialVector

      Scalar multiplication.

      :param scale: Scalar value to multiply by.

      :returns: Scaled SpatialVector.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: tuple) -> None
                  __setstate__(arg0: tuple) -> None


   .. py:method:: __sub__(other: SpatialVector) -> SpatialVector

      Negation operator.

      :returns: Negated SpatialVector.



   .. py:method:: barprod(other: SpatialVector) -> SpatialVector

      Compute the bar product with another spatial vector.

      \f[ \bar A B = - {\tilde A}^* B  = \begin{bmatrix} \tilde A_w & \tilde
      A_v \\  0  & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v
      \end{bmatrix} \f]

      :param other: The SpatialVector to compute the bar product with.

      :returns: Resulting SpatialVector.



   .. py:method:: cross(other: SpatialVector) -> SpatialVector

      Compute 6-D cross product with another spatial vector.

      @f[
       A \times B = \tilde A  B = \begin{bmatrix} \tilde A_w & \tilde A_v \\
       0 & \tilde A_w
      \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix}
       @f]

      :param other: The SpatialVector to compute the cross product with.

      :returns: Resulting SpatialVector.



   .. py:method:: dump(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> None

      Write dumpString to std::cout.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.



   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 10, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT, skip_new_line: bool = False) -> str

      Dump the object as a formatted string.

      :param prefix: Optional prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.
      :param skip_new_line: If true, do not add a new line at the end

      :returns: Formatted string representation.



   .. py:method:: getv() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the linear portion of the spatial vector.

      :returns: Const reference to linear vector.



   .. py:method:: getw() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Get the angular portion of the spatial vector.

      :returns: Const reference to angular vector.



   .. py:method:: isApprox(other: SpatialVector, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool


   .. py:method:: isZero(prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Return true if the spatial vector is zero.

      :param prec: Tolerance to use when comparing with zero.

      :returns: True if both angular and linear components are zero.



   .. py:method:: multiplyFromLeft(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> SpatialVector

      Multiply from the vector from left with a matrix, i.e v * mat.

      :param mat: Matrix to multiply.

      :returns: Resulting SpatialVector.



   .. py:method:: setZero() -> None

      Zero out the spatial vector's values.



   .. py:method:: setv(v: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> None

      Set the linear portion of the spatial vector.

      :param v: New linear vector.



   .. py:method:: setw(w: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> None

      Set the angular portion of the spatial vector.

      :param w: New angular vector.



   .. py:method:: toVector6() -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 1]]

      Convert to a 6-vector by combining the w and v parts as [w;v].

      :returns: Combined 6D vector.



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



   .. py:method:: to_json(o: SpatialVector) -> dict[str, Any]
      :staticmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



.. py:class:: SpatialVelocity(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularVelocity3, arg1: numpy.typing.ArrayLike | Karana.Math.Ktyping.Velocity3)

   Bases: :py:obj:`SpatialVector`


   .. py:method:: to_json(o: SpatialVector) -> dict[str, Any]
      :staticmethod:


      Class method used to represent SpatialVector in a json file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a SpatialVector from json file data.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a SpatialVector from yaml file data.



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent SpatialVector in a yaml file.



   .. py:method:: __add__(other: SpatialVelocity) -> SpatialVelocity

      Component-wise addition.

      :param other: The SpatialVelocity to add to this one.

      :returns: Resulting SpatialVelocity sum.



   .. py:method:: __getstate__() -> tuple[Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]


   .. py:method:: __mul__(arg0: SupportsFloat | SupportsIndex) -> SpatialVelocity

      Scalar multiplication.

      :param scale: Scalar value to multiply by.

      :returns: Scaled SpatialVelocity.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: tuple) -> None


   .. py:method:: __sub__(other: SpatialVelocity) -> SpatialVelocity

      Negation operator.

      :returns: Negated SpatialVelocity.



   .. py:method:: barprod(other: SpatialVelocity) -> SpatialVelocity

      Compute the bar product with another spatial velocity.

      \f[ \bar A B = - {\tilde A}^* B  = \begin{bmatrix} \tilde A_w & \tilde
      A_v \\  0  & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v
      \end{bmatrix} \f]

      :param other: The SpatialVelocity to compute the bar product with.

      :returns: Resulting SpatialVelocity.



   .. py:method:: cross(other: SpatialVelocity) -> SpatialVelocity

      Compute 6-D cross product with another spatial velocity.

      @f[
       A \times B = \tilde A  B = \begin{bmatrix} \tilde A_w & \tilde A_v \\
       0 & \tilde A_w
      \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix}
       @f]

      :param other: The SpatialVelocity to compute the cross product with.

      :returns: Resulting SpatialVelocity.



   .. py:method:: getv() -> Karana.Math.Ktyping.Velocity3

      Get the linear portion of the spatial vector.

      :returns: Const reference to linear vector.



   .. py:method:: getw() -> Karana.Math.Ktyping.AngularVelocity3

      Get the angular portion of the spatial vector.

      :returns: Const reference to angular vector.



   .. py:method:: multiplyFromLeft(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> SpatialVelocity

      Multiply the velocity from left with a matrix, i.e v * mat.

      :param mat: Matrix to multiply.

      :returns: Resulting SpatialVelocity.



   .. py:method:: setv(v: numpy.typing.ArrayLike | Karana.Math.Ktyping.Velocity3) -> None

      Set the linear portion of the spatial vector.

      :param v: New linear vector.



   .. py:method:: setw(w: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularVelocity3) -> None

      Set the angular portion of the spatial vector.

      :param w: New angular vector.



.. py:class:: StateSpace(num_inputs: SupportsInt | SupportsIndex, num_outputs: SupportsInt | SupportsIndex, num_states: SupportsInt | SupportsIndex, state_deriv_fn: collections.abc.Callable[[Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]], None], output_fn: collections.abc.Callable[[Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]], Annotated[numpy.typing.NDArray[numpy.float64], [m, 1], flags.writeable]], None], mode: Literal['forward', 'central'] = 'forward')

   Use provided non-linear equations to create a state space model of the
   form:
          x_dot = A*x + B*u, y = C*x + D*u from a nonlinear set of
          equations of the form x_dot = f(x,u), y = g(x,u)


   .. py:method:: generate(x: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]], u: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]]) -> SS

      Generate a state space model by linearizing the system about x and u.
      :param x: The state vector, x, to generate about.
      :param u: The input vector, u, to generate about.

      :returns: A structure with the matrices for the state space model.



.. py:class:: UnitQuaternion(x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex, w: SupportsFloat | SupportsIndex, renormalize: bool = False, skip_values_check: bool = False)
              UnitQuaternion(rv: RotationVector)
              UnitQuaternion(array: Annotated[numpy.typing.ArrayLike, numpy.float64, [4, 1]], renormalize: bool = False, skip_values_check: bool = True)
              UnitQuaternion(angle: SupportsFloat | SupportsIndex | Karana.Math.Ktyping.Angle, axis: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]])
              UnitQuaternion(v1: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], v2: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]])
              UnitQuaternion(rot: RotationMatrix)
              UnitQuaternion(other: UnitQuaternion)
              UnitQuaternion(ea: EulerAngles)

   .. py:attribute:: __hash__
      :type:  ClassVar[None]
      :value: None



   .. py:method:: __eq__(arg0: UnitQuaternion) -> bool


   .. py:method:: __getstate__() -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]


   .. py:method:: __mul__(other: UnitQuaternion) -> UnitQuaternion
                  __mul__(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]
                  __mul__(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.Length3) -> Karana.Math.Ktyping.Length3
                  __mul__(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.Velocity3) -> Karana.Math.Ktyping.Velocity3
                  __mul__(arg0: numpy.typing.ArrayLike | Karana.Math.Ktyping.AngularVelocity3) -> Karana.Math.Ktyping.AngularVelocity3
                  __mul__(arg0: SpatialVelocity) -> SpatialVelocity
                  __mul__(arg0: SpatialAcceleration) -> SpatialAcceleration
                  __mul__(arg0: SpatialForce) -> SpatialForce
                  __mul__(arg0: SpatialMomentum) -> SpatialMomentum
                  __mul__(arg0: SpatialVector) -> SpatialVector
                  __mul__(arg0: Ray) -> Ray

      Rotate the input spatial acceleration

      :param vec: spatial acceleration to transform

      :returns: Transformed spatial acceleration.



   .. py:method:: __repr__()


   .. py:method:: __setstate__(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [4, 1]]) -> None


   .. py:method:: dumpString(prefix: str = '', precision: SupportsInt | SupportsIndex = 6, format_type: DumpFormatType = DumpFormatType.DEFAULT_FLOAT) -> str

      Get a string representation of the UnitQuaternion.

      :param prefix: String prefix for each line.
      :param precision: Number of digits to use for floating point values.
      :param format_type: The format type to use.

      :returns: String with information about this UnitQuaternion.



   .. py:method:: inverse() -> UnitQuaternion

      Return the inverse of the quaternion

      :returns: the inverse quaternion



   .. py:method:: isApprox(other: UnitQuaternion, prec: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Check whether this quaternion is approximately the same as another.

      This method will also return true if the coefficients are
      approximately negative of all the coefficients of the other (since
      both unit quaternions then represent the same rotation).

      :param other: the other quaternion
      :param prec: the tolerance value

      :returns: true, if the quaternions are the same within the specified
                tolerance



   .. py:method:: isIdentity(epsilon: SupportsFloat | SupportsIndex = 1e-12) -> bool

      Check whether this quaternion is the identity quaternion

      :param epsilon: the tolerance value

      :returns: true, if the quaternion is the identity quaternion; false
                otherwise.



   .. py:method:: omegaToRates(omega: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]], oframe: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]

      Compute the quaternion coeff rates for an angular velocity

      :param omega: the input angular velocity
      :param oframe: if true, the angular velocity is in the 'from' frame, else
                     the 'to' frame

      :returns: the 4-vector with coefficient rates

      $See also:

      vectorRatesToOmegaMap(), omegaToVectorRatesMap(),
      omegaToScalarRateMap()



   .. py:method:: omegaToRatesMap(arg0: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      The 4x3 matrix that maps the angular velocity to the coefficient rates
      :param oframe: if true, the angular velocity is in the 'from' frame, else
                     the 'to' frame

      :returns: the 4x3 matrix map



   .. py:method:: omegaToScalarRateMap() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      The 3-vector whose dot product with the angular velocity yields the
      scalar coeff rates

      This expression is the same whether the angular velocity is in the
      oframe or not

      :returns: the 3 vector map

      $See also:

      vectorRatesToOmegaMap(), omegaToVectorRatesMap(),
      omegaToScalarRateMap()



   .. py:method:: omegaToVectorRatesMap(oframe: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      The 3x3 matrix that maps the angular velocity to the quaternion vector
      rates

      :param oframe: if true, the angular velocity is in the 'from' frame, else
                     in the 'to' frame

      :returns: the 3x3 matrix map

      $See also:

      vectorRatesToOmegaMap(), omegaToVectorRatesMap(),
      omegaToScalarRateMap()



   .. py:method:: ratesToOmegaMap(arg0: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      The 3x4 matrix that maps the coefficient rates to the angular velocity
      :param oframe: if true, the angular velocity is in the 'from' frame, else
                     the 'to' frame.

      :returns: the 3x4 matrix map



   .. py:method:: ratesToRotVecRatesMap() -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      The 3x4 matrix that maps quaternion rates to rot vector rates

      :returns: the 3x4 matrix map



   .. py:method:: rotate(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 3]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      Apply a rotational transformation symmetrically to a 3x3 matrix.

      Multiply the input 3x3 matrix from the left by R, and the right by R
      transpose: R * M * R_T. Here, R denotes the 3x3 rotation matrix for
      this quaternion.

      :param mat: 3x3 matrix to transform

      :returns: Transformed matrix

      $See also:

      inverseRotate66()



   .. py:method:: rotate66(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, 6]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, 6]]

      Apply a rotational transformation symmetrically to a 6x6 matrix.

      Multiply the input 6x6 matrix from both sides by (R_block_diag) * M *
      (R_block_diag)_T. Here, R_block_diag denotes a 6x6 matrix containing
      the 3x3 rotation matrix for this quaternion repeated along the block
      diagonal.

      :param mat: 6x6 matrix to transform

      :returns: Transformed matrix

      $See also:

      inverseRotate66()



   .. py:method:: rotateLeft6N(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [6, n]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [6, n]]

      Apply a rotational transformation from the left to a 6xN matrix.

      Multiply the input 6xN matrix from the left as (R_block_diag) * M.
      Here, R_block_diag denotes a 6x6 matrix containing the 3x3 rotation
      matrix for this quaternion repeated along the block diagonal.

      :param mat: 6xN matrix to transform

      :returns: Transformed matrix

      $See also:

      rotateRightN6()



   .. py:method:: rotateRightN6(mat: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, n]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, n]]

      Apply a rotational transformation from the right to a Nx6 matrix.

      Multiply the input Nx6 matrix from the right as M * (R_block_diag).
      Here, R_block_diag denotes a 6x6 matrix containing the 3x3 rotation
      matrix for this quaternion repeated along the block diagonal.

      :param mat: Nx6 matrix to transform

      :returns: Transformed matrix

      $See also:

      rotateLeft6N()



   .. py:method:: setIdentity() -> None

      Set the unit quaternion to the identity value



   .. py:method:: toAngleAxis() -> tuple[Karana.Math.Ktyping.Angle, Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]]

      Return the angle/axis representation for the quaternion.

      :returns: angle/axis representation



   .. py:method:: toEulerAngles(euler_system: EulerSystem = EulerSystem.XYZ) -> EulerAngles

      Convert to EulerAngles with the specified EulerSystem.

      :returns: EulerAngles for this quaternion.



   .. py:method:: toRotationMatrix() -> RotationMatrix

      Return the rotation matrix for this quaternion.

      The rotation matrix is recomputed if the current value is not healthy,
      else the cached value is returned.

      :returns: The rotation matrix representation of this UnitQuaternion.



   .. py:method:: toRotationVector() -> RotationVector

      Return the RotationVector representation for the quaternion.

      :returns: RotationVector representation



   .. py:method:: toVector4() -> Annotated[numpy.typing.NDArray[numpy.float64], [4, 1]]

      Return the quaternion elements as a 4-vector.

      Note that the vector elements are in the beginning, and the last
      element is the scalar.

      :returns: 4-vector of coefficients.



   .. py:method:: vec() -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 1]]

      Return the 3-vector part of the quaternion coefficients

      :returns: 3-vector coefficients.



   .. py:method:: vectorRatesToOmegaMap(oframe: bool, epsilon: SupportsFloat | SupportsIndex = 1e-12) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

      The 3x3 matrix that maps the quaternion vector rates to the angular
      velocity

      :param oframe: if true, the angular velocity is in the 'from' frame, else
                     the 'to' frame
      :param epsilon: tolerance to check if close to 180 degree rotation

      :returns: the 3x3 matrix map

      $See also:

      vectorRatesToOmegaMap(), omegaToVectorRatesMap(),
      omegaToScalarRateMap()



   .. py:method:: to_yaml(representer, node)
      :classmethod:


      Class method used to represent UnitQuaternion in a yaml file.



   .. py:method:: from_yaml(loader, node) -> Self
      :classmethod:


      Construct a UnitQuaternion from yaml file data.



   .. py:method:: to_json(o: UnitQuaternion) -> dict[str, Any]
      :staticmethod:


      Class method used to represent UnitQuaternion in a json file.



   .. py:method:: from_json(d: dict[str, Any]) -> Self
      :classmethod:


      Construct a UnitQuaternion from json file data.



.. py:function:: buildNaNWithPayload(payload: SupportsInt | SupportsIndex) -> float

   Create a NaN double with a particular mantissa payload

   :param payload: The payload

   :returns: The NaN double with given mantissa payload


.. py:function:: floatingPointExceptions(arg0: bool) -> None

   Function to enable/disable exceptions when there are floating point
   errors

   This method is handy for tracking down the source of NaNs by using a
   source debugger to break on exceptions. This method is specifically
   for gcc compiled code.

   :param enable: If true, floating point exceptions will be raised, else
                  disabled


.. py:function:: isNaNWithPayload(candidate: SupportsFloat | SupportsIndex, payload: SupportsInt | SupportsIndex) -> bool

   Whether a double is a NaN with a given mantissa payload

   :param candidate: The candidate double to check.
   :param payload: The payload to check for.

   :returns: Whether candidate is a NaN with the given payload.


.. py:function:: isNotReadyNaN(candidate: SupportsFloat | SupportsIndex) -> bool

   Whether a double is a NaN indicating a not ready value

   :param candidate: The candidate double to check.

   :returns: Whether candidate is a NaN indicating a not ready value.


.. py:function:: ktimeToSeconds(arg0: SupportsFloat | SupportsIndex | numpy.timedelta64) -> float

   Convert a Ktime value to a double (units in seconds).

   :param kt: The Ktime value to convert.

   :returns: The converted time.


.. py:data:: notReadyNaN
   :type:  float

.. py:data:: notReadyPayload
   :type:  int
   :value: 1954


.. py:function:: secondsToKtime(arg0: SupportsFloat | SupportsIndex) -> numpy.timedelta64

   Convert a seconds (double) time value to Ktime

   :param t: The time in seconds to convert.

   :returns: The input time in seconds converted to a Ktime.


.. py:function:: solveLcpPgs(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, n]], arg1: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]], arg2: SupportsInt | SupportsIndex, arg3: SupportsFloat | SupportsIndex) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]

   Calculate the 3x3 skew cross-product matrix for the input vector.

   :param v: The vector to compute the skew cross-product matrix for.

   :returns: The skew cross-product matrix.


.. py:function:: solveLcpPsor(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, n]], arg1: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]], arg2: SupportsFloat | SupportsIndex, arg3: SupportsInt | SupportsIndex, arg4: SupportsFloat | SupportsIndex) -> Annotated[numpy.typing.NDArray[numpy.float64], [m, 1]]

   Calculate the 3x3 skew cross-product matrix for the input vector.

   :param v: The vector to compute the skew cross-product matrix for.

   :returns: The skew cross-product matrix.


.. py:function:: tilde(arg0: Annotated[numpy.typing.ArrayLike, numpy.float64, [3, 1]]) -> Annotated[numpy.typing.NDArray[numpy.float64], [3, 3]]

   Calculate the 3x3 skew cross-product matrix for the input vector.

   :param v: The vector to compute the skew cross-product matrix for.

   :returns: The skew cross-product matrix.


