TwiceAsNice  2019-02-18
Functions
libdspau-correlations.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "libdspau.h"
Include dependency graph for libdspau-correlations.c:

Functions

int dspau_bandpasscorrelate (double *in, double *out, int *c, int skip, double Q)
 A band-pass auto-correlator (Warning: high memory usage!) More...
 
int dspau_autocorrelate (double *in, double *out, int *c)
 An auto-correlator. More...
 
double dspau_crosscorrelate (double *in1, double *in2, double *out, int len1, int len2, int *len)
 A cross-correlator. More...
 

Function Documentation

◆ dspau_autocorrelate()

int dspau_autocorrelate ( double *  in,
double *  out,
int *  len 
)

An auto-correlator.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream (input/output).
skipskip n values at beginning (resulting len will be reduced).
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_bandpasscorrelate()

int dspau_bandpasscorrelate ( double *  in,
double *  out,
int *  len,
int  skip,
double  Q 
)

A band-pass auto-correlator (Warning: high memory usage!)

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream. (input/output)
skipskip n values at beginning (resulting len will be reduced).
Qthe slope of the band-pass filters.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_crosscorrelate()

double dspau_crosscorrelate ( double *  in1,
double *  in2,
double *  out,
int  len1,
int  len2,
int *  len 
)

A cross-correlator.

Parameters
in1the first input stream. (input)
in2the second input stream. (input)
outthe output stream. (output)
len1the length of the first input stream. (input)
len2the length of the second input stream. (input)
lenthe length of the output stream. (output)
Returns
the resulting correlation degree.
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.