5#ifndef CPPPROJCT_GRAPH_TEST_INIT_H
6#define CPPPROJCT_GRAPH_TEST_INIT_H
12#include "test-imports.h"
18void graph_tests_init(
int TOPOLOGY,
unsigned int SEED,
unsigned long N = 4);
21template <
int T,
typename GRAPHTYPE>
22void test_graph_init(GRAPHTYPE &G, std::string name){
25 adsync_message<T>(msg_prev +
"'test_" + name +
"_graph_init'", G.g);
28 adsync_message<T>(msg_prev +
"'build_" + name +
"'", G.g);
30 adsync_message_barrier<T>(msg_post +
"build_" + name, G.g);
33 adsync_message_barrier<T>(msg_prev +
"'reportNodes'", G.g);
35 adsync_message_barrier<T>(msg_post +
"'reportNodes'", G.g);
38 adsync_message_barrier<T>(msg_prev +
"'showVertex'", G.g);
40 adsync_message_barrier<T>(msg_post +
"'showVertex'", G.g);
43 adsync_message_barrier<T>(msg_prev +
"'showEdges'", G.g);
45 adsync_message_barrier<T>(msg_post +
"'showEdges'", G.g);
48 adsync_message_barrier<T>(msg_prev +
"'Initialization' (constant values)'", G.g);
49 G.Initialization({{12.345, 6.78}}, 3.14, G.g, G.N);
50 adsync_message_barrier<T>(msg_post +
"'Initialization' (constant values)'", G.g);
53 adsync_message_barrier<T>(msg_prev +
"'showVertex' (post eq constant values)", G.g);
55 adsync_message_barrier<T>(msg_post +
"'showVertex' (post eq constant values)", G.g);
58 adsync_message_barrier<T>(msg_prev +
"'showEdges' (post eq constant values)", G.g);
60 adsync_message_barrier<T>(msg_post +
"'showEdges' (post eq constant values)", G.g);
64 std::vector<std::pair<double, double>> X0_W;
65 for (
int i=0; i<G.N; i++){
67 std::abs(std::sin(3.14 * ((
double) i) / 13)),
68 1/((double) G.N) * (double) i
71 adsync_message_barrier<T>(msg_prev +
"'Initialization' (varied values)'", G.g);
72 G.Initialization(X0_W, 5.67, G.g, G.N);
73 adsync_message_barrier<T>(msg_post +
"'Initialization' (varied values)'", G.g);
76 adsync_message_barrier<T>(msg_prev +
"'showVertex' (post eq varied values)", G.g);
78 adsync_message_barrier<T>(msg_post +
"'showVertex' (post eq varied values)", G.g);
81 adsync_message_barrier<T>(msg_prev +
"'showVertex' (post eq varied values)(again, to confirm the vertex iterator conserves the order)", G.g);
83 adsync_message_barrier<T>(msg_post +
"'showVertex' (post eq varied values)(again, to confirm the vertex iterator conserves the order)", G.g);
87 adsync_message_barrier<T>(msg_prev +
"'showEdges' (post eq varied values)", G.g);
89 adsync_message_barrier<T>(msg_post +
"'showEdges' (post eq varied values)", G.g);
92 adsync_message<T>(msg_post +
"'test_" + name +
"_graph_init'", G.g);