Changeset 0683ee2 for src/mathutils.h


Ignore:
Timestamp:
Sep 2, 2015, 11:38:31 AM (9 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:
a82cedc
Parents:
4598946
Message:

src/*.h: remove trailing spaces, update copyrights

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.h

    r4598946 r0683ee2  
    11/*
    2   Copyright (C) 2003-2014 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    8383
    8484/** swap the left and right halves of a vector
    85  
     85
    8686  This function swaps the left part of the signal with the right part of the
    8787signal. Therefore
    8888
    8989  \f$ a[0], a[1], ..., a[\frac{N}{2}], a[\frac{N}{2}+1], ..., a[N-1], a[N] \f$
    90  
     90
    9191  becomes
    92  
     92
    9393  \f$ a[\frac{N}{2}+1], ..., a[N-1], a[N], a[0], a[1], ..., a[\frac{N}{2}] \f$
    9494
     
    9696can be used before computing the FFT to simplify the phase relationship of the
    9797resulting spectrum. See Amalia de Götzen's paper referred to above.
    98  
     98
    9999*/
    100100void fvec_shift (fvec_t * v);
     
    112112
    113113  The High Frequency Content is defined as \f$ \sum_0^{N-1} (k+1) v[k] \f$.
    114  
    115   \param v vector to get the energy from 
     114
     115  \param v vector to get the energy from
    116116
    117117  \return the HFC of v
    118  
     118
    119119*/
    120120smpl_t fvec_local_hfc (fvec_t * v);
    121121
    122 /** computes the p-norm of a vector 
    123  
     122/** computes the p-norm of a vector
     123
    124124  Computes the p-norm of a vector for \f$ p = \alpha \f$
    125125
    126126  \f$ L^p = ||x||_p = (|x_1|^p + |x_2|^p + ... + |x_n|^p ) ^ \frac{1}{p} \f$
    127  
     127
    128128  If p = 1, the result is the Manhattan distance.
    129129
     
    134134
    135135  References:
    136  
     136
    137137    - <a href="http://en.wikipedia.org/wiki/Lp_space">\f$L^p\f$ space</a> on
    138138  Wikipedia
     
    142142
    143143  \return the p-norm of v
    144  
     144
    145145*/
    146146smpl_t fvec_alpha_norm (fvec_t * v, smpl_t p);
     
    148148/**  alpha normalisation
    149149
    150   This function divides all elements of a vector by the p-norm as computed by 
     150  This function divides all elements of a vector by the p-norm as computed by
    151151fvec_alpha_norm().
    152152
     
    166166
    167167/** remove the minimum value of the vector to each elements
    168  
     168
    169169  \param v vector to remove minimum from
    170170
     
    177177position of a vector, taking the median among post elements before and up to
    178178pre elements after pos.
    179  
     179
    180180  \param v input vector
    181181  \param tmp temporary vector of length post+1+pre
    182   \param post length of causal part to take before pos 
     182  \param post length of causal part to take before pos
    183183  \param pre length of anti-causal part to take after pos
    184   \param pos index to compute threshold for 
    185 
    186   \return moving median threshold value 
     184  \param pos index to compute threshold for
     185
     186  \return moving median threshold value
    187187
    188188*/
     
    197197  \param v input vector
    198198  \param tmp temporary vector of length post+1+pre
    199   \param post length of causal part to take before pos 
     199  \param post length of causal part to take before pos
    200200  \param pre length of anti-causal part to take after pos
    201201
     
    203203void fvec_adapt_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre);
    204204
    205 /** returns the median of a vector 
     205/** returns the median of a vector
    206206
    207207  The QuickSelect routine is based on the algorithm described in "Numerical
     
    216216
    217217  \return the median of v
    218  
     218
    219219*/
    220220smpl_t fvec_median (fvec_t * v);
     
    249249
    250250/** Quadratic interpolation using Lagrange polynomial.
    251  
     251
    252252  Inspired from ``Comparison of interpolation algorithms in real-time sound
    253 processing'', Vladimir Arnost, 
    254  
    255   \param s0,s1,s2 are 3 consecutive samples of a curve 
     253processing'', Vladimir Arnost,
     254
     255  \param s0,s1,s2 are 3 consecutive samples of a curve
    256256  \param pf is the floating point index [0;2]
    257  
     257
    258258  \return \f$ s0 + (pf/2.)*((pf-3.)*s0-2.*(pf-2.)*s1+(pf-1.)*s2); \f$
    259259
Note: See TracChangeset for help on using the changeset viewer.