Exemplo n.º 1
0
 public static int perform_rolling_filter(double[] data, int len, int period, int operation)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_rolling_filter(data, len, period, operation));
     }
     else
     {
         return(DataHandlerLibrary32.perform_rolling_filter(data, len, period, operation));
     }
 }
Exemplo n.º 2
0
 public static int get_psd_welch(double[] data, int data_len, int nfft, int overlap, int sampling_rate, int window, double[] output_ampls, double[] output_freqs)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));
     }
     else
     {
         return(DataHandlerLibrary32.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));
     }
 }
Exemplo n.º 3
0
 public static int get_band_power(double[] ampls, double[] freqs, int data_len, double start_freq, double stop_freq, double[] res)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));
     }
     else
     {
         return(DataHandlerLibrary32.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));
     }
 }
Exemplo n.º 4
0
 public static int detrend(double[] data, int len, int operation)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.detrend(data, len, operation));
     }
     else
     {
         return(DataHandlerLibrary32.detrend(data, len, operation));
     }
 }
Exemplo n.º 5
0
 public static int perform_ifft(double[] re, double[] im, int len, double[] data)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_ifft(re, im, len, data));
     }
     else
     {
         return(DataHandlerLibrary32.perform_ifft(re, im, len, data));
     }
 }
Exemplo n.º 6
0
 public static int perform_fft(double[] data, int data_len, int window, double[] output_re, double[] output_im)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_fft(data, data_len, window, output_re, output_im));
     }
     else
     {
         return(DataHandlerLibrary32.perform_fft(data, data_len, window, output_re, output_im));
     }
 }
Exemplo n.º 7
0
 public static int perform_downsampling(double[] data, int len, int period, int operation, double[] filtered_data)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_downsampling(data, len, period, operation, filtered_data));
     }
     else
     {
         return(DataHandlerLibrary32.perform_downsampling(data, len, period, operation, filtered_data));
     }
 }
Exemplo n.º 8
0
 public static int perform_wavelet_denoising(double[] data, int data_len, string wavelet, int decomposition_level)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));
     }
     else
     {
         return(DataHandlerLibrary32.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));
     }
 }
Exemplo n.º 9
0
 public static int write_file(double[] data, int num_rows, int num_cols, string file_name, string file_mode)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.write_file(data, num_rows, num_cols, file_name, file_mode));
     }
     else
     {
         return(DataHandlerLibrary32.write_file(data, num_rows, num_cols, file_name, file_mode));
     }
 }
Exemplo n.º 10
0
 public static int perform_highpass(double[] data, int len, int sampling_rate, double cutoff, int order, int filter_type, double ripple)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_highpass(data, len, sampling_rate, cutoff, order, filter_type, ripple));
     }
     else
     {
         return(DataHandlerLibrary32.perform_highpass(data, len, sampling_rate, cutoff, order, filter_type, ripple));
     }
 }
Exemplo n.º 11
0
 public static int perform_bandstop(double[] data, int len, int sampling_rate, double center_freq, double band_width, int order, int filter_type, double ripple)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_bandstop(data, len, sampling_rate, center_freq, band_width, order, filter_type, ripple));
     }
     else
     {
         return(DataHandlerLibrary32.perform_bandstop(data, len, sampling_rate, center_freq, band_width, order, filter_type, ripple));
     }
 }
Exemplo n.º 12
0
 public static int set_log_level(int log_level)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.set_log_level(log_level));
     }
     else
     {
         return(DataHandlerLibrary32.set_log_level(log_level));
     }
 }
Exemplo n.º 13
0
 public static int set_log_file(string log_file)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.set_log_file(log_file));
     }
     else
     {
         return(DataHandlerLibrary32.set_log_file(log_file));
     }
 }
Exemplo n.º 14
0
 public static int get_num_elements_in_file(string file_name, int[] num_elements)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.get_num_elements_in_file(file_name, num_elements));
     }
     else
     {
         return(DataHandlerLibrary32.get_num_elements_in_file(file_name, num_elements));
     }
 }
Exemplo n.º 15
0
 public static int get_nearest_power_of_two(int value, int[] output)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.get_nearest_power_of_two(value, output));
     }
     else
     {
         return(DataHandlerLibrary32.get_nearest_power_of_two(value, output));
     }
 }
Exemplo n.º 16
0
 public static int perform_wavelet_transform(double[] data, int data_len, string wavelet, int decomposition_level, double[] output_data, int[] decomposition_lengths)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_wavelet_transform(data, data_len, wavelet, decomposition_level, output_data, decomposition_lengths));
     }
     else
     {
         return(DataHandlerLibrary32.perform_wavelet_transform(data, data_len, wavelet, decomposition_level, output_data, decomposition_lengths));
     }
 }
Exemplo n.º 17
0
 public static int read_file(double[] data, int[] num_rows, int[] num_cols, string file_name, int max_elements)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.read_file(data, num_rows, num_cols, file_name, max_elements));
     }
     else
     {
         return(DataHandlerLibrary32.read_file(data, num_rows, num_cols, file_name, max_elements));
     }
 }
Exemplo n.º 18
0
 public static int get_avg_band_powers(double[] data, int rows, int cols, int sampling_rate, int apply_filters, double[] avgs, double[] stddevs)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));
     }
     else
     {
         return(DataHandlerLibrary32.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));
     }
 }
Exemplo n.º 19
0
 public static int perform_inverse_wavelet_transform(double[] wavelet_coeffs, int original_data_len, string wavelet, int decomposition_level,
                                                     int[] decomposition_lengths, double[] output_data)
 {
     if (System.Environment.Is64BitProcess)
     {
         return(DataHandlerLibrary64.perform_inverse_wavelet_transform(wavelet_coeffs, original_data_len, wavelet, decomposition_level, decomposition_lengths, output_data));
     }
     else
     {
         return(DataHandlerLibrary32.perform_inverse_wavelet_transform(wavelet_coeffs, original_data_len, wavelet, decomposition_level, decomposition_lengths, output_data));
     }
 }
Exemplo n.º 20
0
        public static int get_window(int window_function, int window_len, double[] window_data)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_window(window_function, window_len, window_data));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_window(window_function, window_len, window_data));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_window(window_function, window_len, window_data));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_window(window_function, window_len, window_data));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 21
0
        public static int get_band_power(double[] ampls, double[] freqs, int data_len, double start_freq, double stop_freq, double[] res)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_band_power(ampls, freqs, data_len, start_freq, stop_freq, res));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 22
0
        public static int get_psd_welch(double[] data, int data_len, int nfft, int overlap, int sampling_rate, int window, double[] output_ampls, double[] output_freqs)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_psd_welch(data, data_len, nfft, overlap, sampling_rate, window, output_ampls, output_freqs));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 23
0
        public static int perform_ifft(double[] re, double[] im, int len, double[] data)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.perform_ifft(re, im, len, data));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.perform_ifft(re, im, len, data));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.perform_ifft(re, im, len, data));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.perform_ifft(re, im, len, data));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 24
0
        public static int get_avg_band_powers(double[] data, int rows, int cols, int sampling_rate, int apply_filters, double[] avgs, double[] stddevs)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_avg_band_powers(data, rows, cols, sampling_rate, apply_filters, avgs, stddevs));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 25
0
        public static int perform_wavelet_denoising(double[] data, int data_len, string wavelet, int decomposition_level)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.perform_wavelet_denoising(data, data_len, wavelet, decomposition_level));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 26
0
        public static int perform_fft(double[] data, int data_len, int window, double[] output_re, double[] output_im)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.perform_fft(data, data_len, window, output_re, output_im));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.perform_fft(data, data_len, window, output_re, output_im));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.perform_fft(data, data_len, window, output_re, output_im));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.perform_fft(data, data_len, window, output_re, output_im));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 27
0
        public static int get_num_elements_in_file(string file_name, int[] num_elements)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_num_elements_in_file(file_name, num_elements));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_num_elements_in_file(file_name, num_elements));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_num_elements_in_file(file_name, num_elements));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_num_elements_in_file(file_name, num_elements));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 28
0
        public static int get_csp(double[] data, double[] labels, int n_epochs, int n_channels, int n_times, double[] output_filters, double[] output_eigenvalues)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_csp(data, labels, n_epochs, n_channels, n_times, output_filters, output_eigenvalues));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_csp(data, labels, n_epochs, n_channels, n_times, output_filters, output_eigenvalues));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_csp(data, labels, n_epochs, n_channels, n_times, output_filters, output_eigenvalues));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_csp(data, labels, n_epochs, n_channels, n_times, output_filters, output_eigenvalues));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 29
0
        public static int write_file(double[] data, int num_rows, int num_cols, string file_name, string file_mode)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.write_file(data, num_rows, num_cols, file_name, file_mode));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.write_file(data, num_rows, num_cols, file_name, file_mode));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.write_file(data, num_rows, num_cols, file_name, file_mode));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.write_file(data, num_rows, num_cols, file_name, file_mode));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Exemplo n.º 30
0
        public static int get_nearest_power_of_two(int value, int[] output)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(DataHandlerLibrary64.get_nearest_power_of_two(value, output));

            case LibraryEnvironment.x86:
                return(DataHandlerLibrary32.get_nearest_power_of_two(value, output));

            case LibraryEnvironment.Linux:
                return(DataHandlerLibraryLinux.get_nearest_power_of_two(value, output));

            case LibraryEnvironment.MacOS:
                return(DataHandlerLibraryMac.get_nearest_power_of_two(value, output));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }