Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkOffsetLexicographicCompare.h

Go to the documentation of this file.
00001 #ifndef __itkOffsetLexicographicCompare_h
00002 #define __itkOffsetLexicographicCompare_h
00003 
00004 namespace itk {
00005 
00006 namespace Functor
00007 {
00015 template<unsigned int VOffsetDimension>
00016 class OffsetLexicographicCompare
00017 {
00018 public:
00019   bool operator()(Offset<VOffsetDimension> const& l,
00020                   Offset<VOffsetDimension> const& r) const
00021     {
00022     for(unsigned int i=0; i < VOffsetDimension; ++i)
00023       {
00024       if(l.m_Offset[i] < r.m_Offset[i])
00025         {
00026         return true;
00027         }
00028       else if(l.m_Offset[i] > r.m_Offset[i])
00029         {
00030         return false;
00031         }
00032       }
00033     return false;
00034     }
00035 };
00036 }
00037 
00038 }
00039 
00040 #endif
00041 

Generated at Fri Sep 8 03:51:11 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000