#include #include <../inc/my_structures.h> #include <../inc/my_operator.h> bool randomize(float prob) { return prob >= (float)(rand() % 1000) / 1000; } int rand_num(int mod) { return rand() % (mod) + 1; } vector split(string& s, const char delim[]) { vector result; size_t pos; do { if ((pos = s.find(delim)) == string::npos) { result.push_back(s); break; } result.push_back(s.substr(0, pos)); s = s.substr(pos + 1); } while (s.length() > 1); return result; } Matrix read_file(const char path[]) { Matrix result; std::ifstream ifile("data/adj_matrix.in"); ifile >> result; return result; }