aubio 0.4.9
Loading...
Searching...
No Matches
lvec.h File Reference

Vector of real-valued data in double precision. More...

Go to the source code of this file.

Data Structures

struct  lvec_t
 Buffer for real data in double precision. More...
 

Functions

lvec_tnew_lvec (uint_t length)
 lvec_t buffer creation function
 
void del_lvec (lvec_t *s)
 lvec_t buffer deletion function
 
lsmp_t lvec_get_sample (lvec_t *s, uint_t position)
 read sample value in a buffer
 
void lvec_set_sample (lvec_t *s, lsmp_t data, uint_t position)
 write sample value in a buffer
 
lsmp_tlvec_get_data (const lvec_t *s)
 read data from a buffer
 
void lvec_print (const lvec_t *s)
 print out lvec data
 
void lvec_set_all (lvec_t *s, smpl_t val)
 set all elements to a given value
 
void lvec_zeros (lvec_t *s)
 set all elements to zero
 
void lvec_ones (lvec_t *s)
 set all elements to ones
 

Detailed Description

Vector of real-valued data in double precision.

This file specifies the lvec_t buffer type, which is used in some places in aubio to store a vector of lsmp_t.

Note: the lvec_t data type is required in some algorithms such as IIR filters (see temporal/filter.h).

Definition in file lvec.h.

Function Documentation

◆ del_lvec()

void del_lvec ( lvec_t * s)

lvec_t buffer deletion function

Parameters
sbuffer to delete as returned by new_lvec()
Examples
test-lvec.c.

◆ lvec_get_data()

lsmp_t * lvec_get_data ( const lvec_t * s)

read data from a buffer

Parameters
svector to read from
Examples
test-lvec.c.

◆ lvec_get_sample()

lsmp_t lvec_get_sample ( lvec_t * s,
uint_t position )

read sample value in a buffer

Parameters
svector to read from
positionsample position to read from
Examples
test-lvec.c.

◆ lvec_ones()

void lvec_ones ( lvec_t * s)

set all elements to ones

Parameters
svector to modify
Examples
test-lvec.c.

◆ lvec_print()

void lvec_print ( const lvec_t * s)

print out lvec data

Parameters
svector to print out
Examples
test-lvec.c.

◆ lvec_set_all()

void lvec_set_all ( lvec_t * s,
smpl_t val )

set all elements to a given value

Parameters
svector to modify
valvalue to set elements to
Examples
test-lvec.c.

◆ lvec_set_sample()

void lvec_set_sample ( lvec_t * s,
lsmp_t data,
uint_t position )

write sample value in a buffer

Parameters
svector to write to
datavalue to write in s->data[position]
positionsample position to write to
Examples
test-lvec.c.

◆ lvec_zeros()

void lvec_zeros ( lvec_t * s)

set all elements to zero

Parameters
svector to modify
Examples
test-lvec.c.

◆ new_lvec()

lvec_t * new_lvec ( uint_t length)

lvec_t buffer creation function

Parameters
lengththe length of the buffer to create
Examples
test-lvec.c.