AUTHORS: use standard list of name/email
[aubio.git] / src / vecutils.h
1 /*
2   Copyright (C) 2009 Paul Brossier <piem@aubio.org>
3
4   This file is part of aubio.
5
6   aubio is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   aubio is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with aubio.  If not, see <http://www.gnu.org/licenses/>.
18
19 */
20
21 /** @file
22  *  various utilities functions for fvec and cvec objects
23  *
24  */
25
26 #ifndef _VECUTILS_H
27 #define _VECUTILS_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /** compute \f$e^x\f$ of each vector elements
34
35   \param s vector to modify
36
37 */
38 void fvec_exp (fvec_t *s);
39
40 /** compute \f$cos(x)\f$ of each vector elements
41
42   \param s vector to modify
43
44 */
45 void fvec_cos (fvec_t *s);
46
47 /** compute \f$sin(x)\f$ of each vector elements
48
49   \param s vector to modify
50
51 */
52 void fvec_sin (fvec_t *s);
53
54 /** compute the \f$abs(x)\f$ of each vector elements
55
56   \param s vector to modify
57
58 */
59 void fvec_abs (fvec_t *s);
60
61 /** compute the \f$sqrt(x)\f$ of each vector elements
62
63   \param s vector to modify
64
65 */
66 void fvec_sqrt (fvec_t *s);
67
68 /** compute the \f$log10(x)\f$ of each vector elements
69
70   \param s vector to modify
71
72 */
73 void fvec_log10 (fvec_t *s);
74
75 /** compute the \f$log(x)\f$ of each vector elements
76
77   \param s vector to modify
78
79 */
80 void fvec_log (fvec_t *s);
81
82 /** compute the \f$floor(x)\f$ of each vector elements
83
84   \param s vector to modify
85
86 */
87 void fvec_floor (fvec_t *s);
88
89 /** compute the \f$ceil(x)\f$ of each vector elements
90
91   \param s vector to modify
92
93 */
94 void fvec_ceil (fvec_t *s);
95
96 /** compute the \f$round(x)\f$ of each vector elements
97
98   \param s vector to modify
99
100 */
101 void fvec_round (fvec_t *s);
102
103 /** raise each vector elements to the power pow
104
105   \param s vector to modify
106   \param pow power to raise to
107
108 */
109 void fvec_pow (fvec_t *s, smpl_t pow);
110
111 /** compute \f$e^x\f$ of each vector norm elements
112
113   \param s vector to modify
114
115 */
116 void cvec_exp (cvec_t *s);
117
118 /** compute \f$cos(x)\f$ of each vector norm elements
119
120   \param s vector to modify
121
122 */
123 void cvec_cos (cvec_t *s);
124
125 /** compute \f$sin(x)\f$ of each vector norm elements
126
127   \param s vector to modify
128
129 */
130 void cvec_sin (cvec_t *s);
131
132 /** compute the \f$abs(x)\f$ of each vector norm elements
133
134   \param s vector to modify
135
136 */
137 void cvec_abs (cvec_t *s);
138
139 /** compute the \f$sqrt(x)\f$ of each vector norm elements
140
141   \param s vector to modify
142
143 */
144 void cvec_sqrt (cvec_t *s);
145
146 /** compute the \f$log10(x)\f$ of each vector norm elements
147
148   \param s vector to modify
149
150 */
151 void cvec_log10 (cvec_t *s);
152
153 /** compute the \f$log(x)\f$ of each vector norm elements
154
155   \param s vector to modify
156
157 */
158 void cvec_log (cvec_t *s);
159
160 /** compute the \f$floor(x)\f$ of each vector norm elements
161
162   \param s vector to modify
163
164 */
165 void cvec_floor (cvec_t *s);
166
167 /** compute the \f$ceil(x)\f$ of each vector norm elements
168
169   \param s vector to modify
170
171 */
172 void cvec_ceil (cvec_t *s);
173
174 /** compute the \f$round(x)\f$ of each vector norm elements
175
176   \param s vector to modify
177
178 */
179 void cvec_round (cvec_t *s);
180
181 /** raise each vector norm elements to the power pow
182
183   \param s vector to modify
184   \param pow power to raise to
185
186 */
187 void cvec_pow (cvec_t *s, smpl_t pow);
188
189 #ifdef __cplusplus
190 }
191 #endif
192
193 #endif /*_VECUTILS_H*/