public void setState(DenseMatrix64F x, DenseMatrix64F P) { if (doChecks) { MatrixTools.checkMatrixDimensions(x, nStates.getIntegerValue(), 1); MatrixTools.checkMatrixDimensions(P, nStates.getIntegerValue(), nStates.getIntegerValue()); } storeInYoVariablesVector(x, yoX); storeInYoVariablesSymmetric(P, yoP); }
public void setState(DenseMatrix64F x, DenseMatrix64F P) { if (doChecks) { MatrixTools.checkMatrixDimensions(x, nStates.getIntegerValue(), 1); MatrixTools.checkMatrixDimensions(P, nStates.getIntegerValue(), nStates.getIntegerValue()); } storeInYoVariablesVector(x, yoX); storeInYoVariablesSymmetric(P, yoP); }
@ContinuousIntegrationTest(estimatedDuration = 0.0) @Test(timeout=300000) public void testBackAndForthVector() { List<YoDouble> yoArray = new ArrayList<YoDouble>(); int size = 50; String prefix = "test"; YoVariableRegistry registry = new YoVariableRegistry("test"); DenseMatrix64F matrix = new DenseMatrix64F(size, 1); Random random = new Random(1235612L); RandomMatrices.setRandom(matrix, random); DenseMatrix64F matrixBack = new DenseMatrix64F(size, 1); MatrixYoVariableConversionTools.populateYoVariablesVector(yoArray, size, prefix, registry); MatrixYoVariableConversionTools.storeInYoVariablesVector(matrix, yoArray); MatrixYoVariableConversionTools.getFromYoVariablesVector(matrixBack, yoArray); EjmlUnitTests.assertEquals(matrix, matrixBack, 1e-12); }
public void predict(DenseMatrix64F u) { if (doChecks) { MatrixTools.checkMatrixDimensions(u, nInputs.getIntegerValue(), 1); } checkForNaN(u); getVariablesForPredictFromYoVariables(); updateAPrioriState(x, u); storeInYoVariablesVector(x, yoX); if (updateCovarianceAndGain.getBooleanValue()) { updateAPrioriCovariance(); storeInYoVariablesSymmetric(P, yoP); } }
public void update(DenseMatrix64F y) { checkForNaN(y); getVariablesForUpdateFromYoVariables(); if (updateCovarianceAndGain.getBooleanValue()) { updateKalmanGainMatrixK(); } updateAPosterioriState(x, y, K); storeInYoVariablesVector(x, yoX); if (updateCovarianceAndGain.getBooleanValue()) { updateAPosterioriStateCovariance(); storeInYoVariablesSymmetric(P, yoP); } }
public void predict(DenseMatrix64F u) { if (doChecks) { MatrixTools.checkMatrixDimensions(u, nInputs.getIntegerValue(), 1); } checkForNaN(u); getVariablesForPredictFromYoVariables(); updateAPrioriState(x, u); storeInYoVariablesVector(x, yoX); if (updateCovarianceAndGain.getBooleanValue()) { updateAPrioriCovariance(); storeInYoVariablesSymmetric(P, yoP); } }
public void update(DenseMatrix64F y) { checkForNaN(y); getVariablesForUpdateFromYoVariables(); if (updateCovarianceAndGain.getBooleanValue()) { updateKalmanGainMatrixK(); } updateAPosterioriState(x, y, K); storeInYoVariablesVector(x, yoX); if (updateCovarianceAndGain.getBooleanValue()) { updateAPosterioriStateCovariance(); storeInYoVariablesSymmetric(P, yoP); } }