Changeset 352 for cpp/frams/_demos/simil_test.cpp
- Timestamp:
- 04/17/15 00:51:37 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/simil_test.cpp
r349 r352 97 97 } 98 98 99 c har *params[] = {"<w_dP>", "<w_dDEG>", "<w_dNEU>", "<w_dGEO>"};99 const char *params[] = {"<w_dP>", "<w_dDEG>", "<w_dNEU>", "<w_dGEO>"}; 100 100 for (int i = 0; i < M.GetNOFactors(); i++) 101 101 { … … 160 160 // create the empty array of similarities 161 161 aaSimil = new pDouble [pvGenos->size()]; 162 for ( unsigned int k = 0; k <pvGenos->size(); k++)162 for (int k = 0; k < (int) pvGenos->size(); k++) 163 163 { 164 164 aaSimil[k] = new double [pvGenos->size()]; 165 for ( unsigned int l = 0; l <pvGenos->size(); l++)165 for (int l = 0; l < (int) pvGenos->size(); l++) 166 166 aaSimil[k][l] = 0.0; 167 167 } 168 168 169 169 // compute and remember similarities 170 unsignedint i, j;171 for (i = 0; i < pvGenos->size(); i++)172 { 173 for (j = 0; j < pvGenos->size(); j++)170 int i, j; 171 for (i = 0; i < (int) pvGenos->size(); i++) 172 { 173 for (j = 0; j < (int) pvGenos->size(); j++) 174 174 { 175 175 dSimilarity = M.EvaluateDistance(pvGenos->operator[](i), pvGenos->operator[](j)); … … 183 183 // print the number of genotypes and their names 184 184 printf("%li\n", pvGenos->size()); 185 unsignedint iGen;186 for (iGen = 0; iGen < pvNames->size(); iGen++)185 int iGen; 186 for (iGen = 0; iGen < (int) pvNames->size(); iGen++) 187 187 { 188 188 printf("%s\n", pvNames->at(iGen)); … … 191 191 192 192 // print out the matrix of similarities 193 for (i = 0; i < pvGenos->size(); i++)194 { 195 for (j = 0; j < pvGenos->size(); j++)193 for (i = 0; i < (int) pvGenos->size(); i++) 194 { 195 for (j = 0; j < (int) pvGenos->size(); j++) 196 196 { 197 197 printf("%.2lf\t", aaSimil[i][j]); … … 201 201 202 202 // delete vectors and arrays 203 for (i = 0; i < pvGenos->size(); i++)203 for (i = 0; i < (int) pvGenos->size(); i++) 204 204 { 205 205 delete pvGenos->operator[](i);
Note: See TracChangeset
for help on using the changeset viewer.