Public Member Functions | Public Attributes | List of all members
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 228 of file CornerFinderAlg.cxx.

Constructor & Destructor Documentation

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

Definition at line 230 of file CornerFinderAlg.cxx.

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

Member Function Documentation

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

Definition at line 231 of file CornerFinderAlg.cxx.

231  {
232 
233  int mid = (b-a)/2 + a;
234  if(i>=a && i<=b && j>=a && j<=b)
235  return std::abs(mid-i)<std::abs(mid-j);
236 
237  else if(j>=a && j<=b && (i<a || i>b) )
238  return false;
239 
240  else if(i>=a && i<=b && (j<a || j>b) )
241  return true;
242 
243  else
244  return true;
245  }
T abs(T value)

Member Data Documentation

int compare_to_range::a

Definition at line 247 of file CornerFinderAlg.cxx.

int compare_to_range::b

Definition at line 248 of file CornerFinderAlg.cxx.


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