aubio  0.4.0
 All Data Structures Files Functions Variables Typedefs Macros
Data Structures | Functions
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 More...
 
void del_lvec (lvec_t *s)
 lvec_t buffer deletion function More...
 
lsmp_t lvec_get_sample (lvec_t *s, uint_t position)
 read sample value in a buffer More...
 
void lvec_set_sample (lvec_t *s, lsmp_t data, uint_t position)
 write sample value in a buffer More...
 
lsmp_tlvec_get_data (lvec_t *s)
 read data from a buffer More...
 
void lvec_print (lvec_t *s)
 print out lvec data More...
 
void lvec_set_all (lvec_t *s, smpl_t val)
 set all elements to a given value More...
 
void lvec_zeros (lvec_t *s)
 set all elements to zero More...
 
void lvec_ones (lvec_t *s)
 set all elements to ones More...
 

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

void del_lvec ( lvec_t s)

lvec_t buffer deletion function

Parameters
sbuffer to delete as returned by new_lvec()
Examples:
test-lvec.c.
lsmp_t* lvec_get_data ( lvec_t s)

read data from a buffer

Parameters
svector to read from
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
void lvec_ones ( lvec_t s)

set all elements to ones

Parameters
svector to modify
void lvec_print ( lvec_t s)

print out lvec data

Parameters
svector to print out
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
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
void lvec_zeros ( lvec_t s)

set all elements to zero

Parameters
svector to modify
lvec_t* new_lvec ( uint_t  length)

lvec_t buffer creation function

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