Changeset f72364d


Ignore:
Timestamp:
Mar 3, 2013, 4:29:36 AM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
69b11d8
Parents:
f9d5346
Message:

src/*.h: improve documentation

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/cvec.h

    rf9d5346 rf72364d  
    3838*/
    3939
    40 /** 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 */
    4163typedef struct {
    4264  uint_t length;  /**< length of buffer = (requested length)/2 + 1 */
     
    6991  is to access these values from wrappers, as created by swig.
    7092
    71   \param s vector to write to 
     93  \param s vector to write to
    7294  \param data norm value to write in s->norm[position]
    7395  \param position sample position to write to
     
    130152smpl_t * cvec_get_phas(cvec_t *s);
    131153
    132 /** print out cvec data 
     154/** print out cvec data
    133155
    134   \param s vector to print out 
     156  \param s vector to print out
    135157
    136158*/
     
    145167void cvec_set(cvec_t *s, smpl_t val);
    146168
    147 /** set all elements to zero 
     169/** set all elements to zero
    148170
    149171  \param s vector to modify
     
    152174void cvec_zeros(cvec_t *s);
    153175
    154 /** set all elements to ones 
     176/** set all elements to ones
    155177
    156178  \param s vector to modify
  • src/fmat.h

    rf9d5346 rf72364d  
    2828/** \file
    2929
    30   Real buffers
     30  Matrix of real valued data
    3131
    32   This file specifies the fmat_t type, which is used in aubio to store real
    33   valued arrays.
     32  This file specifies the fmat_t type, which is used in aubio to store arrays
     33  of floating point values.
     34
     35  \example test-fmat.c
    3436
    3537*/
     
    3739/** Buffer for real data */
    3840typedef struct {
    39   uint_t length;   /**< length of buffer */
    40   uint_t height; /**< number of channels */
    41   smpl_t **data;   /**< data array of size [length] * [channels] */
     41  uint_t length; /**< length of matrix */
     42  uint_t height; /**< height of matrix */
     43  smpl_t **data; /**< data array of size [length] * [height] */
    4244} fmat_t;
    4345
  • src/fvec.h

    rf9d5346 rf72364d  
    2828/** \file
    2929
    30   Real buffers
     30  Vector of real-valued data
    3131
    32   This file specifies the fvec_t buffer type, which is used throughout aubio to
    33   store real data.
     32  This file specifies the ::fvec_t buffer type, which is used throughout aubio
     33  to store vector of real-valued ::smpl_t.
     34
     35  \example test-fvec.c
    3436
    3537*/
    3638
    37 /** Buffer for real data */
     39/** Buffer for real data
     40
     41  Vector of real-valued data
     42
     43  ::fvec_t is is the structure used to store vector of real-valued data, ::smpl_t .
     44
     45  \code
     46
     47  uint_t buffer_size = 1024;
     48
     49  // create a vector of 512 values
     50  fvec_t * input = new_fvec (buffer_size);
     51
     52  // set some values of the vector
     53  input->data[23] = 2.;
     54  // ..
     55
     56  // compute the mean of the vector
     57  mean = fvec_mean(a_vector);
     58
     59  // destroy the vector
     60  del_fvec(a_vector);
     61
     62  \endcode
     63
     64  See `examples/` and `tests/src` directories for more examples.
     65
     66 */
    3867typedef struct {
    39   uint_t length;   /**< length of buffer */
    40   smpl_t *data;   /**< data array of size [length] */
     68  uint_t length;  /**< length of buffer */
     69  smpl_t *data;   /**< data vector of length ::fvec_t.length */
    4170} fvec_t;
    4271
  • src/lvec.h

    rf9d5346 rf72364d  
    2828/** \file
    2929
    30   Real buffers
     30  Vector of real-valued data in double precision
    3131
    32   This file specifies the lvec_t buffer type, which is used in aubio to store
    33   double precision real data. Note that the lvec_t data type is mostly used for
    34   IIR filters (see temporal/filter.h).
     32  This file specifies the ::lvec_t buffer type, which is used in some places in
     33  aubio to store a vector of ::lsmp_t.
     34
     35  Note: the lvec_t data type is required in some algorithms such as IIR filters
     36  (see temporal/filter.h).
     37
     38  \example test-lvec.c
    3539
    3640*/
     
    3842/** Buffer for real data in double precision */
    3943typedef struct {
    40   uint_t length;   /**< length of buffer */
    41   lsmp_t *data;   /**< data array of size [length] */
     44  uint_t length; /**< length of buffer */
     45  lsmp_t *data;  /**< data array of size [length] */
    4246} lvec_t;
    4347
  • src/mathutils.h

    rf9d5346 rf72364d  
    2424
    2525  \example test-mathutils.c
     26  \example test-mathutils-window.c
    2627
    2728 */
Note: See TracChangeset for help on using the changeset viewer.