oln::utils::internal::cmp_pt_value_inv< I > Struct Template Reference

Functor to sort compare 2 points using an image. More...

#include <qsort.hh>

Collaboration diagram for oln::utils::internal::cmp_pt_value_inv< I >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef oln::abstract::non_vectorial_image<
I > 
im_type
 Type of the image.
typedef mlc::exact< I >::ret::point_type point_type
 Type of the considered points.

Public Member Functions

 cmp_pt_value_inv (const im_type &im)
 Constructor.
bool operator() (const point_type &i, const point_type &j)
 Main method.

Protected Attributes

const im_typeim_
 Image to use for comparison.

Detailed Description

template<typename I>
struct oln::utils::internal::cmp_pt_value_inv< I >

Functor to sort compare 2 points using an image.

Parameters:
I Exact type of the image.

Definition at line 91 of file qsort.hh.


Constructor & Destructor Documentation

template<typename I>
oln::utils::internal::cmp_pt_value_inv< I >::cmp_pt_value_inv ( const im_type im  )  [inline]

Constructor.

Definition at line 101 of file qsort.hh.

00101                                            : im_(im)
00102         {
00103         }


Member Function Documentation

template<typename I>
bool oln::utils::internal::cmp_pt_value_inv< I >::operator() ( const point_type i,
const point_type j 
) [inline]

Main method.

Definition at line 115 of file qsort.hh.

References oln::utils::internal::cmp_pt_value_inv< I >::im_.

00116         {
00117           if (im_[i] == im_[j])
00118             for (unsigned t(0); t < point_type::dim; ++t)
00119               if (i.nth(t) != j.nth(t))
00120                 return i.nth(t) < j.nth(t);
00121           return im_[i] > im_[j];
00122         }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:30:09 2007 for Olena by  doxygen 1.5.1