Changes in src/cvec.h [66fb3ea:f72364d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/cvec.h ¶
r66fb3ea rf72364d 28 28 /** \file 29 29 30 Complex buffers30 Vector of complex-valued data 31 31 32 This file specifies the cvec_t buffer type, which is used throughout aubio to 33 store complex data. Complex values are stored in terms of phase and 34 norm, within size/2+1 long vectors. 32 This file specifies the ::cvec_t buffer type, which is used throughout aubio 33 to store complex data. Complex values are stored in terms of ::cvec_t.phas 34 and norm, within size/2+1 long vectors of ::smpl_t. 35 36 \example test-cvec.c 35 37 36 38 */ 37 39 38 /** Buffer for complex data */ 40 /** Buffer for complex data 41 42 \code 43 44 uint_t buffer_size = 1024; 45 46 // create a complex vector of 512 values 47 cvec_t * input = new_cvec (buffer_size); 48 49 // set some values of the vector 50 input->norm[23] = 2.; 51 input->phas[23] = M_PI; 52 // .. 53 54 // compute the mean of the vector 55 mean = cvec_mean(input); 56 57 // destroy the vector 58 del_cvec (input); 59 60 \endcode 61 62 */ 39 63 typedef struct { 40 uint_t length; 41 smpl_t *norm; /**< norm array of size [length]*/42 smpl_t *phas; /**< phase array of size [length]*/64 uint_t length; /**< length of buffer = (requested length)/2 + 1 */ 65 smpl_t *norm; /**< norm array of size ::cvec_t.length */ 66 smpl_t *phas; /**< phase array of size ::cvec_t.length */ 43 67 } cvec_t; 44 68 … … 48 72 [length/2+1], corresponding to the norm and phase values of the 49 73 spectral frame. The length stored in the structure is the actual size of both 50 arrays, not the length of the complex and sym etrical vector, specified as74 arrays, not the length of the complex and symmetrical vector, specified as 51 75 creation argument. 52 76 … … 67 91 is to access these values from wrappers, as created by swig. 68 92 69 \param s vector to write to 93 \param s vector to write to 70 94 \param data norm value to write in s->norm[position] 71 95 \param position sample position to write to … … 128 152 smpl_t * cvec_get_phas(cvec_t *s); 129 153 130 /** print out cvec data 154 /** print out cvec data 131 155 132 \param s vector to print out 156 \param s vector to print out 133 157 134 158 */ … … 143 167 void cvec_set(cvec_t *s, smpl_t val); 144 168 145 /** set all elements to zero 169 /** set all elements to zero 146 170 147 171 \param s vector to modify … … 150 174 void cvec_zeros(cvec_t *s); 151 175 152 /** set all elements to ones 176 /** set all elements to ones 153 177 154 178 \param s vector to modify
Note: See TracChangeset
for help on using the changeset viewer.