#include "utils_tests.h"
{
for (i = 0; i < vec->
length; i++) {
assert(vec->
data[i] == scalar);
}
}
int main (void)
{
assert (vec);
assert (other_vec);
assert(vec->
length == length);
for ( i = 0; i < vec->
length; i++ ) {
assert(vec->
data[i] == 0.);
}
assert_fvec_all_equal(vec, 1.);
assert_fvec_all_equal(vec, 0.);
for ( i = 0; i < vec->
length; i++ ) {
assert(vec->
data[i] == i);
}
if (vec)
if (other_vec)
return 0;
}
Global aubio include file.
void fvec_copy(const fvec_t *s, fvec_t *t)
make a copy of a vector
smpl_t * fvec_get_data(const fvec_t *s)
read data from a buffer
void fvec_set_sample(fvec_t *s, smpl_t data, uint_t position)
write sample value in a buffer
fvec_t * new_fvec(uint_t length)
fvec_t buffer creation function
void del_fvec(fvec_t *s)
fvec_t buffer deletion function
void fvec_zeros(fvec_t *s)
set all elements to zero
void fvec_print(const fvec_t *s)
print out fvec data
void fvec_ones(fvec_t *s)
set all elements to ones
smpl_t fvec_get_sample(const fvec_t *s, uint_t position)
read sample value in a buffer
smpl_t * data
data vector of length fvec_t.length
uint_t length
length of buffer
unsigned int uint_t
unsigned integer
float smpl_t
short sample format (32 or 64 bits)