Changeset 605 for cpp/frams/_demos
- Timestamp:
- 08/30/16 17:39:10 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/simil_test.cpp
r601 r605 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2016 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 17 17 /** Computes a matrix of distances between all genotypes in the specified 18 18 .gen file, using the matching and measure weights as specified in the 19 command line. 20 21 Command line parameters: [-names] <genotypesFile> <w_dP> <w_dDEG> <w_dNEU> <w_dGEO> 22 23 Parameters: 24 <genotypesFile> name of a file with genotypes 25 <w_dP> weight of the difference in the number of parts 26 <w_dDEG> weight of the difference in degrees of matched parts 27 <w_dNEU> weight of the difference in neurons of matched parts 28 <w_dGEO> weight of the distance between matched parts 29 30 Switches: 31 -names specifies that the number and names of genotypes are to be printed to output 32 before the distance matrix; by default the number and names are not printed 33 34 Outputs a distance matrix in the format: 35 <row_1> (columns in a row are separated by TABs) 36 ... 37 <row_n> 38 */ 19 command line. */ 39 20 int main(int argc, char *argv[]) 40 21 { … … 49 30 if (argc < 7) 50 31 { 51 // too few parameters52 32 printf("Too few parameters!\n"); 53 printf("Command line: [-names] <genotypesFile> <w_dP> <w_dDEG> <w_dNEU> <w_dGEO> < isZfixed>\n\n");33 printf("Command line: [-names] <genotypesFile> <w_dP> <w_dDEG> <w_dNEU> <w_dGEO> <fixZaxis?>\n\n"); 54 34 printf("Parameters:\n"); 55 printf(" <genotypesFile> name of a file with genotypes\n");56 printf(" <w_dP> weight of the difference in the number of parts\n");57 printf(" <w_dDEG> weight of the difference in degrees of matched parts\n");58 printf(" <w_dNEU> weight of the difference in neurons of matched parts\n");59 printf(" <w_dGEO> weight of the distance of matched parts\n\n");60 printf(" <isZFixed> should z cooridante be fixed during the alignment\n");35 printf(" <genotypesFile> name of a file with genotypes\n"); 36 printf(" <w_dP> weight of the difference in the number of parts\n"); 37 printf(" <w_dDEG> weight of the difference in degrees of matched parts\n"); 38 printf(" <w_dNEU> weight of the difference in neurons of matched parts\n"); 39 printf(" <w_dGEO> weight of the distance of matched parts\n"); 40 printf(" <fixZaxis?> should the 'z' (vertical) coordinate be fixed during the alignment? (0 or 1)\n\n"); 61 41 printf("Switches:\n"); 62 printf(" -names specifies that the number and names of genotypes are to be printed to output\n");63 printf(" 42 printf(" -names specifies that the number and names of genotypes are to be printed to output\n"); 43 printf(" before the distance matrix; by default the number and names are not printed\n\n"); 64 44 65 45 printf("Outputs a symmetric distance matrix in the format:\n"); 66 printf(" <row_1> (columns in a row are separated by TABs)\n");67 printf(" ...\n");68 printf(" <row_n>\n");46 printf(" <row_1> (columns in a row are separated by TABs)\n"); 47 printf(" ...\n"); 48 printf(" <row_n>\n"); 69 49 70 50 return -1; … … 130 110 return -1; 131 111 } 132 else if (M.zFixed != 0 && M.zFixed != 1)133 { 134 printf("<isZFixed>=%d. <isZFixed> should be equal to 0 or 1\n", M.zFixed);135 return -1;112 else if (M.zFixed != 0 && M.zFixed != 1) 113 { 114 printf("<isZFixed>=%d. <isZFixed> should be equal to 0 or 1\n", M.zFixed); 115 return -1; 136 116 } 137 117 … … 194 174 if (bPrintNames) 195 175 { 196 // if "-names" switch was given, 197 // print the number of genotypes and their names 176 // if "-names" switch was given, print the number of genotypes and their names 198 177 printf("%li\n", pvGenos.size()); 199 178 for (unsigned int iGen = 0; iGen < pvNames.size(); iGen++)
Note: See TracChangeset
for help on using the changeset viewer.