public void testProgress() { Wavelet2D.ProgressDelegate del = new Wavelet2D.ProgressDelegate(logProgress); initTestData(new Biorthogonal53Wavelet2D(64, 64)); wavelet.TransformIsotropic2D(test, del); Assert.IsTrue(Math.Abs(100.0f - progressValue) < 0.00001f); wavelet.BacktransformIsotropic2D(test, del); Assert.IsTrue(Math.Abs(100.0f - progressValue) < 0.00001f); initTestData(new Biorthogonal53Wavelet2D(791, 324)); wavelet.TransformIsotropic2D(test, del); Assert.IsTrue(Math.Abs(100.0f - progressValue) < 0.00001f); wavelet.BacktransformIsotropic2D(test, del); Assert.IsTrue(Math.Abs(100.0f - progressValue) < 0.00001f); }
private void performForwardAndBackwardTest(Wavelet2D wavelet, bool parallel, bool cached, bool simpleTestData = false, bool checkTransformationResults = false) { initTestData(wavelet, simpleTestData); wavelet.EnableParallel = parallel; wavelet.EnableCaching = cached; wavelet.TransformIsotropic2D(test); //Note: This test is wrong, if transformation does not change //the values in the array! For a array with all zeros this is the case if (!isAllZero()) { Assert.IsFalse(compareSource()); } if (checkTransformationResults) { Assert.IsTrue(compareTransformed()); } wavelet.BacktransformIsotropic2D(test); Assert.IsTrue(compareSource()); }