/** * @file */ #include /** * @fn proc_matrix */ int proc_matrix (const int num_mol, const int *connect, int *num_mol_agl, int *agl, int *stat, int *stat_all) /** * @brief function that processes connectivity matrix * @code * proc_matrix (number_of_molecules, connect_matrix, num_of_molecules_in_agglomerates, * agglomerates, statistic, summary_statistic); * @endcode * * @param num_mol number of molecules * @param connect connectivity graph for all molecules * @param num_mol_agl massive of number of molecules in agglomerates * @param agl massive of agglomerates * @param stat massive of statistic * @param stat_all massive of summary statistic * * @return 1 - memory error * @return 0 - exit without errors */ { int i, j, k, p, *bin; /* p weight / graph index * bin binary massive of labels */ /// Work blocks // definition and zeroing bin = (int *) malloc (num_mol * sizeof (int)); if (bin == NULL) return 1; for (i=0; i select non-bonded molecules for (i=0; i unwraping of connectivity matrix p = 0; for (i=0; i filling statistic array i = 0; while (num_mol_agl[i] > 0) { stat[num_mol_agl[i]-1]++; stat_all[num_mol_agl[i]-1]++; i++; } ///
   free memory 
free (bin); return 0; }