cgma
GridSearchTreeNode.hpp
Go to the documentation of this file.
00001 #ifndef GSTREENODE_HPP
00002 #define GSTREENODE_HPP
00003 
00004 #include "DLIList.hpp"
00005 #include "CubitPoint.hpp"
00006 
00007 class GridSearchTreeNode {
00008 private:
00009   DLIList <CubitPoint *> plist;
00010 
00011 public:
00012   long icoord;
00013   long jcoord;
00014   long kcoord;
00015 
00016   GridSearchTreeNode (long i, long j, long k) {
00017     icoord=i;
00018     jcoord=j;
00019     kcoord=k;
00020   }
00021   ~GridSearchTreeNode() {}
00022 
00023   DLIList <CubitPoint *> get_list(){
00024     return plist;
00025   }
00026 
00027   void add(CubitPoint * data) {
00028     plist.append(data);
00029   }
00030 
00031 
00032 class GSTNodeComparator {
00033 public: 
00034   bool operator () (GridSearchTreeNode * a, GridSearchTreeNode * b) const
00035   {
00036     return ( a->icoord < b->icoord ) || (a->icoord==b->icoord && a->jcoord<b->jcoord) || (a->icoord == b->icoord && a->jcoord==b->jcoord && a->kcoord < b->kcoord );
00037   }
00038 };  
00039 
00040 };
00041 
00042 
00043 #endif
00044 
00045 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines