Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/cvec.h

    r66fb3ea rf72364d  
    2828/** \file
    2929
    30   Complex buffers
     30  Vector of complex-valued data
    3131
    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
    3537
    3638*/
    3739
    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 */
    3963typedef struct {
    40   uint_t length;   /**< length of buffer = (requested length)/2 + 1 */
    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 */
    4367} cvec_t;
    4468
     
    4872  [length/2+1], corresponding to the norm and phase values of the
    4973  spectral frame. The length stored in the structure is the actual size of both
    50   arrays, not the length of the complex and symetrical vector, specified as
     74  arrays, not the length of the complex and symmetrical vector, specified as
    5175  creation argument.
    5276
     
    6791  is to access these values from wrappers, as created by swig.
    6892
    69   \param s vector to write to 
     93  \param s vector to write to
    7094  \param data norm value to write in s->norm[position]
    7195  \param position sample position to write to
     
    128152smpl_t * cvec_get_phas(cvec_t *s);
    129153
    130 /** print out cvec data 
     154/** print out cvec data
    131155
    132   \param s vector to print out 
     156  \param s vector to print out
    133157
    134158*/
     
    143167void cvec_set(cvec_t *s, smpl_t val);
    144168
    145 /** set all elements to zero 
     169/** set all elements to zero
    146170
    147171  \param s vector to modify
     
    150174void cvec_zeros(cvec_t *s);
    151175
    152 /** set all elements to ones 
     176/** set all elements to ones
    153177
    154178  \param s vector to modify
Note: See TracChangeset for help on using the changeset viewer.