[wpimath] Remove duplicate WPIMathJNI class (#2639)

This commit is contained in:
Matt
2020-08-16 17:16:53 -07:00
committed by GitHub
parent dc9e560f9b
commit ef5e0c2e75
6 changed files with 33 additions and 84 deletions

View File

@@ -65,6 +65,30 @@ public final class WPIMathJNI {
int inputs,
double[] S);
/**
* Computes the matrix exp.
*
* @param src Array of elements of the matrix to be exponentiated.
* @param rows how many rows there are.
* @param dst Array where the result will be stored.
*/
public static native void exp(double[] src, int rows, double[] dst);
/**
* Returns true if (A, B) is a stabilizable pair.
*
* <p>(A,B) is stabilizable if and only if the uncontrollable eigenvalues of A, if
* any, have absolute values less than one, where an eigenvalue is
* uncontrollable if rank(lambda * I - A, B) &lt; n where n is number of states.
*
* @param states the number of states of the system.
* @param inputs the number of inputs to the system.
* @param A System matrix.
* @param B Input matrix.
* @return If the system is stabilizable.
*/
public static native boolean isStabilizable(int states, int inputs, double[] A, double[] B);
public static class Helper {
private static AtomicBoolean extractOnStaticLoad = new AtomicBoolean(true);