fvec.h File Reference

Vector of real-valued data. More...

Go to the source code of this file.

Data Structures

struct  fvec_t
 Buffer for real data. More...

Functions

fvec_tnew_fvec (uint_t length)
 fvec_t buffer creation function
void del_fvec (fvec_t *s)
 fvec_t buffer deletion function
smpl_t fvec_get_sample (fvec_t *s, uint_t position)
 read sample value in a buffer
void fvec_set_sample (fvec_t *s, smpl_t data, uint_t position)
 write sample value in a buffer
smpl_tfvec_get_data (fvec_t *s)
 read data from a buffer
void fvec_print (fvec_t *s)
 print out fvec data
void fvec_set_all (fvec_t *s, smpl_t val)
 set all elements to a given value
void fvec_zeros (fvec_t *s)
 set all elements to zero
void fvec_ones (fvec_t *s)
 set all elements to ones
void fvec_rev (fvec_t *s)
 revert order of vector elements
void fvec_weight (fvec_t *s, fvec_t *weight)
 apply weight to vector
void fvec_copy (fvec_t *s, fvec_t *t)
 make a copy of a vector


Detailed Description

Vector of real-valued data.

This file specifies the fvec_t buffer type, which is used throughout aubio to store vector of real-valued smpl_t.

Definition in file fvec.h.


Function Documentation

void del_fvec ( fvec_t s  ) 

void fvec_copy ( fvec_t s,
fvec_t t 
)

make a copy of a vector

Parameters:
s source vector
t vector to copy to

smpl_t* fvec_get_data ( fvec_t s  ) 

read data from a buffer

Parameters:
s vector to read from

smpl_t fvec_get_sample ( fvec_t s,
uint_t  position 
)

read sample value in a buffer

Parameters:
s vector to read from
position sample position to read from
Examples:
examples/aubionotes.c, examples/aubioonset.c, examples/aubiopitch.c, and examples/aubiotrack.c.

void fvec_ones ( fvec_t s  ) 

set all elements to ones

Parameters:
s vector to modify
Examples:
test-fvec.c.

void fvec_print ( fvec_t s  ) 

print out fvec data

Parameters:
s vector to print out
Examples:
io/test-source.c, spectral/test-mfcc.c, spectral/test-phasevoc.c, temporal/test-biquad.c, temporal/test-filter.c, test-fmat.c, and test-fvec.c.

void fvec_rev ( fvec_t s  ) 

revert order of vector elements

Parameters:
s vector to revert

void fvec_set_all ( fvec_t s,
smpl_t  val 
)

set all elements to a given value

Parameters:
s vector to modify
val value to set elements to
Examples:
spectral/test-phasevoc.c.

void fvec_set_sample ( fvec_t s,
smpl_t  data,
uint_t  position 
)

write sample value in a buffer

Parameters:
s vector to write to
data value to write in s->data[position]
position sample position to write to

void fvec_weight ( fvec_t s,
fvec_t weight 
)

apply weight to vector

If the weight vector is longer than s, only the first elements are used. If the weight vector is shorter than s, the last elements of s are not weighted.

Parameters:
s vector to weight
weight weighting coefficients

void fvec_zeros ( fvec_t s  ) 

set all elements to zero

Parameters:
s vector to modify
Examples:
examples/aubionotes.c, examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and test-fvec.c.

fvec_t* new_fvec ( uint_t  length  ) 


Generated on Mon Jan 16 21:51:31 2017 for aubio by  doxygen 1.5.6