using gmx::RVec;
-void make_correlation_file(std::vector< std::vector< std::vector< float > > > correlations, const char* file_name, int start)
+void make_correlation_matrix_file(std::vector< std::vector< std::vector< float > > > correlations, const char* file_name, int start)
{
FILE *file;
file = std::fopen(file_name, "w+");
std::fclose(file);
}
-void make_rout_file2(float crl_border, std::vector< int > indx, std::vector< std::vector< std::pair< int, int > > > rout, const char* file_name)
+void make_correlation_pairs_file(std::vector< std::vector< std::vector< float > > > correlations, const char* file_name, int start)
+{
+ FILE *file;
+ file = std::fopen(file_name, "w+");
+ for (int i = 0; i < correlations.front().size(); i++) {
+ for (int j = 0; j < correlations.front().front().size(); j++) {
+ std::fprintf(file, "correlation between point '%d' and point '%d'\n", i, j);
+ for (int k = 0; k < correlations.size(); k++) {
+ std::fprintf(file, "%3.4f ", correlations[k][i][j]);
+ }
+ std::fprintf(file, "\n");
+ }
+ if (i % 10 == 0) {
+ std::cout << "correlations in row " << i << " out of " << correlations.front().size() << " completed\n";
+ }
+ }
+ std::fclose(file);
+}
+
+void make_rout_file(float crl_border, std::vector< int > indx, std::vector< std::vector< std::pair< int, int > > > rout, const char* file_name)
{
FILE *file;
file = std::fopen(file_name, "w+");
std::cout << "routs evaluation: end\n";
- //make_correlation_file(crltns, "CubeT.txt", 0);
- //make_rout_file2(crl_border, index, rout_new, "Routs_Cube.txt");
- //make_best_corrs_graphics(crltns, rout_new, index, "best_graphics_Cube.txt");
+ make_correlation_matrix_file(crltns, "CubeT.txt", 0);
+ make_correlation_pairs_file(crltns, "test.txt", 0);
+ make_rout_file(crl_border, index, rout_new, "Routs_Cube.txt");
+ make_best_corrs_graphics(crltns, rout_new, index, "best_graphics_Cube.txt");
std::cout << "Finish Analysis - end\n\n";
}