00001 #ifndef __DOMAINDECOMPOSER_HPP__
00002 #define __DOMAINDECOMPOSER_HPP__
00003
00004 #include <vector>
00005
00006 namespace DAPTA {
00007
00009
00011 template <typename V>
00012 class DomainDecomposer {
00013 public:
00014 typedef V* VertexHandle;
00015
00016 DomainDecomposer(std::vector<VertexHandle> _vertices) : vertices(_vertices) {;}
00017 DomainDecomposer() {;}
00018 ~DomainDecomposer() { std::for_each(vertices.begin(), vertices.end(), zap<VertexHandle>); }
00019
00020 void loadVertices(std::vector<VertexHandle> _vertices) { vertices = _vertices; }
00021
00022 virtual std::vector<int> decompose(unsigned numberOfPartitions, unsigned myNumber) = 0;
00023 protected:
00024 std::vector<VertexHandle> vertices;
00025 private:
00026 };
00027
00028 }
00029
00030 #include "DomainDecomposer.cpp"
00031
00032 #endif