Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

rtrsdetectlt.cpp

Go to the documentation of this file.
00001 // rtrsdetectlt.cpp
00002 //////////////////////////////////////////////////////////////////////
00003 //          (c) Copyright 2000-2002 Brown Deer Technology, LLC.
00004 //                        All rights reserved.
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 "rtrsdetectlt_.h"
00016 #include "drtrsdetectlt_.h"
00017 #include "irtrsdetectlt_.h"
00018 #include "artrsdetectlt_.h"
00019 #include "dartrsdetectlt_.h"
00020 #include "iartrsdetectlt_.h"
00021 #endif
00022 
00023 
00024 void rtrsdetectlt( 
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    rtrsdetectlt_( 
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       }
00046       else { 
00047          hit[m] = 0; 
00048       }
00049    }
00050 #endif
00051 }
00052 
00053 
00054 void rtrsdetectlt( 
00055           const int& Msize,
00056           const int& mmax,
00057           const int& mrastep,
00058           const double* mracoef,
00059           const double* mracoefrs,
00060           const double* thresh,
00061                 int* hit
00062 ) 
00063 { 
00064 #ifdef STORM_USEF
00065    drtrsdetectlt_( 
00066      &Msize, 
00067      &mmax, 
00068      &mrastep, mracoef, mracoefrs,
00069      thresh, hit
00070    );
00071 #else
00072    for( int m = 0; m <= mmax; m++ ) {   
00073       if ( abs( mracoef[ 2*m + 1 ] + mracoefrs[ 2*m + 1 ] ) < thresh[m] ) { 
00074          hit[m] = 1; 
00075       }
00076       else { 
00077          hit[m] = 0; 
00078       }
00079    }
00080 #endif
00081 } 
00082 
00083 
00084 void rtrsdetectlt( 
00085           const int& Msize,
00086           const int& mmax,
00087           const int& mrastep,
00088           const int* mracoef,
00089           const int* mracoefrs,
00090           const int* thresh,
00091                 int* hit
00092 ) 
00093 { 
00094 #ifdef STORM_USEF
00095    irtrsdetectlt_( 
00096      &Msize, 
00097      &mmax, 
00098      &mrastep, mracoef, mracoefrs,
00099      thresh, hit
00100    );
00101 #else
00102    for( int m = 0; m <= mmax; m++ ) {   
00103       if ( abs( mracoef[ 2*m + 1 ] + mracoefrs[ 2*m + 1 ] ) < thresh[m] ) { 
00104          hit[m] = 1; 
00105       }
00106       else { 
00107          hit[m] = 0; 
00108       }
00109    }
00110 #endif
00111 } 
00112 
00113 
00114 void rtrsdetectlt(
00115           const int& Asize,
00116           const int& Msize,
00117           const int& amax,
00118           const int& mmax,
00119           const int& mrastep,
00120           const float* mracoef,
00121           const float* mracoefrs,
00122           const float* thresh,
00123                 int* hit
00124 )
00125 {
00126 #ifdef STORM_USEF
00127    artrsdetectlt_(
00128      &Asize, &Msize,
00129      &amax, &mmax,
00130      &mrastep, mracoef, mracoefrs,
00131      thresh, hit
00132    );
00133 #else
00134    for(int m=0; m<=mmax; m++) {
00135       hit[m]=0;
00136       for( int a = 0; a <= amax; a++ ) {
00137          if ( abs( mracoef[ Msize*2*a + 2*m + 1 ]
00138            + mracoefrs[ Msize*2*a + 2*m + 1 ] ) < thresh[m]) { hit[m]++; }
00139       }
00140    }
00141 #endif
00142 }
00143 
00144 
00145 void rtrsdetectlt(
00146           const int& Asize,
00147           const int& Msize,
00148           const int& amax,
00149           const int& mmax,
00150           const int& mrastep,
00151           const double* mracoef,
00152           const double* mracoefrs,
00153           const double* thresh,
00154                 int* hit
00155 )
00156 {
00157 #ifdef STORM_USEF
00158    dartrsdetectlt_(
00159      &Asize, &Msize,
00160      &amax, &mmax,
00161      &mrastep, mracoef, mracoefrs,
00162      thresh, hit
00163    );
00164 #else
00165    for( int m = 0; m <= mmax; m++ ) {
00166       hit[m] = 0;
00167       for( int a = 0; a <= amax; a++ ) {
00168          if ( abs( mracoef[ Msize*2*a + 2*m + 1 ]
00169            + mracoefrs[ Msize*2*a + 2*m + 1 ] ) < thresh[m] ) { hit[m]++; }
00170       }
00171    }
00172 #endif
00173 }
00174 
00175  
00176 void rtrsdetectlt(
00177           const int& Asize,
00178           const int& Msize,
00179           const int& amax,
00180           const int& mmax,
00181           const int& mrastep,
00182           const int* mracoef,
00183           const int* mracoefrs,
00184           const int* thresh,
00185                 int* hit
00186 )
00187 {
00188 #ifdef STORM_USEF
00189    iartrsdetectlt_(
00190      &Asize, &Msize,
00191      &amax, &mmax,
00192      &mrastep, mracoef, mracoefrs,
00193      thresh, hit
00194    );
00195 #else
00196    for( int m = 0; m <= mmax; m++ ) {
00197       hit[m] = 0;
00198       for( int a = 0; a <= amax; a++ ) {
00199          if ( abs( mracoef[ Msize*2*a + 2*m + 1 ]
00200            + mracoefrs[ Msize*2*a + 2*m + 1 ] ) < thresh[m] ) { hit[m]++; }
00201       }
00202    }
00203 #endif
00204 }
00205 
00206  

Generated on Mon May 31 21:38:52 2004 for SR2k4 Assembler by doxygen 1.3.6