diff --git a/Firj/.gitignore b/Firj/.gitignore
deleted file mode 100644
index fd45b12..0000000
--- a/Firj/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/caches/build_file_checksums.ser
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-.DS_Store
-/build
-/captures
-.externalNativeBuild
diff --git a/Firj/.idea/caches/gradle_models.ser b/Firj/.idea/caches/gradle_models.ser
deleted file mode 100644
index 6c0840d..0000000
Binary files a/Firj/.idea/caches/gradle_models.ser and /dev/null differ
diff --git a/Firj/.idea/compiler.xml b/Firj/.idea/compiler.xml
deleted file mode 100644
index fb7f4a8..0000000
--- a/Firj/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Firj/.idea/encodings.xml b/Firj/.idea/encodings.xml
deleted file mode 100644
index 15a15b2..0000000
--- a/Firj/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Firj/.idea/gradle.xml b/Firj/.idea/gradle.xml
deleted file mode 100644
index bb0c2f7..0000000
--- a/Firj/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Firj/.idea/jarRepositories.xml b/Firj/.idea/jarRepositories.xml
deleted file mode 100644
index e34606c..0000000
--- a/Firj/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Firj/.idea/misc.xml b/Firj/.idea/misc.xml
deleted file mode 100644
index 3dd3a3a..0000000
--- a/Firj/.idea/misc.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Firj/.idea/vcs.xml b/Firj/.idea/vcs.xml
deleted file mode 100644
index 6c0b863..0000000
--- a/Firj/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Firj/build.gradle b/Firj/build.gradle
deleted file mode 100644
index 6f30445..0000000
--- a/Firj/build.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
-
- repositories {
- mavenCentral()
- google()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:7.0.2'
- }
-}
-
-allprojects {
- repositories {
- mavenCentral()
- google()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/Firj/firj/.gitignore b/Firj/firj/.gitignore
deleted file mode 100644
index 796b96d..0000000
--- a/Firj/firj/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/Firj/firj/CMakeLists.txt b/Firj/firj/CMakeLists.txt
deleted file mode 100644
index 1959769..0000000
--- a/Firj/firj/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-# For more information about using CMake with Android Studio, read the
-# documentation: https://d.android.com/studio/projects/add-native-code.html
-
-# Sets the minimum version of CMake required to build the native library.
-
-cmake_minimum_required(VERSION 3.4.1)
-
-# Creates and names a library, sets it as either STATIC
-# or SHARED, and provides the relative paths to its source code.
-# You can define multiple libraries, and CMake builds them for you.
-# Gradle automatically packages shared libraries with your APK.
-
-add_library( # Sets the name of the library.
- fir-lib
-
- # Sets the library as a shared library.
- SHARED
-
- # Provides a relative path to your source file(s).
- src/main/cpp/firwrapper.cpp
- ../../Fir1.cpp)
-
-# Searches for a specified prebuilt library and stores the path as a
-# variable. Because CMake includes system libraries in the search path by
-# default, you only need to specify the name of the public NDK library
-# you want to add. CMake verifies that the library exists before
-# completing its build.
-
-find_library( # Sets the name of the path variable.
- log-lib
-
- # Specifies the name of the NDK library that
- # you want CMake to locate.
- log)
-
-# Specifies libraries CMake should link to your target library. You
-# can link multiple libraries, such as libraries you define in this
-# build script, prebuilt third-party libraries, or system libraries.
-
-target_link_libraries( # Specifies the target library.
- fir-lib
-
- android
-
- # Links the target library to the log library
- # included in the NDK.
- ${log-lib})
diff --git a/Firj/firj/build.gradle b/Firj/firj/build.gradle
deleted file mode 100644
index 81619e8..0000000
--- a/Firj/firj/build.gradle
+++ /dev/null
@@ -1,38 +0,0 @@
-apply plugin: 'com.android.library'
-
-android {
- compileSdkVersion 30
-
-
-
- defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
- versionCode 5
- versionName "1.6.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- ndk {
- debugSymbolLevel = 'SYMBOL_TABLE'
- }
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- externalNativeBuild {
- cmake {
- path file('CMakeLists.txt')
- }
- }
-
-}
-
-dependencies {
- androidTestImplementation 'androidx.test:runner:1.4.0'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestUtil 'androidx.test:orchestrator:1.4.0'
-}
diff --git a/Firj/firj/build/outputs/aar/firj-debug.aar b/Firj/firj/build/outputs/aar/firj-debug.aar
deleted file mode 100644
index cb4131d..0000000
Binary files a/Firj/firj/build/outputs/aar/firj-debug.aar and /dev/null differ
diff --git a/Firj/firj/proguard-rules.pro b/Firj/firj/proguard-rules.pro
deleted file mode 100644
index f1b4245..0000000
--- a/Firj/firj/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/Firj/firj/src/androidTest/java/uk/me/berndporr/firj/InstrumentedTest.java b/Firj/firj/src/androidTest/java/uk/me/berndporr/firj/InstrumentedTest.java
deleted file mode 100644
index 2e56d47..0000000
--- a/Firj/firj/src/androidTest/java/uk/me/berndporr/firj/InstrumentedTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package uk.me.berndporr.firj;
-
-import android.util.Log;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-/**
- * Instrumented test, which will execute on an Android device.
- */
-@RunWith(AndroidJUnit4.class)
-public class InstrumentedTest {
-
- final String TAG="InstrumentedTest";
-
- final double delta = 1E-40;
-
- public double[] randArr(int nTaps) {
- double[] a = new double[nTaps];
- for(int i=0;i 10)) {
- v = 1;
- }
- // let's filter a delta pulse at time step 1 and
- // a unit step at time step 10
- v = fir.filter(v);
- // now let's check if the filter has done the right ops
- // the delta pulse should reproduce the impulse respnse
- if ( (i < 9) && (i > 0) ) {
- assertEquals(Math.round(c[i-1]),Math.round(v),delta);
- }
- // and the step response should accumulate it
- if (i > 10) {
- acc = acc + c[i - 11];
- assertEquals(Math.round(v),Math.round(acc),delta);
- }
- Log.v(TAG,"Fir1: t="+i+",v="+v);
- }
- fir.release();
- }
-
- @Test
- public void coeffTest() {
- double[] c = randArr(100);
- Fir1 fir = new Fir1(c);
- double[] coeff = fir.getCoeff();
- for(int i=0; i < fir.getTaps(); i++) {
- assertEquals(c[i],coeff[i],delta);
- }
- fir.release();
- Log.v(TAG,"Coeff readout with default length OK.");
- }
-
- @Test
- public void coeffTest2() {
- int n = 100;
- double[] c = randArr(n);
- Fir1 fir = new Fir1(c);
- double[] coeff = fir.getCoeff(n+10);
- for(int i=0; i < fir.getTaps(); i++) {
- assertEquals(c[i],coeff[i],delta);
- }
- fir.release();
- Log.v(TAG,"Coeff readout with custom length OK.");
- }
-
- @Test
- public void coeffTest3() {
- int n = 100;
- double[] c = randArr(n);
- Fir1 fir = new Fir1(c);
- boolean exceptionHasHappend = false;
- try {
- double[] coeff = fir.getCoeff(n/2);
- for (int i = 0; i < fir.getTaps(); i++) {
- assertEquals(c[i], coeff[i], delta);
- }
- } catch (Exception e) {
- exceptionHasHappend = true;
- Log.v(TAG,"Exception because of lack of space successfully triggered:",e);
- }
- fir.release();
- assertTrue(exceptionHasHappend);
- }
-
-}
diff --git a/Firj/firj/src/main/AndroidManifest.xml b/Firj/firj/src/main/AndroidManifest.xml
deleted file mode 100644
index 94496a1..0000000
--- a/Firj/firj/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
diff --git a/Firj/firj/src/main/cpp/firwrapper.cpp b/Firj/firj/src/main/cpp/firwrapper.cpp
deleted file mode 100644
index c669d8f..0000000
--- a/Firj/firj/src/main/cpp/firwrapper.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "../../../../../Fir1.h"
-
-extern "C" {
-
-jlong
-Java_uk_me_berndporr_firj_Fir1_getInstance(JNIEnv *env,
- jclass,
- jdoubleArray coeffArray) {
-
- double *coeffValues = env->GetDoubleArrayElements(coeffArray, 0);
- auto nTaps = (unsigned) env->GetArrayLength(coeffArray);
-
- Fir1 *fir = new Fir1(coeffValues, nTaps);
-
- env->ReleaseDoubleArrayElements(coeffArray, coeffValues, 0);
-
- return (jlong) fir;
-}
-
-
-jlong
-Java_uk_me_berndporr_firj_Fir1_getInstanceLMS(JNIEnv *env,
- jclass,
- jint nTaps) {
-
- Fir1 *fir = new Fir1((unsigned)nTaps);
- return (jlong) fir;
-}
-
-
-jint Java_uk_me_berndporr_firj_Fir1_getTaps(JNIEnv *,
- jclass,
- jlong instance) {
- Fir1 *fir = (Fir1 *) instance;
- if (fir == nullptr) return 0;
- return (jint)(fir->getTaps());
-}
-
-
-jdouble
-Java_uk_me_berndporr_firj_Fir1_filter(JNIEnv *,
- jclass,
- jlong instance,
- jdouble value) {
- Fir1 *fir = (Fir1 *) instance;
- if (fir == nullptr) return 0;
- return fir->filter(value);
-}
-
-
-void
-Java_uk_me_berndporr_firj_Fir1_lmsUpdate(JNIEnv *,
- jclass,
- jlong instance,
- jdouble error) {
- Fir1 *fir = (Fir1 *) instance;
- return fir->lms_update(error);
-}
-
-
-void
-Java_uk_me_berndporr_firj_Fir1_setLearningRate(JNIEnv *,
- jclass,
- jlong instance,
- jdouble mu) {
- Fir1 *fir = (Fir1 *) instance;
- return fir->setLearningRate(mu);
-}
-
-
-jdouble
-Java_uk_me_berndporr_firj_Fir1_getTapInputPower(JNIEnv *,
- jclass,
- jlong instance) {
- Fir1 *fir = (Fir1 *) instance;
- return fir->getTapInputPower();
-}
-
-
-jlong Java_uk_me_berndporr_firj_Fir1_releaseInstance(JNIEnv *,
- jclass,
- jlong instance) {
- Fir1 *fir = (Fir1 *) instance;
- delete fir;
- return (jlong)nullptr;
-}
-
-jdoubleArray Java_uk_me_berndporr_firj_Fir1_getCoeff(JNIEnv * env, jclass, jlong instance, jint n) {
- Fir1 *fir = (Fir1 *) instance;
- jdoubleArray doubleArray = env->NewDoubleArray(n);
- jdouble *doubleValues = env->GetDoubleArrayElements(doubleArray, 0);
- try {
- fir->getCoeff(doubleValues, (unsigned) n);
- } catch (std::out_of_range&e) {
- jclass Exception = env->FindClass("java/lang/Exception");
- env->ThrowNew(Exception,e.what());
- }
- env->ReleaseDoubleArrayElements(doubleArray, doubleValues, 0);
- return doubleArray;
-}
-
-
-}
diff --git a/Firj/firj/src/main/java/uk/me/berndporr/firj/Fir1.java b/Firj/firj/src/main/java/uk/me/berndporr/firj/Fir1.java
deleted file mode 100644
index 94ca921..0000000
--- a/Firj/firj/src/main/java/uk/me/berndporr/firj/Fir1.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package uk.me.berndporr.firj;
-
-import android.util.Log;
-
-public class Fir1 {
-
- static final String TAG = "Fir1";
-
- private long instance = 0;
-
- /**
- * Constructor: takes the FIR coefficients and sets the
- * length of the filter
- * @param coefficients: FIR coefficients
- */
- public Fir1(double[] coefficients) {
- instance = getInstance(coefficients);
- }
-
- /**
- * Inits an FIR filter with all coefficients and the buffer set to zero.
- * That's useful for setting up the LMS filter.
- * @param numberOfTaps of the FIR filter.
- */
- public Fir1(int numberOfTaps) {
- instance = getInstanceLMS(numberOfTaps);
- }
-
- /**
- * Gets the number of taps
- * @return Number of taps
- */
- public int getTaps() {return getTaps(instance);}
-
- /**
- * Realtime / causal filter operation: one sample in and
- * one sample out
- * @param v: input value
- * @return is the filtered value
- */
- public double filter(double v) {
- return filter(instance,v);
- }
-
- /**
- * LMS filter update
- * @param error is the error applied to all weights
- */
- public void lmsUpdate(double error) {
- lmsUpdate(instance,error);
- }
-
- /**
- * Sets the learning rate which defines how strong
- * the error influences the weights
- * @param mu learning rate
- */
- public void setLearningRate(double mu) {
- setLearningRate(instance,mu);
- }
-
- /**
- * Gets the tap input power to normalised LMS
- * @return tap input power
- */
- public double getTapInputPower() {
- return getTapInputPower(instance);
- }
-
- /**
- * Gets the coefficients
- * @return A double array of the coefficients
- */
- public double[] getCoeff() {return getCoeff(instance,getTaps(instance)); }
-
- /**
- * Gets the coefficients
- * @return A double array of the coefficients
- */
- public double[] getCoeff(int n) {return getCoeff(instance,n); }
-
- /**
- * Needs to be called when the filter is no longer being
- * used. This frees up the memory for both the ringbuffer
- * and the coefficients.
- */
- public void release() {
- instance = releaseInstance(instance);
- }
-
- private static native long getInstance(double[] coefficients);
- private static native long getInstanceLMS(int numberOfTaps);
- private static native int getTaps(long instance);
- private static native double filter(long instance, double v);
- private static native long releaseInstance(long instance);
- private static native void lmsUpdate(long instance, double error);
- private static native void setLearningRate(long instance, double mu);
- private static native double getTapInputPower(long instance);
- private static native double[] getCoeff(long instance, int n);
-
- static {
- System.loadLibrary("fir-lib");
- Log.d(TAG,"Fir1 library loaded");
- }
-
-}
diff --git a/Firj/firj/src/main/res/values/strings.xml b/Firj/firj/src/main/res/values/strings.xml
deleted file mode 100644
index 7abc06d..0000000
--- a/Firj/firj/src/main/res/values/strings.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Firj/gradle.properties b/Firj/gradle.properties
deleted file mode 100644
index 63d7b24..0000000
--- a/Firj/gradle.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-
-
-android.useAndroidX=true
diff --git a/Firj/gradle/wrapper/gradle-wrapper.jar b/Firj/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961f..0000000
Binary files a/Firj/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/Firj/gradle/wrapper/gradle-wrapper.properties b/Firj/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index d1322b2..0000000
--- a/Firj/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Tue Jan 29 00:18:06 GMT 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
diff --git a/Firj/gradlew b/Firj/gradlew
deleted file mode 100755
index cccdd3d..0000000
--- a/Firj/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/Firj/gradlew.bat b/Firj/gradlew.bat
deleted file mode 100644
index e95643d..0000000
--- a/Firj/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/Firj/settings.gradle b/Firj/settings.gradle
deleted file mode 100644
index e10d158..0000000
--- a/Firj/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':firj'
diff --git a/README.md b/README.md
index cd37255..39168ac 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,9 @@

An efficient finite impulse response (FIR) filter class
-in C++, JAVA wrapper for Android and Python wrapper.
+in C++ and Python wrapper.
-The floating point class offers also adaptive filtering
+The FIR filter class offers also adaptive filtering
using the least mean square (LMS) or normalised least mean
square (NLMS) algorithm.
@@ -53,14 +53,6 @@ you want to compile both the release and debug
libraries because they are not compatible to each
other under Windows.
-### Android / JAVA
-
-The subdirectory `firj` contains an Android project. Load
-it into Android studio and build it either as a release
-or debug binary. This generates an Android aar which you
-import into your project. See the `InstrumentedTest.java`
-for an instructional example.
-
### Python
#### Installation from the python package index (PyPi)
@@ -141,13 +133,6 @@ with a constant value:
Fir1 moving_average(100,1.0/100);
```
-#### JAVA:
-```
-Fir1 fir = new Fir1(coeff);
-```
-where `coeff` is an array of double precision coefficients
-and returns the fir filter class.
-
#### Python
```
f = fir1.Fir1(coeff)
@@ -160,18 +145,13 @@ f = fir1.Fir1(coeff)
double b = fir.filter(a);
```
-#### JAVA:
-```
-double b = fir.filter(a)
-```
-
#### Python
```
b = f.filter(a)
```
### Utility methods
-These functions are the same in C++, JAVA and Python:
+These functions are the same in C++ and Python:
+ `getTaps()` returns the length of the FIR filter kernel.
+ `reset()` sets all delay lines to zero.
@@ -198,26 +178,6 @@ and exception-throwing behaviour of the C++. The returned array will have `n` el
which is a copy of the filter kernel. This is probably the default use case in Python.
-#### JAVA
-+ `double[] getCoeff()` returns a double array of the filter kernel.
-+ `double[] getCoeff(n : int)` as per the C++ method, following the zero-padding
-and exception-throwing behaviour of the C++. The returned array will have `n` elements.
-
-
-### Destructor
-
-#### C++
-```
-delete fir;
-```
-
-#### JAVA
-```
-fir.release();
-```
-to release the underlying C++ class.
-
-
## LMS algorithm

@@ -230,7 +190,7 @@ h_m(n+1) = h_m(n) + learning_rate * h_m(n) * e(n)
using the function `lms_update(e)` while performing
the filtering with `filter()`.
-### How to use the filter
+### How to use the LMS filter
- Construct the Fir filter with all coefficients set to zero: `Fir1(nCoeff)`
- Set the learning_rate with the method `setLearningRate(learning_rate)`.
@@ -267,7 +227,7 @@ See the demo below which removes 50Hz from an ECG which uses a normalised 50Hz s
which guarantees stability by design.
-### JAVA/Python
+### Python
The commands under JAVA and Python are identical to C++.
@@ -281,9 +241,7 @@ response at its output.
adaptive filtering by using the 50Hz powerline frequency as the input
to the filter. This can be replaced by any reference artefact signal
or signal which is correlated with the artefact.
-3. JAVA has an `InstrumentedTest` which filters both a delta pulse and
-a step function.
-4. filter_ecg.py performs the filtering of an ECG in python using
+3. filter_ecg.py performs the filtering of an ECG in python using
the fir1 python module which in turn calls internally the C++ functions.
## C++ documentation
@@ -296,9 +254,6 @@ The doxygen generated documentation can be found here:
## Unit tests
Under C++ just run `make test` or `ctest`.
-The JAVA wrapper contains an instrumented test which you can run on
-your Android device.
-
## Credits
diff --git a/fir1.i b/fir1.i
index fd340e4..f6f18c0 100644
--- a/fir1.i
+++ b/fir1.i
@@ -42,7 +42,7 @@ def getCoeff(self, *args):
return $action(self, *args)
%}
-%apply (double* IN_ARRAY1, int DIM1) {(double *coefficients, unsigned number_of_taps)};
+%apply (double* IN_ARRAY1, int DIM1) {(const double *coefficients, const unsigned number_of_taps)};
%apply (double* ARGOUT_ARRAY1, int DIM1) {(double *coeff_data, unsigned number_of_taps)};
%include "Fir1.h"
diff --git a/setup.py b/setup.py
index d34127e..bc784df 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ def read(fname):
setup (name = 'fir1',
- version = '1.7.1.1',
+ version = '1.8.0.0',
author = "Bernd Porr",
author_email = "mail@berndporr.me.uk",
url = "https://github.com/berndporr/fir1",