home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
352_01
/
vecrvrs.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-24
|
543b
|
31 lines
/* VECTOR_reverse ()
* reverse the time direction of a complex VECTOR
* used by cross correlation routine
*/
#include <stdlib.h>
#include "wtwg.h"
#include "dblib.h"
#include "Vector.h"
Vector& Vector::reverse ( void )
{
int vn = n; float *vv = v;
float hold;
float *vvend = vv+ vn;
while ( --vn >= 0 )
{
/* switch real part */
hold = *vv;
*(vv++) = *vvend;
*vvend = hold;
--vvend;
}
return (*this); /* Vector::reverse() */
}
// ----------------- end VECRVRS.CPP --------------