#include "utils_tests.h"
{
for ( i = 0; i < mat->
height; i++ ) {
for ( j = 0; j < mat->
length; j++ ) {
assert(mat->
data[i][j] == scalar);
}
}
}
int main (void)
{
uint_t height = 3, length = 9;
assert(mat);
assert(other_mat);
assert(mat->
length == length);
assert(mat->
height == height);
for (i = 0; i < mat->
height; i++) {
for (j = 0; j < mat->
length; j++) {
assert(mat->
data[i][j] == 0);
mat->
data[i][j] = i * 10. + j;
}
}
for (i = 0; i < mat->
height; i++) {
for (j = 0; j < mat->
length; j++) {
assert(mat->
data[i][j] == i * 10. + mat->
length - 1. - j);
}
}
assert_fmat_all_equal(mat, 1.);
assert_fmat_all_equal(other_mat, .5);
assert_fmat_all_equal(mat, .5);
fvec_t *channel = &channel_onstack;
other_mat =
new_fmat(height - 1, length);
other_mat =
new_fmat(height, length + 1);
if (mat)
if (other_mat)
return 0;
}
Global aubio include file.
smpl_t * fmat_get_channel_data(const fmat_t *s, uint_t channel)
get vector buffer from an fmat data
void fmat_print(const fmat_t *s)
print out fmat data
void del_fmat(fmat_t *s)
fmat_t buffer deletion function
void fmat_weight(fmat_t *s, const fmat_t *weight)
apply weight to vector
void fmat_copy(const fmat_t *s, fmat_t *t)
make a copy of a matrix
void fmat_rev(fmat_t *s)
revert order of vector elements
void fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position)
write sample value in a buffer
smpl_t ** fmat_get_data(const fmat_t *s)
read data from a buffer
void fmat_ones(fmat_t *s)
set all elements to ones
void fmat_set(fmat_t *s, smpl_t val)
set all elements to a given value
void fmat_get_channel(const fmat_t *s, uint_t channel, fvec_t *output)
read channel vector from a buffer
fmat_t * new_fmat(uint_t height, uint_t length)
fmat_t buffer creation function
smpl_t fmat_get_sample(const fmat_t *s, uint_t channel, uint_t position)
read sample value in a buffer
smpl_t ** data
data array of size [length] * [height]
uint_t length
length of matrix
uint_t height
height of matrix
smpl_t * data
data vector of length fvec_t.length
unsigned int uint_t
unsigned integer
float smpl_t
short sample format (32 or 64 bits)