Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/cvec.h

    rf72364d r66fb3ea  
    2828/** \file
    2929
    30   Vector of complex-valued data
     30  Complex buffers
    3131
    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
     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.
    3735
    3836*/
    3937
    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  */
     38/** Buffer for complex data */
    6339typedef struct {
    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 */
     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] */
    6743} cvec_t;
    6844
     
    7248  [length/2+1], corresponding to the norm and phase values of the
    7349  spectral frame. The length stored in the structure is the actual size of both
    74   arrays, not the length of the complex and symmetrical vector, specified as
     50  arrays, not the length of the complex and symetrical vector, specified as
    7551  creation argument.
    7652
     
    9167  is to access these values from wrappers, as created by swig.
    9268
    93   \param s vector to write to
     69  \param s vector to write to 
    9470  \param data norm value to write in s->norm[position]
    9571  \param position sample position to write to
     
    152128smpl_t * cvec_get_phas(cvec_t *s);
    153129
    154 /** print out cvec data
     130/** print out cvec data 
    155131
    156   \param s vector to print out
     132  \param s vector to print out 
    157133
    158134*/
     
    167143void cvec_set(cvec_t *s, smpl_t val);
    168144
    169 /** set all elements to zero
     145/** set all elements to zero 
    170146
    171147  \param s vector to modify
     
    174150void cvec_zeros(cvec_t *s);
    175151
    176 /** set all elements to ones
     152/** set all elements to ones 
    177153
    178154  \param s vector to modify
Note: See TracChangeset for help on using the changeset viewer.