Class EigenJNI

java.lang.Object
edu.wpi.first.math.jni.WPIMathJNI
edu.wpi.first.math.jni.EigenJNI

public final class EigenJNI extends WPIMathJNI
Eigen JNI.
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.wpi.first.math.jni.WPIMathJNI

    WPIMathJNI.Helper
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    exp(double[] src, int rows, double[] dst)
    Computes the matrix exp.
    static void
    pow(double[] src, int rows, double exponent, double[] dst)
    Computes the matrix pow.
    static void
    rankUpdate(double[] mat, int rows, double[] vec, double sigma, boolean lowerTriangular)
    Performs an inplace rank one update (or downdate) of an upper triangular Cholesky decomposition matrix.
    static void
    solveFullPivHouseholderQr(double[] A, int Arows, int Acols, double[] B, int Brows, int Bcols, double[] dst)
    Solves the least-squares problem Ax=B using a QR decomposition with full pivoting.

    Methods inherited from class edu.wpi.first.math.jni.WPIMathJNI

    forceLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • exp

      public static void exp(double[] src, int rows, double[] dst)
      Computes the matrix exp.
      Parameters:
      src - Array of elements of the matrix to be exponentiated.
      rows - How many rows there are.
      dst - Array where the result will be stored.
    • pow

      public static void pow(double[] src, int rows, double exponent, double[] dst)
      Computes the matrix pow.
      Parameters:
      src - Array of elements of the matrix to be raised to a power.
      rows - How many rows there are.
      exponent - The exponent.
      dst - Array where the result will be stored.
    • rankUpdate

      public static void rankUpdate(double[] mat, int rows, double[] vec, double sigma, boolean lowerTriangular)
      Performs an inplace rank one update (or downdate) of an upper triangular Cholesky decomposition matrix.
      Parameters:
      mat - Array of elements of the matrix to be updated.
      lowerTriangular - Whether mat is lower triangular.
      rows - How many rows there are.
      vec - Vector to use for the rank update.
      sigma - Sigma value to use for the rank update.
    • solveFullPivHouseholderQr

      public static void solveFullPivHouseholderQr(double[] A, int Arows, int Acols, double[] B, int Brows, int Bcols, double[] dst)
      Solves the least-squares problem Ax=B using a QR decomposition with full pivoting.
      Parameters:
      A - Array of elements of the A matrix.
      Arows - Number of rows of the A matrix.
      Acols - Number of rows of the A matrix.
      B - Array of elements of the B matrix.
      Brows - Number of rows of the B matrix.
      Bcols - Number of rows of the B matrix.
      dst - Array to store solution in. If A is m-n and B is m-p, dst is n-p.