00001
00002
00003 #ifndef _graph_generator_include_
00004 #define _graph_generator_include_
00005
00006
00007
00008
00009
00010
00011 #include <vector>
00012
00013 #include "angel_types.hpp"
00014
00015 namespace angel {
00016
00029 void random_statement (int inputs, int expr, const std::vector<double>& p,
00030 c_graph_t& statement);
00031
00041 void random_statement_vector (int max_expr, double unary,
00042 std::vector<c_graph_t>& statement_vector);
00043
00050 void stats2block (int inputs, int outputs, const std::vector<c_graph_t>& stats,
00051 c_graph_t& block);
00052
00061 void random_block (int inputs, int outputs, int stats, int max_exp, double unary,
00062 c_graph_t& block);
00063
00069 void block2loop (const c_graph_t& block, int loops,
00070 c_graph_t& loop);
00071
00072
00073
00074 struct random_init_t {
00075 int dummy;
00076 random_init_t () : dummy (7) {
00077 #ifndef SAME_RANDOM_VALUES
00078 srand (time (0));
00079 #endif
00080 }
00081 };
00082
00083 extern random_init_t random_init_object;
00084
00085 }
00086
00087 #endif // _graph_generator_include_
00088