qhullwrapper.h

00001 #ifndef QHULLWRAPPER_H_PROTECTOR
00002 #define QHULLWRAPPER_H_PROTECTOR
00003 
00004 #include <iostream>
00005 #include <vector>
00006 //#include <conio.h>
00007 
00008 extern "C"
00009 {
00010 
00011 #include <stdio.h>
00012 #include <stdlib.h>
00013 #include "qhull/qhull.h"
00014 #include "qhull/mem.h"
00015 #include "qhull/qset.h"
00016 #include "qhull/geom.h"
00017 #include "qhull/merge.h"
00018 #include "qhull/poly.h"
00019 #include "qhull/io.h"
00020 #include "qhull/stat.h"
00021 
00022 }
00023 
00024 #include "element.h"
00025 #include "afltypes.h"
00026 #include "util/aflutil.h"
00027 #include "ddf/ddf.h"
00028 
00029 #include <set>
00030 #include <vector>
00031 
00032 namespace afl 
00033 {
00037     template <size_t D>
00038     class Locator
00039     {
00040         public:
00048             Locator( size_t n, const ddf::Node* min, const ddf::Node* max ) { throw exc::Exception("Locator is only implemented from 2D to 4D? This is likely a bug in AFL"); }
00049 
00055             size_t locate( const ddf::Node& x ) const { throw exc::Exception("Locator is only implemented from 2D to 4D? This is likely a bug in AFL"); }
00056 
00062             size_t locate( const Point& x ) const { throw exc::Exception("Locator is only implemented from 2D to 4D? This is likely a bug in AFL"); }
00063 
00070             std::vector<size_t> surround( size_t x, int l ) const;
00071 
00075             size_t getSide() { return _n; }
00076 
00077         private:
00078             size_t _n;
00079             const ddf::Node* _min;
00080             const ddf::Node* _max;
00081     };
00082 
00090     template <size_t D>
00091     void triangulate( const ddf::Property* xs, std::vector<Element<D> >& elems,
00092             std::vector<std::set<size_t> >& cells );
00093 
00107     template<size_t D>
00108     Element<D> findElement( const ddf::Property* xs, const Point& p );
00109 
00110 }
00111 
00112 #include "qhullwrapper.tcc"
00113 
00114 #endif

Generated on Fri Dec 22 07:17:50 2006 for afl by  doxygen 1.4.6