diff --git a/stat_new/stat b/stat_new/stat index f973372..f12f41d 100755 Binary files a/stat_new/stat and b/stat_new/stat differ diff --git a/stat_new/stat_print.c b/stat_new/stat_print.c index df6b145..9a32d37 100644 --- a/stat_new/stat_print.c +++ b/stat_new/stat_print.c @@ -2,7 +2,8 @@ * * Usage: * printing_agl (input_file, output_file, number_of_molecules, - * true_label_molecules, num_of_molecules_in_aglomerates, aglomerates, statistic) + * true_label_molecules, num_of_molecules_in_aglomerates, aglomerates, + * statistic, type_of_aglomerate) */ #include @@ -11,7 +12,7 @@ int printing_agl (char *input, char *output, const int *connect, int num_mol, const int *true_label_mol, const int *num_mol_agl, - const int *agl, const int *stat) + const int *agl, const int *stat, int *type_agl) /* input - name of file with coordinates * output - name of output file * connect - connectivity graph for all molecules @@ -20,6 +21,7 @@ int printing_agl (char *input, char *output, const int *connect, int num_mol, * num_mol_agl - massive of numbers of molecule in aglomerates * agl - massive of aglomerates * stat - massive of statistics + * type_agl - massive of numbers of aglomerate types */ { int i, iso, j, k, p, type, *label_matrix, **matrix; @@ -28,8 +30,12 @@ int printing_agl (char *input, char *output, const int *connect, int num_mol, * type - number of cycle in aglomerates * label_matrix - massive of indexes of molecule * matrix - connectivity graph + * f_out - output file */ + type_agl[0] = 0; + type_agl[1] = 0; + f_out = fopen (output, "a"); // head @@ -68,9 +74,15 @@ int printing_agl (char *input, char *output, const int *connect, int num_mol, for (k=0; k +#include + + +int summary_statistic (char *filename, int step, int num_mol, const int *type_agl, const int *stat_all) +/* filename - name of output file + * step - number of steps + * num_mol - number of molecules + * type_agl - massive of numbers of aglomerate types + * stat_all - massive of summary statistics + */ +{ + float conc, p, pn, type[2], x, y; + int i, index; + FILE *f_out; +/* conc - concentrate of aglomerates + * p - probability of aglomerates + * pn - weight probability of aglomerates + * f_out - output file + */ + + index = 0; + for (i=0; i