Instrument Neutral Distributed Interface INDI  1.9.5
Functions
buffer.c File Reference
#include "dsp.h"

Go to the source code of this file.

Functions

void dsp_buffer_shift (dsp_stream_p stream)
 Shift a stream on each dimension. More...
 
void dsp_buffer_removemean (dsp_stream_p stream)
 Subtract mean from stream. More...
 
void dsp_buffer_sub (dsp_stream_p stream, dsp_t *in, int inlen)
 Subtract elements of one stream from another's. More...
 
void dsp_buffer_sum (dsp_stream_p stream, dsp_t *in, int inlen)
 Sum elements of one stream to another's. More...
 
void dsp_buffer_div (dsp_stream_p stream, dsp_t *in, int inlen)
 Divide elements of one stream to another's. More...
 
void dsp_buffer_mul (dsp_stream_p stream, dsp_t *in, int inlen)
 Multiply elements of one stream to another's. More...
 
void dsp_buffer_pow (dsp_stream_p stream, dsp_t *in, int inlen)
 Expose elements of one stream to another's. More...
 
void dsp_buffer_log (dsp_stream_p stream, dsp_t *in, int inlen)
 Logarithm elements of one stream using another's as base. More...
 
void dsp_buffer_1sub (dsp_stream_p stream, double val)
 Subtract each element of the input stream a value. More...
 
void dsp_buffer_sub1 (dsp_stream_p stream, double val)
 Subtract a value from elements of the input stream. More...
 
void dsp_buffer_sum1 (dsp_stream_p stream, double val)
 Sum elements of the input stream to a value. More...
 
void dsp_buffer_1div (dsp_stream_p stream, double val)
 Divide a value to each element of the input stream. More...
 
void dsp_buffer_div1 (dsp_stream_p stream, double val)
 Divide elements of the input stream to a value. More...
 
void dsp_buffer_mul1 (dsp_stream_p stream, double val)
 Multiply elements of the input stream to a value. More...
 
void dsp_buffer_pow1 (dsp_stream_p stream, double val)
 Expose elements of the input stream to the given power. More...
 
void dsp_buffer_log1 (dsp_stream_p stream, double val)
 Logarithm elements of the input stream using the given base. More...
 
void dsp_buffer_median (dsp_stream_p stream, int size, int median)
 Median elements of the inut stream. More...
 
void dsp_buffer_deviate (dsp_stream_p stream, dsp_t *deviation, dsp_t mindeviation, dsp_t maxdeviation)
 Deviate forward the first input stream using the second stream as indexing reference. More...
 

Function Documentation

◆ dsp_buffer_1div()

void dsp_buffer_1div ( dsp_stream_p  stream,
double  val 
)

Divide a value to each element of the input stream.

Parameters
streamthe stream on which execute
valthe nominator.

Definition at line 150 of file buffer.c.

◆ dsp_buffer_1sub()

void dsp_buffer_1sub ( dsp_stream_p  stream,
double  val 
)

Subtract each element of the input stream a value.

Parameters
streamthe stream on which execute
valthe value to be subtracted.

Definition at line 120 of file buffer.c.

◆ dsp_buffer_deviate()

void dsp_buffer_deviate ( dsp_stream_p  stream,
dsp_t deviation,
dsp_t  mindeviation,
dsp_t  maxdeviation 
)

Deviate forward the first input stream using the second stream as indexing reference.

Parameters
streamthe stream on which execute
deviationthe stream containing the deviation buffer
mindeviationthe deviation at 0.
maxdeviationthe deviation at 1.

Definition at line 223 of file buffer.c.

◆ dsp_buffer_div()

void dsp_buffer_div ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Divide elements of one stream to another's.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 76 of file buffer.c.

◆ dsp_buffer_div1()

void dsp_buffer_div1 ( dsp_stream_p  stream,
double  val 
)

Divide elements of the input stream to a value.

Parameters
streamthe stream on which execute
valthe denominator.

Definition at line 160 of file buffer.c.

◆ dsp_buffer_log()

void dsp_buffer_log ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Logarithm elements of one stream using another's as base.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 109 of file buffer.c.

◆ dsp_buffer_log1()

void dsp_buffer_log1 ( dsp_stream_p  stream,
double  val 
)

Logarithm elements of the input stream using the given base.

Parameters
streamthe stream on which execute
valthe logarithmic base.

Definition at line 190 of file buffer.c.

◆ dsp_buffer_median()

void dsp_buffer_median ( dsp_stream_p  stream,
int  size,
int  median 
)

Median elements of the inut stream.

Parameters
streamthe stream on which execute
sizethe length of the median.
medianthe location of the median value.

Definition at line 210 of file buffer.c.

◆ dsp_buffer_mul()

void dsp_buffer_mul ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Multiply elements of one stream to another's.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 87 of file buffer.c.

◆ dsp_buffer_mul1()

void dsp_buffer_mul1 ( dsp_stream_p  stream,
double  val 
)

Multiply elements of the input stream to a value.

Parameters
streamthe stream on which execute
valthe value used for this operation.

Definition at line 170 of file buffer.c.

◆ dsp_buffer_pow()

void dsp_buffer_pow ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Expose elements of one stream to another's.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 98 of file buffer.c.

◆ dsp_buffer_pow1()

void dsp_buffer_pow1 ( dsp_stream_p  stream,
double  val 
)

Expose elements of the input stream to the given power.

Parameters
streamthe stream on which execute
valthe nth power to expose each element.

Definition at line 180 of file buffer.c.

◆ dsp_buffer_removemean()

void dsp_buffer_removemean ( dsp_stream_p  stream)

Subtract mean from stream.

Parameters
streamthe stream on which execute

Definition at line 44 of file buffer.c.

◆ dsp_buffer_shift()

void dsp_buffer_shift ( dsp_stream_p  stream)

Shift a stream on each dimension.

Parameters
streamthe input stream.

Definition at line 21 of file buffer.c.

◆ dsp_buffer_sub()

void dsp_buffer_sub ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Subtract elements of one stream from another's.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 54 of file buffer.c.

◆ dsp_buffer_sub1()

void dsp_buffer_sub1 ( dsp_stream_p  stream,
double  val 
)

Subtract a value from elements of the input stream.

Parameters
streamthe stream on which execute
valthe value to be subtracted.

Definition at line 130 of file buffer.c.

◆ dsp_buffer_sum()

void dsp_buffer_sum ( dsp_stream_p  stream,
dsp_t in,
int  len 
)

Sum elements of one stream to another's.

Parameters
streamthe stream on which execute
inthe buffer operand.
lenthe length of the buffer

Definition at line 65 of file buffer.c.

◆ dsp_buffer_sum1()

void dsp_buffer_sum1 ( dsp_stream_p  stream,
double  val 
)

Sum elements of the input stream to a value.

Parameters
streamthe stream on which execute
valthe value used for this operation.

Definition at line 140 of file buffer.c.