00001
00002
00003
00004
00005
00006
00007 #ifdef USE_STD
00008 #include <cmath>
00009 using namespace std;
00010 #else
00011 #include <math.h>
00012 #endif
00013
00014 #ifdef STORM_USEF
00015 #include "rtrsdetectgt_.h"
00016 #include "drtrsdetectgt_.h"
00017 #include "irtrsdetectgt_.h"
00018 #include "artrsdetectgt_.h"
00019 #include "dartrsdetectgt_.h"
00020 #include "iartrsdetectgt_.h"
00021 #endif
00022
00023
00024 void rtrsdetectgt(
00025 const int& Msize,
00026 const int& mmax,
00027 const int& mrastep,
00028 const float* mracoef,
00029 const float* mracoefrs,
00030 const float* thresh,
00031 int* hit
00032 )
00033 {
00034 #ifdef STORM_USEF
00035 rtrsdetectgt_(
00036 &Msize,
00037 &mmax,
00038 &mrastep, mracoef, mracoefrs,
00039 thresh, hit
00040 );
00041 #else
00042 for( int m = 0; m <= mmax; m++ ) {
00043 if ( abs( mracoef[ 2*m + 1 ]+mracoefrs[ 2*m + 1 ] ) > thresh[m] ) {
00044 hit[m] = 1; }
00045 else {
00046 hit[m] = 0;
00047 }
00048 }
00049 #endif
00050 }
00051
00052
00053 void rtrsdetectgt(
00054 const int& Msize,
00055 const int& mmax,
00056 const int& mrastep,
00057 const double* mracoef,
00058 const double* mracoefrs,
00059 const double* thresh,
00060 int* hit
00061 )
00062 {
00063 #ifdef STORM_USEF
00064 drtrsdetectgt_(
00065 &Msize,
00066 &mmax,
00067 &mrastep, mracoef, mracoefrs,
00068 thresh, hit
00069 );
00070 #else
00071 for( int m = 0; m <= mmax; m++ ) {
00072 if ( abs( mracoef[ 2*m + 1 ] + mracoefrs[ 2*m + 1 ]) > thresh[m] ) {
00073 hit[m] = 1;
00074 }
00075 else {
00076 hit[m] = 0;
00077 }
00078 }
00079 #endif
00080 }
00081
00082
00083 void rtrsdetectgt(
00084 const int& Msize,
00085 const int& mmax,
00086 const int& mrastep,
00087 const int* mracoef,
00088 const int* mracoefrs,
00089 const int* thresh,
00090 int* hit
00091 )
00092 {
00093 #ifdef STORM_USEF
00094 irtrsdetectgt_(
00095 &Msize,
00096 &mmax,
00097 &mrastep, mracoef, mracoefrs,
00098 thresh, hit
00099 );
00100 #else
00101 for( int m = 0; m <= mmax; m++ ) {
00102 if ( abs( mracoef[ 2*m + 1 ] + mracoefrs[ 2*m + 1 ]) > thresh[m] ) {
00103 hit[m] = 1;
00104 }
00105 else {
00106 hit[m] = 0;
00107 }
00108 }
00109 #endif
00110 }
00111
00112
00113 void rtrsdetectgt(
00114 const int& Asize,
00115 const int& Msize,
00116 const int& amax,
00117 const int& mmax,
00118 const int& mrastep,
00119 const float* mracoef,
00120 const float* mracoefrs,
00121 const float* thresh,
00122 int* hit
00123 )
00124 {
00125 #ifdef STORM_USEF
00126 artrsdetectgt_(
00127 &Asize, &Msize,
00128 &amax, &mmax,
00129 &mrastep, mracoef, mracoefrs,
00130 thresh, hit
00131 );
00132 #else
00133 for( int m = 0; m <= mmax; m++ ) {
00134 hit[m] = 0;
00135 for( int a = 0; a <= amax; a++ ) {
00136 if ( abs( mracoef[ Msize*2*a + 2*m +1 ]
00137 + mracoefrs[ Msize*2*a + 2*m + 1 ] ) > thresh[m] ) { hit[m]++; }
00138 }
00139 }
00140 #endif
00141 }
00142
00143
00144 void rtrsdetectgt(
00145 const int& Asize,
00146 const int& Msize,
00147 const int& amax,
00148 const int& mmax,
00149 const int& mrastep,
00150 const double* mracoef,
00151 const double* mracoefrs,
00152 const double* thresh,
00153 int* hit
00154 )
00155 {
00156 #ifdef STORM_USEF
00157 dartrsdetectgt_(
00158 &Asize, &Msize,
00159 &amax, &mmax,
00160 &mrastep, mracoef, mracoefrs,
00161 thresh, hit
00162 );
00163 #else
00164 for( int m = 0; m <= mmax; m++ ) {
00165 hit[m] = 0;
00166 for( int a = 0; a <= amax; a++ ) {
00167 if ( abs( mracoef[ Msize*2*a + 2*m + 1 ]
00168 + mracoefrs[ Msize*2*a + 2*m + 1 ] ) > thresh[m] ) { hit[m]++; }
00169 }
00170 }
00171 #endif
00172 }
00173
00174
00175 void rtrsdetectgt(
00176 const int& Asize,
00177 const int& Msize,
00178 const int& amax,
00179 const int& mmax,
00180 const int& mrastep,
00181 const int* mracoef,
00182 const int* mracoefrs,
00183 const int* thresh,
00184 int* hit
00185 )
00186 {
00187 #ifdef STORM_USEF
00188 iartrsdetectgt_(
00189 &Asize, &Msize,
00190 &amax, &mmax,
00191 &mrastep, mracoef, mracoefrs,
00192 thresh, hit
00193 );
00194 #else
00195 for( int m = 0; m <= mmax; m++ ) {
00196 hit[m] = 0;
00197 for( int a = 0; a <= amax; a++ ) {
00198 if ( abs( mracoef[ Msize*2*a + 2*m + 1 ]
00199 + mracoefrs[ Msize*2*a + 2*m + 1 ] ) > thresh[m] ) { hit[m]++; }
00200 }
00201 }
00202 #endif
00203 }
00204
00205