*/
-/** Buffer for complex data */
+/** Buffer for complex data
+
+ \code
+
+ uint_t buffer_size = 1024;
+
+ // create a complex vector of 512 values
+ cvec_t * input = new_cvec (buffer_size);
+
+ // set some values of the vector
+ input->norm[23] = 2.;
+ input->phas[23] = M_PI;
+ // ..
+
+ // compute the mean of the vector
+ mean = cvec_mean(input);
+
+ // destroy the vector
+ del_cvec (input);
+
+ \endcode
+
+ */
typedef struct {
uint_t length; /**< length of buffer = (requested length)/2 + 1 */
smpl_t *norm; /**< norm array of size ::cvec_t.length */
result can be obtained by assigning vec->norm[position]. Its purpose
is to access these values from wrappers, as created by swig.
- \param s vector to write to
+ \param s vector to write to
\param data norm value to write in s->norm[position]
\param position sample position to write to
*/
smpl_t * cvec_get_phas(cvec_t *s);
-/** print out cvec data
+/** print out cvec data
- \param s vector to print out
+ \param s vector to print out
*/
void cvec_print(cvec_t *s);
*/
void cvec_set(cvec_t *s, smpl_t val);
-/** set all elements to zero
+/** set all elements to zero
\param s vector to modify
*/
void cvec_zeros(cvec_t *s);
-/** set all elements to ones
+/** set all elements to ones
\param s vector to modify
/** \file
- Real buffers
+ Matrix of real valued data
- This file specifies the fmat_t type, which is used in aubio to store real
- valued arrays.
+ This file specifies the fmat_t type, which is used in aubio to store arrays
+ of floating point values.
+
+ \example test-fmat.c
*/
/** Buffer for real data */
typedef struct {
- uint_t length; /**< length of buffer */
- uint_t height; /**< number of channels */
- smpl_t **data; /**< data array of size [length] * [channels] */
+ uint_t length; /**< length of matrix */
+ uint_t height; /**< height of matrix */
+ smpl_t **data; /**< data array of size [length] * [height] */
} fmat_t;
/** fmat_t buffer creation function
/** \file
- Real buffers
+ Vector of real-valued data
- This file specifies the fvec_t buffer type, which is used throughout aubio to
- store real data.
+ This file specifies the ::fvec_t buffer type, which is used throughout aubio
+ to store vector of real-valued ::smpl_t.
+
+ \example test-fvec.c
*/
-/** Buffer for real data */
+/** Buffer for real data
+
+ Vector of real-valued data
+
+ ::fvec_t is is the structure used to store vector of real-valued data, ::smpl_t .
+
+ \code
+
+ uint_t buffer_size = 1024;
+
+ // create a vector of 512 values
+ fvec_t * input = new_fvec (buffer_size);
+
+ // set some values of the vector
+ input->data[23] = 2.;
+ // ..
+
+ // compute the mean of the vector
+ mean = fvec_mean(a_vector);
+
+ // destroy the vector
+ del_fvec(a_vector);
+
+ \endcode
+
+ See `examples/` and `tests/src` directories for more examples.
+
+ */
typedef struct {
- uint_t length; /**< length of buffer */
- smpl_t *data; /**< data array of size [length] */
+ uint_t length; /**< length of buffer */
+ smpl_t *data; /**< data vector of length ::fvec_t.length */
} fvec_t;
/** fvec_t buffer creation function
/** \file
- Real buffers
+ Vector of real-valued data in double precision
- This file specifies the lvec_t buffer type, which is used in aubio to store
- double precision real data. Note that the lvec_t data type is mostly used for
- IIR filters (see temporal/filter.h).
+ 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).
+
+ \example test-lvec.c
*/
/** Buffer for real data in double precision */
typedef struct {
- uint_t length; /**< length of buffer */
- lsmp_t *data; /**< data array of size [length] */
+ uint_t length; /**< length of buffer */
+ lsmp_t *data; /**< data array of size [length] */
} lvec_t;
/** lvec_t buffer creation function
Various math functions
\example test-mathutils.c
+ \example test-mathutils-window.c
*/