spLib
Loading...
Searching...
No Matches
voperate.h
Go to the documentation of this file.
1
4#ifndef SPLIB_VOPERATE_H
5#define SPLIB_VOPERATE_H
6
7#include <stdarg.h>
8
9#include <sp/vector.h>
10#include <sp/vmath.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#if defined(MACOS)
17#pragma import on
18#endif
19
27 /*----@addtogroup voperateGroup----*/
28
32extern void svplus(spSVector x, spSVector y);
33extern void svminus(spSVector x, spSVector y, spBool reverse);
34extern void svtimes(spSVector x, spSVector y);
35extern void svdivide(spSVector x, spSVector y, spBool reverse);
36extern void svpower(spSVector x, spSVector y, spBool reverse);
39extern void svoper(spSVector a, const char *op, spSVector b);
42extern spSVector xsvoper(spSVector a, const char *op, spSVector b);
43
44extern void svscplus(spSVector x, double t);
45extern void svscminus(spSVector x, double t, spBool reverse);
46extern void svsctimes(spSVector x, double t);
47extern void svscdivide(spSVector x, double t, spBool reverse);
48extern void svscpower(spSVector x, double t, spBool reverse);
51extern void svscoper(spSVector a, const char *op, double t);
54extern spSVector xsvscoper(spSVector a, const char *op, double t);
55
56extern void svcplxplus(spSVector x, double tr, double ti);
57extern void svcplxminus(spSVector x, double tr, double ti, spBool reverse);
58extern void svcplxtimes(spSVector x, double tr, double ti);
59extern void svcplxdivide(spSVector x, double tr, double ti, spBool reverse);
60extern void svcplxpower(spSVector x, double tr, double ti, spBool reverse);
63extern void svcplxoper(spSVector a, const char *op, double tr, double ti);
66extern spSVector xsvcplxoper(spSVector a, const char *op, double tr, double ti);
67
68extern void lvplus(spLVector x, spLVector y);
69extern void lvminus(spLVector x, spLVector y, spBool reverse);
70extern void lvtimes(spLVector x, spLVector y);
71extern void lvdivide(spLVector x, spLVector y, spBool reverse);
72extern void lvpower(spLVector x, spLVector y, spBool reverse);
75extern void lvoper(spLVector a, const char *op, spLVector b);
78extern spLVector xlvoper(spLVector a, const char *op, spLVector b);
79
80extern void lvscplus(spLVector x, double t);
81extern void lvscminus(spLVector x, double t, spBool reverse);
82extern void lvsctimes(spLVector x, double t);
83extern void lvscdivide(spLVector x, double t, spBool reverse);
84extern void lvscpower(spLVector x, double t, spBool reverse);
87extern void lvscoper(spLVector a, const char *op, double t);
90extern spLVector xlvscoper(spLVector a, const char *op, double t);
91
92extern void lvcplxplus(spLVector x, double tr, double ti);
93extern void lvcplxminus(spLVector x, double tr, double ti, spBool reverse);
94extern void lvcplxtimes(spLVector x, double tr, double ti);
95extern void lvcplxdivide(spLVector x, double tr, double ti, spBool reverse);
96extern void lvcplxpower(spLVector x, double tr, double ti, spBool reverse);
99extern void lvcplxoper(spLVector a, const char *op, double tr, double ti);
102extern spLVector xlvcplxoper(spLVector a, const char *op, double tr, double ti);
103
104extern void fvplus(spFVector x, spFVector y);
105extern void fvminus(spFVector x, spFVector y, spBool reverse);
106extern void fvtimes(spFVector x, spFVector y);
107extern void fvdivide(spFVector x, spFVector y, spBool reverse);
108extern void fvpower(spFVector x, spFVector y, spBool reverse);
111extern void fvoper(spFVector a, const char *op, spFVector b);
114extern spFVector xfvoper(spFVector a, const char *op, spFVector b);
115
116extern void fvscplus(spFVector x, float t);
117extern void fvscminus(spFVector x, float t, spBool reverse);
118extern void fvsctimes(spFVector x, float t);
119extern void fvscdivide(spFVector x, float t, spBool reverse);
120extern void fvscpower(spFVector x, float t, spBool reverse);
123extern void fvscoper(spFVector a, const char *op, float t);
126extern spFVector xfvscoper(spFVector a, const char *op, float t);
127
128extern void fvcplxplus(spFVector x, float tr, float ti);
129extern void fvcplxminus(spFVector x, float tr, float ti, spBool reverse);
130extern void fvcplxtimes(spFVector x, float tr, float ti);
131extern void fvcplxdivide(spFVector x, float tr, float ti, spBool reverse);
132extern void fvcplxpower(spFVector x, float tr, float ti, spBool reverse);
135extern void fvcplxoper(spFVector a, const char *op, float tr, float ti);
138extern spFVector xfvcplxoper(spFVector a, const char *op, float tr, float ti);
139
140extern void dvplus(spDVector x, spDVector y);
141extern void dvminus(spDVector x, spDVector y, spBool reverse);
142extern void dvtimes(spDVector x, spDVector y);
143extern void dvdivide(spDVector x, spDVector y, spBool reverse);
144extern void dvpower(spDVector x, spDVector y, spBool reverse);
153extern void dvoper(spDVector a, const char *op, spDVector b);
164extern spDVector xdvoper(spDVector a, const char *op, spDVector b);
165
166extern void dvscplus(spDVector x, double t);
167extern void dvscminus(spDVector x, double t, spBool reverse);
168extern void dvsctimes(spDVector x, double t);
169extern void dvscdivide(spDVector x, double t, spBool reverse);
170extern void dvscpower(spDVector x, double t, spBool reverse);
179extern void dvscoper(spDVector a, const char *op, double t);
190extern spDVector xdvscoper(spDVector a, const char *op, double t);
191
192extern void dvcplxplus(spDVector x, double tr, double ti);
193extern void dvcplxminus(spDVector x, double tr, double ti, spBool reverse);
194extern void dvcplxtimes(spDVector x, double tr, double ti);
195extern void dvcplxdivide(spDVector x, double tr, double ti, spBool reverse);
196extern void dvcplxpower(spDVector x, double tr, double ti, spBool reverse);
207extern void dvcplxoper(spDVector a, const char *op, double tr, double ti);
219extern spDVector xdvcplxoper(spDVector a, const char *op, double tr, double ti);
220
223extern void svlinplus(spSVector x, short m, short incr);
224extern void svlinminus(spSVector x, short m, short incr, spBool reverse);
225extern void svlintimes(spSVector x, short m, short incr);
226extern void svlindivide(spSVector x, short m, short incr, spBool reverse);
227extern void svlinpower(spSVector x, short m, short incr, spBool reverse);
228extern void svlinoper(spSVector a, const char *op, short m, short incr);
229extern spSVector xsvlinoper(spSVector a, const char *op, short m, short incr);
230
231extern void lvlinplus(spLVector x, long m, long incr);
232extern void lvlinminus(spLVector x, long m, long incr, spBool reverse);
233extern void lvlintimes(spLVector x, long m, long incr);
234extern void lvlindivide(spLVector x, long m, long incr, spBool reverse);
235extern void lvlinpower(spLVector x, long m, long incr, spBool reverse);
236extern void lvlinoper(spLVector a, const char *op, long m, long incr);
237extern spLVector xlvlinoper(spLVector a, const char *op, long m, long incr);
238
239extern void fvlinplus(spFVector x, float m, float incr);
240extern void fvlinminus(spFVector x, float m, float incr, spBool reverse);
241extern void fvlintimes(spFVector x, float m, float incr);
242extern void fvlindivide(spFVector x, float m, float incr, spBool reverse);
243extern void fvlinpower(spFVector x, float m, float incr, spBool reverse);
244extern void fvlinoper(spFVector a, const char *op, float m, float incr);
245extern spFVector xfvlinoper(spFVector a, const char *op, float m, float incr);
246
247extern void dvlinplus(spDVector x, double m, double incr);
248extern void dvlinminus(spDVector x, double m, double incr, spBool reverse);
249extern void dvlintimes(spDVector x, double m, double incr);
250extern void dvlindivide(spDVector x, double m, double incr, spBool reverse);
251extern void dvlinpower(spDVector x, double m, double incr, spBool reverse);
252extern void dvlinoper(spDVector a, const char *op, double m, double incr);
253extern spDVector xdvlinoper(spDVector a, const char *op, double m, double incr);
254
255extern void svlogiand(spSVector x, spSVector y);
256extern void svlogior(spSVector x, spSVector y);
257extern void svlogixor(spSVector x, spSVector y);
258extern spSVector xsvlogiand(spSVector x, spSVector y);
259extern spSVector xsvlogior(spSVector x, spSVector y);
260extern spSVector xsvlogixor(spSVector x, spSVector y);
261extern void lvlogiand(spLVector x, spLVector y);
262extern void lvlogior(spLVector x, spLVector y);
263extern void lvlogixor(spLVector x, spLVector y);
264extern spLVector xlvlogiand(spLVector x, spLVector y);
265extern spLVector xlvlogior(spLVector x, spLVector y);
266extern spLVector xlvlogixor(spLVector x, spLVector y);
267extern void fvlogiand(spFVector x, spFVector y);
268extern void fvlogior(spFVector x, spFVector y);
269extern void fvlogixor(spFVector x, spFVector y);
270extern spFVector xfvlogiand(spFVector x, spFVector y);
271extern spFVector xfvlogior(spFVector x, spFVector y);
272extern spFVector xfvlogixor(spFVector x, spFVector y);
273extern void dvlogiand(spDVector x, spDVector y);
274extern void dvlogior(spDVector x, spDVector y);
275extern void dvlogixor(spDVector x, spDVector y);
276extern spDVector xdvlogiand(spDVector x, spDVector y);
277extern spDVector xdvlogior(spDVector x, spDVector y);
278extern spDVector xdvlogixor(spDVector x, spDVector y);
279
280extern void svmorph(spSVector x, spSVector y, double rate);
281extern void lvmorph(spLVector x, spLVector y, double rate);
282extern void fvmorph(spFVector x, spFVector y, float rate);
283extern void dvmorph(spDVector x, spDVector y, double rate);
284extern spSVector xsvmorph(spSVector x, spSVector y, double rate);
285extern spLVector xlvmorph(spLVector x, spLVector y, double rate);
286extern spFVector xfvmorph(spFVector x, spFVector y, float rate);
287extern spDVector xdvmorph(spDVector x, spDVector y, double rate);
288
308
329
345
351extern void svscevalle(spSVector x, short t);
352extern void svscevallt(spSVector x, short t);
353extern void svscevalge(spSVector x, short t);
354extern void svscevalgt(spSVector x, short t);
355extern void svscevaleq(spSVector x, short t);
356extern void svscevalne(spSVector x, short t);
359extern void svsceval(spSVector x, const char *op, short t);
362extern spSVector xsvsceval(spSVector x, const char *op, short t);
363
364extern void lvscevalle(spLVector x, long t);
365extern void lvscevallt(spLVector x, long t);
366extern void lvscevalge(spLVector x, long t);
367extern void lvscevalgt(spLVector x, long t);
368extern void lvscevaleq(spLVector x, long t);
369extern void lvscevalne(spLVector x, long t);
372extern void lvsceval(spLVector x, const char *op, long t);
375extern spLVector xlvsceval(spLVector x, const char *op, long t);
376
377extern void fvscevalle(spFVector x, float t);
378extern void fvscevallt(spFVector x, float t);
379extern void fvscevalge(spFVector x, float t);
380extern void fvscevalgt(spFVector x, float t);
381extern void fvscevaleq(spFVector x, float t);
382extern void fvscevalne(spFVector x, float t);
385extern void fvsceval(spFVector x, const char *op, float t);
388extern spFVector xfvsceval(spFVector x, const char *op, float t);
389
390extern void dvscevalle(spDVector x, double t);
391extern void dvscevallt(spDVector x, double t);
392extern void dvscevalge(spDVector x, double t);
393extern void dvscevalgt(spDVector x, double t);
394extern void dvscevaleq(spDVector x, double t);
395extern void dvscevalne(spDVector x, double t);
404extern void dvsceval(spDVector x, const char *op, double t);
415extern spDVector xdvsceval(spDVector x, const char *op, double t);
416
417extern void svidxtoeval(spSVector x, spLVector idx);
418extern spSVector xsvidxtoeval(spLVector idx, long length);
419extern void lvidxtoeval(spLVector x, spLVector idx);
420extern spLVector xlvidxtoeval(spLVector idx, long length);
421extern void fvidxtoeval(spFVector x, spLVector idx);
422extern spFVector xfvidxtoeval(spLVector idx, long length);
423extern void dvidxtoeval(spDVector x, spLVector idx);
424extern spDVector xdvidxtoeval(spLVector idx, long length);
425
428extern spLVector xsvscfind(spSVector x, const char *op, short t);
431extern spLVector xlvscfind(spLVector x, const char *op, long t);
434extern spLVector xfvscfind(spFVector x, const char *op, float t);
445extern spLVector xdvscfind(spDVector x, const char *op, double t);
446
449extern spSVector xsvscfindv(spSVector x, const char *op, short t);
452extern spLVector xlvscfindv(spLVector x, const char *op, long t);
455extern spFVector xfvscfindv(spFVector x, const char *op, float t);
466extern spDVector xdvscfindv(spDVector x, const char *op, double t);
467
470 /*----@addtogroup voperateGroup----*/
471
472/* output vector length: edges->length+1 (outside_flag == SP_TRUE),
473 * edges->length (outside_flag == SP_FALSE) */
475extern spLVector xfvhistc(spFVector x, spFVector edges, spBool outside_flag);
476extern spLVector xdvhistc(spDVector x, spDVector edges, spBool outside_flag);
477extern spLVector xfvhist(spFVector x, spFVector centers, spFVector *xoedges /* can be NULL, must be freed */);
478extern spLVector xdvhist(spDVector x, spDVector centers, spDVector *xoedges /* can be NULL, must be freed */);
479
480/*
481 * based on Shunting-yard algorithm
482 * %d: int (short)
483 * %ld: long
484 * %f: double (float)
485 * %v: Vector
486 */
487extern spBool dvevalf(spDVector x, const char *format, ...);
488
489#if defined(MACOS)
490#pragma import off
491#endif
492
493#ifdef __cplusplus
494} /* Close scope of 'extern "C"' declaration */
495#endif
496
497#endif /* SPLIB_VOPERATE_H */
int spBool
spDVector xdvoper(spDVector a, const char *op, spDVector b)
spSVector xsvoper(spSVector a, const char *op, spSVector b)
spDVector xdvremap(spDVector x, spLVector map)
spLVector xfvscfind(spFVector x, const char *op, float t)
spDVector xdvfindv(spDVector x)
void svcplxoper(spSVector a, const char *op, double tr, double ti)
spSVector xsvsceval(spSVector x, const char *op, short t)
spFVector xfvfindv(spFVector x)
spLVector xsvfind(spSVector x)
spFVector xfvscfindv(spFVector x, const char *op, float t)
spSVector xsvcplxoper(spSVector a, const char *op, double tr, double ti)
spDVector xdvscoper(spDVector a, const char *op, double t)
void lvoper(spLVector a, const char *op, spLVector b)
spFVector xfvsceval(spFVector x, const char *op, float t)
spLVector xlvcplxoper(spLVector a, const char *op, double tr, double ti)
spLVector xlvfind(spLVector x)
spLVector xlvremap(spLVector x, spLVector map)
void svsceval(spSVector x, const char *op, short t)
spFVector xfvremap(spFVector x, spLVector map)
void dvscoper(spDVector a, const char *op, double t)
spSVector xsvfindv(spSVector x)
void svoper(spSVector a, const char *op, spSVector b)
spFVector xfvcplxoper(spFVector a, const char *op, float tr, float ti)
spLVector xdvscfind(spDVector x, const char *op, double t)
void fvscoper(spFVector a, const char *op, float t)
spLVector xlvoper(spLVector a, const char *op, spLVector b)
void lvsceval(spLVector x, const char *op, long t)
spSVector xsvremap(spSVector x, spLVector map)
void fvoper(spFVector a, const char *op, spFVector b)
spLVector xdvfind(spDVector x)
spLVector xsvscfind(spSVector x, const char *op, short t)
void fvcplxoper(spFVector a, const char *op, float tr, float ti)
spLVector xlvscoper(spLVector a, const char *op, double t)
spDVector xdvscfindv(spDVector x, const char *op, double t)
spFVector xfvscoper(spFVector a, const char *op, float t)
spSVector xsvscfindv(spSVector x, const char *op, short t)
spLVector xlvsceval(spLVector x, const char *op, long t)
spSVector xsvscoper(spSVector a, const char *op, double t)
void dvoper(spDVector a, const char *op, spDVector b)
spFVector xfvoper(spFVector a, const char *op, spFVector b)
void fvsceval(spFVector x, const char *op, float t)
void dvcplxoper(spDVector a, const char *op, double tr, double ti)
spLVector xfvfind(spFVector x)
spDVector xdvsceval(spDVector x, const char *op, double t)
spLVector xlvfindv(spLVector x)
spLVector xlvscfindv(spLVector x, const char *op, long t)
void dvsceval(spDVector x, const char *op, double t)
void lvcplxoper(spLVector a, const char *op, double tr, double ti)
spLVector xlvscfind(spLVector x, const char *op, long t)
void svscoper(spSVector a, const char *op, double t)
spDVector xdvcplxoper(spDVector a, const char *op, double tr, double ti)
void lvscoper(spLVector a, const char *op, double t)
Vector type that contains the elements of double type.
Definition vector.h:248
Vector type that contains the elements of float type.
Definition vector.h:214
Vector type that contains the elements of long type.
Definition vector.h:180
Vector type that contains the elements of short type.
Definition vector.h:146