+class deployment_generator {
+public:
+ deployment_generator();
+
+ size_t size() const { return hosts.size(); }
+ void set_load(int host, double load);
+ void set_neighbor(int host, int neighbor);
+ void set_link(int host1, int host2);
+
+ virtual void generate() = 0;
+ void deploy();
+
+private:
+ struct host_parameters {
+ double load;
+ std::vector<int> neighbors;
+ };
+
+ std::vector<host_parameters> hosts;
+};
+
+#define DEPLOYMENT(name) \
+ class deployment_ ## name: public deployment_generator { \
+ public: void generate(); \
+ }
+
+DEPLOYMENT(line);
+DEPLOYMENT(ring);
+DEPLOYMENT(star);
+DEPLOYMENT(clique);
+DEPLOYMENT(btree);
+// DEPLOYMENT(torus);
+DEPLOYMENT(hcube);
+
+#undef DEPLOYMENT
+