DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SetPredicate.ih
1 
30 
31 #include <cstdlib>
33 
35 // IMPLEMENTATION of inline methods.
37 
39 // ----------------------- Standard services ------------------------------
40 
41 //------------------------------------------------------------------------------
42 template <typename TDigitalSet>
43 inline
45 ::SetPredicate( const DigitalSet & aSet )
46  : mySet( &aSet )
47 {
48 }
49 //------------------------------------------------------------------------------
50 template <typename TDigitalSet>
51 inline
53 ::SetPredicate( const SetPredicate & other )
54  : mySet( other.mySet )
55 {
56 }
57 //------------------------------------------------------------------------------
58 template <typename TDigitalSet>
59 inline
61 
63 {
64  if (this != &other)
65  {
66  mySet = other.mySet;
67  }
68  return *this;
69 }
70 //------------------------------------------------------------------------------
71 template <typename TDigitalSet>
72 inline
73 bool
75 ::operator()( const Point & p ) const
76 {
77  return mySet->find( p ) != mySet->end();
78 }
79 //------------------------------------------------------------------------------
80 
81 // //
83 
84