LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
compare_to_range Struct Reference

Public Member Functions

 compare_to_range (int a, int b)
 
bool operator() (int i, int j)
 

Public Attributes

int a
 
int b
 

Detailed Description

Definition at line 304 of file CornerFinderAlg.cxx.

Constructor & Destructor Documentation

compare_to_range::compare_to_range ( int  a,
int  b 
)
inline

Definition at line 306 of file CornerFinderAlg.cxx.

306 {this->a = a; this->b = b;}

Member Function Documentation

bool compare_to_range::operator() ( int  i,
int  j 
)
inline

Definition at line 307 of file CornerFinderAlg.cxx.

307  {
308 
309  int mid = (b-a)/2 + a;
310  if(i>=a && i<=b && j>=a && j<=b)
311  return std::abs(mid-i)<std::abs(mid-j);
312 
313  else if(j>=a && j<=b && (i<a || i>b) )
314  return false;
315 
316  else if(i>=a && i<=b && (j<a || j>b) )
317  return true;
318 
319  else
320  return true;
321  }

Member Data Documentation

int compare_to_range::a

Definition at line 323 of file CornerFinderAlg.cxx.

int compare_to_range::b

Definition at line 324 of file CornerFinderAlg.cxx.


The documentation for this struct was generated from the following file: