Advertisement
olemis

Coursera algs4partII-004 - Assignment 5

Jan 3rd, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.32 KB | None | 0 0
  1.  
  2. Algorithms, Part II
  3. by Kevin Wayne, Robert Sedgewick
  4.  
  5. Programming Assignment 5: Burrows-Wheeler | burrows.zip
  6. Submission time Fri-02-Jan 18:44:03
  7. Raw Score 94.68 / 100.00
  8. Feedback See the Assessment Guide for information on how to read this report.
  9. Assessment Summary
  10. Compilation: PASSED
  11. Style: FAILED
  12. Findbugs: Potential bugs found.
  13. API: PASSED
  14.  
  15. Correctness: 33/35 tests passed
  16. Memory: 10/10 tests passed
  17. Timing: 73/78 tests passed
  18.  
  19. Aggregate score: 94.68% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]
  20. Assessment Details
  21. The following files were submitted:
  22. ----------------------------------
  23. total 36K
  24. -rw-r--r-- 1 4.0K Jan 3 02:45 BurrowsWheeler.java
  25. -rw-r--r-- 1 18K Jan 3 02:45 CircularSuffixArray.java
  26. -rw-r--r-- 1 2.0K Jan 3 02:45 MoveToFront.java
  27. -rw-r--r-- 1 6.7K Jan 3 02:45 studentSubmission.zip
  28.  
  29.  
  30. ******************************************************************************
  31. * compiling
  32. ******************************************************************************
  33.  
  34.  
  35. % javac CircularSuffixArray.java
  36. *-----------------------------------------------------------
  37. ================================================================
  38.  
  39. % javac BurrowsWheeler.java
  40. *-----------------------------------------------------------
  41. ================================================================
  42.  
  43. % javac MoveToFront.java
  44. *-----------------------------------------------------------
  45. ================================================================
  46.  
  47.  
  48.  
  49. % checkstyle *.java
  50. *-----------------------------------------------------------
  51. CircularSuffixArray.java:40:1: Outer types defined is 2 (max allowed is 1).
  52. CircularSuffixArray.java:40:1: Redundant import from the java.lang package - java.lang.String.
  53. CircularSuffixArray.java:42: The name of the outer type and the file do not match.
  54. CircularSuffixArray.java:42:7: Name 'sais' must match pattern '^[A-Z][a-zA-Z0-9]*$'.
  55. CircularSuffixArray.java:43:11: Redundant 'static' modifier.
  56. CircularSuffixArray.java:44:5: Redundant 'public' modifier.
  57. CircularSuffixArray.java:45:5: Redundant 'public' modifier.
  58. CircularSuffixArray.java:46:5: Redundant 'public' modifier.
  59. CircularSuffixArray.java:49:20: Name 'm_A' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  60. CircularSuffixArray.java:50:17: Name 'm_pos' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  61. CircularSuffixArray.java:51:51: Only one statement per line allowed.
  62. CircularSuffixArray.java:53:62: 'cast' is not followed by whitespace.
  63. CircularSuffixArray.java:54:63: Inner assignments should be avoided.
  64. CircularSuffixArray.java:57:20: Name 'm_A' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  65. CircularSuffixArray.java:58:17: Name 'm_pos' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  66. CircularSuffixArray.java:59:51: Only one statement per line allowed.
  67. CircularSuffixArray.java:61:62: 'cast' is not followed by whitespace.
  68. CircularSuffixArray.java:62:63: Inner assignments should be avoided.
  69. CircularSuffixArray.java:65:21: Name 'm_A' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  70. CircularSuffixArray.java:66:17: Name 'm_pos' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  71. CircularSuffixArray.java:67:53: Only one statement per line allowed.
  72. CircularSuffixArray.java:69:63: 'cast' is not followed by whitespace.
  73. CircularSuffixArray.java:70:63: Inner assignments should be avoided.
  74. CircularSuffixArray.java:73:19: Name 'm_A' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  75. CircularSuffixArray.java:74:17: Name 'm_pos' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  76. CircularSuffixArray.java:75:49: Only one statement per line allowed.
  77. CircularSuffixArray.java:78:63: Inner assignments should be avoided.
  78. CircularSuffixArray.java:81:20: Name 'm_A' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  79. CircularSuffixArray.java:82:17: Name 'm_pos' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  80. CircularSuffixArray.java:83:53: Only one statement per line allowed.
  81. CircularSuffixArray.java:84:41: 'cast' is not followed by whitespace.
  82. CircularSuffixArray.java:94:8: 'for' is not followed by whitespace.
  83. CircularSuffixArray.java:94:35: Only one statement per line allowed.
  84. CircularSuffixArray.java:95:8: 'for' is not followed by whitespace.
  85. CircularSuffixArray.java:95:38: Only one statement per line allowed.
  86. CircularSuffixArray.java:101:7: 'if' is not followed by whitespace.
  87. CircularSuffixArray.java:101:12: Expression can be simplified.
  88. CircularSuffixArray.java:101:27: 'for' is not followed by whitespace.
  89. CircularSuffixArray.java:101:53: Only one statement per line allowed.
  90. CircularSuffixArray.java:101:71: Only one statement per line allowed.
  91. CircularSuffixArray.java:102:15: 'for' is not followed by whitespace.
  92. CircularSuffixArray.java:102:41: Only one statement per line allowed.
  93. CircularSuffixArray.java:102:59: Only one statement per line allowed.
  94. CircularSuffixArray.java:108:3: Name 'LMSsort' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  95. CircularSuffixArray.java:108:30: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  96. CircularSuffixArray.java:112:7: 'if' is not followed by whitespace.
  97. CircularSuffixArray.java:115:18: Inner assignments should be avoided.
  98. CircularSuffixArray.java:117:31: Avoid inline conditionals.
  99. CircularSuffixArray.java:118:8: 'for' is not followed by whitespace.
  100. CircularSuffixArray.java:119:9: 'if' is not followed by whitespace.
  101. CircularSuffixArray.java:119:17: Inner assignments should be avoided.
  102. CircularSuffixArray.java:120:13: 'if' is not followed by whitespace.
  103. CircularSuffixArray.java:120:18: Inner assignments should be avoided.
  104. CircularSuffixArray.java:120:55: Only one statement per line allowed.
  105. CircularSuffixArray.java:120:66: Inner assignments should be avoided.
  106. CircularSuffixArray.java:122:35: Avoid inline conditionals.
  107. CircularSuffixArray.java:124:16: 'if' is not followed by whitespace.
  108. CircularSuffixArray.java:129:7: 'if' is not followed by whitespace.
  109. CircularSuffixArray.java:131:8: 'for' is not followed by whitespace.
  110. CircularSuffixArray.java:131:33: Inner assignments should be avoided.
  111. CircularSuffixArray.java:132:9: 'if' is not followed by whitespace.
  112. CircularSuffixArray.java:132:17: Inner assignments should be avoided.
  113. CircularSuffixArray.java:133:11: 'if' is not followed by whitespace.
  114. CircularSuffixArray.java:133:16: Inner assignments should be avoided.
  115. CircularSuffixArray.java:133:53: Only one statement per line allowed.
  116. CircularSuffixArray.java:133:64: Inner assignments should be avoided.
  117. CircularSuffixArray.java:135:35: Avoid inline conditionals.
  118. CircularSuffixArray.java:142:3: Name 'LMSpostproc' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  119. CircularSuffixArray.java:142:34: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  120. CircularSuffixArray.java:149:8: 'for' is not followed by whitespace.
  121. CircularSuffixArray.java:149:19: Inner assignments should be avoided.
  122. CircularSuffixArray.java:149:46: Only one statement per line allowed.
  123. CircularSuffixArray.java:150:7: 'if' is not followed by whitespace.
  124. CircularSuffixArray.java:151:10: 'for' is not followed by whitespace.
  125. CircularSuffixArray.java:152:11: 'if' is not followed by whitespace.
  126. CircularSuffixArray.java:152:15: Inner assignments should be avoided.
  127. CircularSuffixArray.java:153:31: Only one statement per line allowed.
  128. CircularSuffixArray.java:154:13: 'if' is not followed by whitespace.
  129. CircularSuffixArray.java:160:18: Only one statement per line allowed.
  130. CircularSuffixArray.java:160:30: Only one statement per line allowed.
  131. CircularSuffixArray.java:161:38: Only one statement per line allowed.
  132. CircularSuffixArray.java:161:46: Inner assignments should be avoided.
  133. CircularSuffixArray.java:162:8: 'for' is not followed by whitespace.
  134. CircularSuffixArray.java:163:40: Only one statement per line allowed.
  135. CircularSuffixArray.java:163:48: Inner assignments should be avoided.
  136. CircularSuffixArray.java:164:9: 'if' is not followed by whitespace.
  137. CircularSuffixArray.java:165:43: Only one statement per line allowed.
  138. CircularSuffixArray.java:166:42: Only one statement per line allowed.
  139. CircularSuffixArray.java:166:50: Inner assignments should be avoided.
  140. CircularSuffixArray.java:171:8: 'for' is not followed by whitespace.
  141. CircularSuffixArray.java:172:23: Only one statement per line allowed.
  142. CircularSuffixArray.java:172:48: Only one statement per line allowed.
  143. CircularSuffixArray.java:173:9: 'if' is not followed by whitespace.
  144. CircularSuffixArray.java:174:12: 'for' is not followed by whitespace.
  145. CircularSuffixArray.java:174:71: Empty for block.
  146. CircularSuffixArray.java:175:11: 'if' is not followed by whitespace.
  147. CircularSuffixArray.java:177:9: 'if' is not followed by whitespace.
  148. CircularSuffixArray.java:177:15: Expression can be simplified.
  149. CircularSuffixArray.java:177:37: Only one statement per line allowed.
  150. CircularSuffixArray.java:177:47: Only one statement per line allowed.
  151. CircularSuffixArray.java:187:31: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  152. CircularSuffixArray.java:191:7: 'if' is not followed by whitespace.
  153. CircularSuffixArray.java:194:18: Inner assignments should be avoided.
  154. CircularSuffixArray.java:195:48: Avoid inline conditionals.
  155. CircularSuffixArray.java:196:8: 'for' is not followed by whitespace.
  156. CircularSuffixArray.java:197:24: Only one statement per line allowed.
  157. CircularSuffixArray.java:198:9: 'if' is not followed by whitespace.
  158. CircularSuffixArray.java:199:11: 'if' is not followed by whitespace.
  159. CircularSuffixArray.java:199:16: Inner assignments should be avoided.
  160. CircularSuffixArray.java:199:55: Only one statement per line allowed.
  161. CircularSuffixArray.java:199:66: Inner assignments should be avoided.
  162. CircularSuffixArray.java:200:52: Avoid inline conditionals.
  163. CircularSuffixArray.java:204:7: 'if' is not followed by whitespace.
  164. CircularSuffixArray.java:206:8: 'for' is not followed by whitespace.
  165. CircularSuffixArray.java:206:33: Inner assignments should be avoided.
  166. CircularSuffixArray.java:207:9: 'if' is not followed by whitespace.
  167. CircularSuffixArray.java:207:17: Inner assignments should be avoided.
  168. CircularSuffixArray.java:208:11: 'if' is not followed by whitespace.
  169. CircularSuffixArray.java:208:16: Inner assignments should be avoided.
  170. CircularSuffixArray.java:208:55: Only one statement per line allowed.
  171. CircularSuffixArray.java:208:66: Inner assignments should be avoided.
  172. CircularSuffixArray.java:209:53: Avoid inline conditionals.
  173. CircularSuffixArray.java:217:33: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  174. CircularSuffixArray.java:221:7: 'if' is not followed by whitespace.
  175. CircularSuffixArray.java:224:18: Inner assignments should be avoided.
  176. CircularSuffixArray.java:225:48: Avoid inline conditionals.
  177. CircularSuffixArray.java:226:8: 'for' is not followed by whitespace.
  178. CircularSuffixArray.java:227:9: 'if' is not followed by whitespace.
  179. CircularSuffixArray.java:227:17: Inner assignments should be avoided.
  180. CircularSuffixArray.java:228:22: Inner assignments should be avoided.
  181. CircularSuffixArray.java:229:11: 'if' is not followed by whitespace.
  182. CircularSuffixArray.java:229:40: Only one statement per line allowed.
  183. CircularSuffixArray.java:229:51: Inner assignments should be avoided.
  184. CircularSuffixArray.java:230:52: Avoid inline conditionals.
  185. CircularSuffixArray.java:231:16: 'if' is not followed by whitespace.
  186. CircularSuffixArray.java:236:7: 'if' is not followed by whitespace.
  187. CircularSuffixArray.java:238:8: 'for' is not followed by whitespace.
  188. CircularSuffixArray.java:238:33: Inner assignments should be avoided.
  189. CircularSuffixArray.java:239:9: 'if' is not followed by whitespace.
  190. CircularSuffixArray.java:239:17: Inner assignments should be avoided.
  191. CircularSuffixArray.java:240:21: Inner assignments should be avoided.
  192. CircularSuffixArray.java:241:11: 'if' is not followed by whitespace.
  193. CircularSuffixArray.java:241:40: Only one statement per line allowed.
  194. CircularSuffixArray.java:241:51: Inner assignments should be avoided.
  195. CircularSuffixArray.java:242:52: Avoid inline conditionals.
  196. CircularSuffixArray.java:242:61: 'cast' is not followed by whitespace.
  197. CircularSuffixArray.java:243:16: 'if' is not followed by whitespace.
  198. CircularSuffixArray.java:256:28: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  199. CircularSuffixArray.java:262:7: 'if' is not followed by whitespace.
  200. CircularSuffixArray.java:264:9: 'if' is not followed by whitespace.
  201. CircularSuffixArray.java:264:61: Only one statement per line allowed.
  202. CircularSuffixArray.java:265:53: Only one statement per line allowed.
  203. CircularSuffixArray.java:266:14: 'if' is not followed by whitespace.
  204. CircularSuffixArray.java:268:9: 'if' is not followed by whitespace.
  205. CircularSuffixArray.java:268:71: Only one statement per line allowed.
  206. CircularSuffixArray.java:269:14: 'if' is not followed by whitespace.
  207. CircularSuffixArray.java:269:67: Only one statement per line allowed.
  208. CircularSuffixArray.java:270:27: Only one statement per line allowed.
  209. CircularSuffixArray.java:272:13: Inner assignments should be avoided.
  210. CircularSuffixArray.java:278:38: Only one statement per line allowed.
  211. CircularSuffixArray.java:279:8: 'for' is not followed by whitespace.
  212. CircularSuffixArray.java:279:36: Only one statement per line allowed.
  213. CircularSuffixArray.java:280:15: Only one statement per line allowed.
  214. CircularSuffixArray.java:280:26: Only one statement per line allowed.
  215. CircularSuffixArray.java:280:33: Only one statement per line allowed.
  216. CircularSuffixArray.java:280:41: Only one statement per line allowed.
  217. CircularSuffixArray.java:281:38: Only one statement per line allowed.
  218. CircularSuffixArray.java:281:46: Inner assignments should be avoided.
  219. CircularSuffixArray.java:282:8: 'for' is not followed by whitespace.
  220. CircularSuffixArray.java:283:40: Only one statement per line allowed.
  221. CircularSuffixArray.java:283:48: Inner assignments should be avoided.
  222. CircularSuffixArray.java:284:9: 'if' is not followed by whitespace.
  223. CircularSuffixArray.java:285:11: 'if' is not followed by whitespace.
  224. CircularSuffixArray.java:285:37: Only one statement per line allowed.
  225. CircularSuffixArray.java:285:59: Only one statement per line allowed.
  226. CircularSuffixArray.java:285:64: Only one statement per line allowed.
  227. CircularSuffixArray.java:286:42: Only one statement per line allowed.
  228. CircularSuffixArray.java:286:50: Inner assignments should be avoided.
  229. CircularSuffixArray.java:289:7: 'if' is not followed by whitespace.
  230. CircularSuffixArray.java:292:14: 'if' is not followed by whitespace.
  231. CircularSuffixArray.java:301:7: 'if' is not followed by whitespace.
  232. CircularSuffixArray.java:302:9: 'if' is not followed by whitespace.
  233. CircularSuffixArray.java:302:42: Only one statement per line allowed.
  234. CircularSuffixArray.java:303:9: 'if' is not followed by whitespace.
  235. CircularSuffixArray.java:305:9: 'if' is not followed by whitespace.
  236. CircularSuffixArray.java:306:11: 'if' is not followed by whitespace.
  237. CircularSuffixArray.java:309:10: 'for' is not followed by whitespace.
  238. CircularSuffixArray.java:310:11: 'if' is not followed by whitespace.
  239. CircularSuffixArray.java:316:20: Only one statement per line allowed.
  240. CircularSuffixArray.java:316:36: Only one statement per line allowed.
  241. CircularSuffixArray.java:317:40: Only one statement per line allowed.
  242. CircularSuffixArray.java:317:48: Inner assignments should be avoided.
  243. CircularSuffixArray.java:318:10: 'for' is not followed by whitespace.
  244. CircularSuffixArray.java:319:42: Only one statement per line allowed.
  245. CircularSuffixArray.java:319:50: Inner assignments should be avoided.
  246. CircularSuffixArray.java:320:11: 'if' is not followed by whitespace.
  247. CircularSuffixArray.java:322:44: Only one statement per line allowed.
  248. CircularSuffixArray.java:322:52: Inner assignments should be avoided.
  249. CircularSuffixArray.java:326:10: 'for' is not followed by whitespace.
  250. CircularSuffixArray.java:326:38: Only one statement per line allowed.
  251. CircularSuffixArray.java:327:9: 'if' is not followed by whitespace.
  252. CircularSuffixArray.java:327:36: Inner assignments should be avoided.
  253. CircularSuffixArray.java:328:9: 'if' is not followed by whitespace.
  254. CircularSuffixArray.java:332:7: 'if' is not followed by whitespace.
  255. CircularSuffixArray.java:334:7: 'if' is not followed by whitespace.
  256. CircularSuffixArray.java:336:20: Only one statement per line allowed.
  257. CircularSuffixArray.java:336:27: Only one statement per line allowed.
  258. CircularSuffixArray.java:336:43: Only one statement per line allowed.
  259. CircularSuffixArray.java:338:22: Inner assignments should be avoided.
  260. CircularSuffixArray.java:339:14: 'while' is not followed by whitespace.
  261. CircularSuffixArray.java:342:13: 'if' is not followed by whitespace.
  262. CircularSuffixArray.java:344:21: Inner assignments should be avoided.
  263. CircularSuffixArray.java:346:12: 'while' is not followed by whitespace.
  264. CircularSuffixArray.java:348:7: 'if' is not followed by whitespace.
  265. CircularSuffixArray.java:348:14: Expression can be simplified.
  266. CircularSuffixArray.java:350:17: Only one statement per line allowed.
  267. CircularSuffixArray.java:358:30: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  268. CircularSuffixArray.java:359:7: 'if' is not followed by whitespace.
  269. CircularSuffixArray.java:360:7: 'if' is not followed by whitespace.
  270. CircularSuffixArray.java:360:20: 'if' is not followed by whitespace.
  271. CircularSuffixArray.java:360:51: Only one statement per line allowed.
  272. CircularSuffixArray.java:366:30: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  273. CircularSuffixArray.java:367:7: 'if' is not followed by whitespace.
  274. CircularSuffixArray.java:368:7: 'if' is not followed by whitespace.
  275. CircularSuffixArray.java:368:20: 'if' is not followed by whitespace.
  276. CircularSuffixArray.java:368:51: Only one statement per line allowed.
  277. CircularSuffixArray.java:374:31: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  278. CircularSuffixArray.java:375:7: 'if' is not followed by whitespace.
  279. CircularSuffixArray.java:375:36: '||' should be on a new line.
  280. CircularSuffixArray.java:376:42: '||' should be on a new line.
  281. CircularSuffixArray.java:378:7: 'if' is not followed by whitespace.
  282. CircularSuffixArray.java:378:20: 'if' is not followed by whitespace.
  283. CircularSuffixArray.java:378:51: Only one statement per line allowed.
  284. CircularSuffixArray.java:384:29: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  285. CircularSuffixArray.java:385:7: 'if' is not followed by whitespace.
  286. CircularSuffixArray.java:385:36: '||' should be on a new line.
  287. CircularSuffixArray.java:386:42: '||' should be on a new line.
  288. CircularSuffixArray.java:388:7: 'if' is not followed by whitespace.
  289. CircularSuffixArray.java:388:20: 'if' is not followed by whitespace.
  290. CircularSuffixArray.java:388:51: Only one statement per line allowed.
  291. CircularSuffixArray.java:394:30: Name 'SA' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z]$'.
  292. CircularSuffixArray.java:395:7: 'if' is not followed by whitespace.
  293. CircularSuffixArray.java:395:36: '||' should be on a new line.
  294. CircularSuffixArray.java:397:7: 'if' is not followed by whitespace.
  295. CircularSuffixArray.java:397:20: 'if' is not followed by whitespace.
  296. CircularSuffixArray.java:397:51: Only one statement per line allowed.
  297. CircularSuffixArray.java:407:7: 'if' is not followed by whitespace.
  298. CircularSuffixArray.java:407:50: '||' should be on a new line.
  299. CircularSuffixArray.java:409:7: 'if' is not followed by whitespace.
  300. CircularSuffixArray.java:409:20: 'if' is not followed by whitespace.
  301. CircularSuffixArray.java:409:53: Only one statement per line allowed.
  302. CircularSuffixArray.java:412:8: 'for' is not followed by whitespace.
  303. CircularSuffixArray.java:412:42: Only one statement per line allowed.
  304. CircularSuffixArray.java:412:50: 'cast' is not followed by whitespace.
  305. CircularSuffixArray.java:413:8: 'for' is not followed by whitespace.
  306. CircularSuffixArray.java:413:36: Only one statement per line allowed.
  307. CircularSuffixArray.java:413:44: 'cast' is not followed by whitespace.
  308. CircularSuffixArray.java:421:7: 'if' is not followed by whitespace.
  309. CircularSuffixArray.java:421:50: '||' should be on a new line.
  310. CircularSuffixArray.java:423:7: 'if' is not followed by whitespace.
  311. CircularSuffixArray.java:423:20: 'if' is not followed by whitespace.
  312. CircularSuffixArray.java:423:53: Only one statement per line allowed.
  313. CircularSuffixArray.java:426:8: 'for' is not followed by whitespace.
  314. CircularSuffixArray.java:426:42: Only one statement per line allowed.
  315. CircularSuffixArray.java:426:50: 'cast' is not followed by whitespace.
  316. CircularSuffixArray.java:427:8: 'for' is not followed by whitespace.
  317. CircularSuffixArray.java:427:36: Only one statement per line allowed.
  318. CircularSuffixArray.java:427:44: 'cast' is not followed by whitespace.
  319. CircularSuffixArray.java:435:7: 'if' is not followed by whitespace.
  320. CircularSuffixArray.java:435:50: '||' should be on a new line.
  321. CircularSuffixArray.java:436:59: '||' should be on a new line.
  322. CircularSuffixArray.java:438:7: 'if' is not followed by whitespace.
  323. CircularSuffixArray.java:438:20: 'if' is not followed by whitespace.
  324. CircularSuffixArray.java:438:53: Only one statement per line allowed.
  325. CircularSuffixArray.java:441:8: 'for' is not followed by whitespace.
  326. CircularSuffixArray.java:441:42: Only one statement per line allowed.
  327. CircularSuffixArray.java:441:51: 'cast' is not followed by whitespace.
  328. CircularSuffixArray.java:442:8: 'for' is not followed by whitespace.
  329. CircularSuffixArray.java:442:36: Only one statement per line allowed.
  330. CircularSuffixArray.java:442:45: 'cast' is not followed by whitespace.
  331. CircularSuffixArray.java:450:7: 'if' is not followed by whitespace.
  332. CircularSuffixArray.java:450:50: '||' should be on a new line.
  333. CircularSuffixArray.java:451:59: '||' should be on a new line.
  334. CircularSuffixArray.java:453:7: 'if' is not followed by whitespace.
  335. CircularSuffixArray.java:453:20: 'if' is not followed by whitespace.
  336. CircularSuffixArray.java:453:53: Only one statement per line allowed.
  337. CircularSuffixArray.java:456:8: 'for' is not followed by whitespace.
  338. CircularSuffixArray.java:456:42: Only one statement per line allowed.
  339. CircularSuffixArray.java:457:8: 'for' is not followed by whitespace.
  340. CircularSuffixArray.java:457:36: Only one statement per line allowed.
  341. CircularSuffixArray.java:478:1: File contains tab characters (this is the first instance).
  342. CircularSuffixArray.java:484:23: Name 'temp_index' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  343. CircularSuffixArray.java:509:9: Constructor definition in wrong order.
  344. BurrowsWheeler.java:2:8: Unused import - java.util.Iterator.
  345. BurrowsWheeler.java:25:5: File contains tab characters (this is the first instance).
  346. BurrowsWheeler.java:33:54: Inner assignments should be avoided.
  347. BurrowsWheeler.java:38:30: 'while' is not followed by whitespace.
  348. BurrowsWheeler.java:52:25: Name 'encode_sais' must match pattern '^[a-z][a-zA-Z0-9]*$|^[A-Z][A-Z_0-9]*$'.
  349. BurrowsWheeler.java:82:9: Declaring variables, return values or parameters of type 'Character' is not allowed.
  350. BurrowsWheeler.java:106:39: Declaring variables, return values or parameters of type 'Character' is not allowed.
  351. BurrowsWheeler.java:111: Comment matches to-do format 'TODO:'.
  352. BurrowsWheeler.java:133:17: Inner assignments should be avoided.
  353. BurrowsWheeler.java:138:63: Declaring variables, return values or parameters of type 'Character' is not allowed.
  354. MoveToFront.java:13:8: Unused import - java.util.List.
  355. MoveToFront.java:22:1: File contains tab characters (this is the first instance).
  356. MoveToFront.java:32:25: Declaring variables, return values or parameters of type 'Byte' is not allowed.
  357. MoveToFront.java:33:25: Declaring variables, return values or parameters of type 'Short' is not allowed.
  358. MoveToFront.java:57:25: Declaring variables, return values or parameters of type 'Byte' is not allowed.
  359. ================================================================
  360.  
  361.  
  362. % checkIO MoveToFront.java BurrowsWheeler.java
  363. *-----------------------------------------------------------
  364. MoveToFront.java:87: Calls StdOut.print()
  365. ================================================================
  366.  
  367.  
  368. % findbugs *.class
  369. *-----------------------------------------------------------
  370. M D DLS_DEAD_LOCAL_STORE DLS: Dead store to $L3 in BurrowsWheeler.extractOrder(Character[], char[], int) At BurrowsWheeler.java:[line 133]
  371. Warnings generated: 1
  372. ================================================================
  373.  
  374.  
  375. Testing the APIs of your programs.
  376. *-----------------------------------------------------------
  377. BurrowsWheeler:
  378.  
  379. MoveToFront:
  380.  
  381. ================================================================
  382.  
  383.  
  384. ******************************************************************************
  385. * correctness
  386. ******************************************************************************
  387.  
  388. Testing methods in CircularSuffixArray
  389. *-----------------------------------------------------------
  390. Running 11 total tests.
  391.  
  392. Test 1: Test index() and length() with random binary strings
  393. * length = 10
  394. * length = 100
  395. * length = 1000
  396. ==> passed
  397.  
  398. Test 2: Test index() and length() with random alphanumeric strings
  399. * length = 10
  400. * length = 100
  401. * length = 1000
  402. ==> passed
  403.  
  404. Test 3: Test index() and length() with random ASCII strings
  405. * length = 10
  406. * length = 100
  407. * length = 1000
  408. ==> passed
  409.  
  410. Test 4: Test index() and length() with random extended ASCII strings
  411. * length = 10
  412. * length = 100
  413. * length = 1000
  414. ==> passed
  415.  
  416. Test 5: Test index() and length() with strings from text files
  417. * cadabra.txt
  418. * amendments.txt
  419. * moby1.txt
  420. * dickens1000.txt
  421. ==> passed
  422.  
  423. Test 6: Test index() and length() with strings from degenerate text files
  424. * a.txt
  425. * nomatch.txt
  426. * zebra.txt
  427. * alphanum.txt
  428. * stars.txt
  429. * couscous.txt
  430. ==> passed
  431.  
  432. Test 7: Test index() and length() with strings from binary files
  433. * us.gif
  434. * CS_bricks.jpg
  435. * rand1K.bin
  436. ==> passed
  437.  
  438. Test 8: Test index() and length() with random alphanumeric strings of length 0, 1, and 2.
  439. * length = 0
  440. * length = 1
  441. * length = 2
  442. ==> passed
  443.  
  444. Test 9: Test whether index() throws an exception when argument is out of bounds
  445. * string of length 10
  446. * string of length 100
  447. * string of length 2
  448. * string of length 1
  449. * string of length 0
  450. ==> passed
  451.  
  452. Test 10: Test whether constructor throws an exception when argument is null
  453. ==> passed
  454.  
  455. Test 11: Test whether two CircularSuffixArray objects can be created at the same time
  456. * cadabra.txt and amendments.txt
  457. * amendments.txt and cadabra.txt
  458. * dickens1000.txt and cadabra.txt
  459. ==> passed
  460.  
  461. Total: 11/11 tests passed!
  462.  
  463. ================================================================
  464.  
  465. Testing methods in MoveToFront
  466. *-----------------------------------------------------------
  467. Running 12 total tests.
  468.  
  469. Test 0: test main()
  470.  
  471. % java MoveToFront - < abra.txt | java HexDump 16
  472. 41 42 52 02 44 01 45 01 04 04 02 26
  473.  
  474. % java MoveToFront - < abra.txt | java MoveToFront +
  475. ABRACADABRA!
  476.  
  477. ==> passed
  478.  
  479. Test 1: test encode() on text input files
  480. * amendments.txt
  481. * aesop.txt
  482. * stars.txt
  483. * zebra.txt
  484. * alphanum.txt
  485. * a.txt
  486. ==> passed
  487.  
  488. Test 2: test decode() on text input files
  489. * amendments.txt
  490. * aesop.txt
  491. * stars.txt
  492. * zebra.txt
  493. * alphanum.txt
  494. * a.txt
  495. ==> passed
  496.  
  497. Test 3: test whether decode(encode()) = original on text input files
  498. * amendments.txt
  499. * aesop.txt
  500. * stars.txt
  501. * zebra.txt
  502. * alphanum.txt
  503. * a.txt
  504. ==> passed
  505.  
  506. Test 4: test encode() on binary input files
  507. * us.gif
  508. * CS_bricks.jpg
  509. * rand10K.bin
  510. ==> passed
  511.  
  512. Test 5: test decode() on binary input files
  513. * us.gif
  514. * CS_bricks.jpg
  515. * rand10K.bin
  516. ==> passed
  517.  
  518. Test 6: test whether decode(encode()) = original on binary input files
  519. * us.gif
  520. * CS_bricks.jpg
  521. * rand10K.bin
  522. ==> passed
  523.  
  524. Test 7: test that encode() calls either close() or flush()
  525. * amendments.txt
  526. * aesop.txt
  527. ==> passed
  528.  
  529. Test 8: test that decode() calls either close() or flush()
  530. * amendments.txt
  531. * aesop.txt
  532. ==> passed
  533.  
  534. Test 9: test encode() on large input files
  535. * rand100K.bin
  536. * world192.txt
  537. ==> passed
  538.  
  539. Test 10: test decode() on large input files
  540. * rand100K.bin
  541. * world192.txt
  542. ==> passed
  543.  
  544. Test 11: test whether decode(encode()) = original on large input files
  545. * rand100K.bin
  546. * world192.txt
  547. ==> passed
  548.  
  549.  
  550. Total: 12/12 tests passed!
  551.  
  552. ================================================================
  553.  
  554. ******************************************************************************
  555. * correctness (substituting reference CircularSuffixArray.java)
  556. ******************************************************************************
  557.  
  558. Testing methods in BurrowsWheeler
  559. *-----------------------------------------------------------
  560. Running 12 total tests.
  561.  
  562. Test 0: testing main()
  563.  
  564. % java BurrowsWheeler - < abra.txt | java HexDump 16
  565. 00 00 00 03 41 52 44 21 52 43 41 41 41 41 42 42
  566.  
  567. % java BurrowsWheeler - < abra.txt | java BurrowsWheeler +
  568. ABRACADABRA!
  569.  
  570. ==> passed
  571.  
  572. Test 1: encode()
  573. * cadabra.txt
  574. * amendments.txt
  575. * zebra.txt
  576. * alphanum.txt
  577. * a.txt
  578. ==> passed
  579.  
  580. Test 2: decode()
  581. * cadabra.txt
  582. * amendments.txt
  583. * zebra.txt
  584. * alphanum.txt
  585. * a.txt
  586. * stars.txt
  587. - Found mismatch at character in location 1
  588. - Character from stars.txt is 2a
  589. - Missing character from student
  590. - First 16 bytes of student : 2a
  591. - First 16 bytes of stars.txt : 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a
  592. * couscous.txt
  593. - Found mismatch at character in location 4
  594. - Character from couscous.txt is 63
  595. - Missing character from student
  596. - First 16 bytes of student : 63 6f 75 73
  597. - First 16 bytes of couscous.txt : 63 6f 75 73 63 6f 75 73
  598. ==> FAILED
  599.  
  600. Test 3: check that decode(encode()) = original
  601. * cadabra.txt
  602. * amendments.txt
  603. * zebra.txt
  604. * alphanum.txt
  605. * a.txt
  606. * stars.txt
  607. - Found mismatch at character in location 1
  608. - Character from stars.txt is 2a
  609. - Missing character from student
  610. - First 16 bytes of student : 2a
  611. - First 16 bytes of stars.txt : 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a
  612. * couscous.txt
  613. - Found mismatch at character in location 4
  614. - Character from couscous.txt is 63
  615. - Missing character from student
  616. - First 16 bytes of student : 63 6f 75 73
  617. - First 16 bytes of couscous.txt : 63 6f 75 73 63 6f 75 73
  618. ==> FAILED
  619.  
  620. Test 4: encode() on binary inputs
  621. * us.gif
  622. * CS_bricks.jpg
  623. * rand10K.bin
  624. ==> passed
  625.  
  626. Test 5: decode() on binary inputs
  627. * us.gif
  628. * CS_bricks.jpg
  629. * rand10K.bin
  630. ==> passed
  631.  
  632. Test 6: check that decode(encode()) = original on binary inputs
  633. * us.gif
  634. * CS_bricks.jpg
  635. * rand10K.bin
  636. ==> passed
  637.  
  638. Test 7: calling close() or flush() in encode()
  639. * amendments.txt
  640. ==> passed
  641.  
  642. Test 8: calling close() or flush() in decode()
  643. * amendments.txt
  644. ==> passed
  645.  
  646. Test 9: encode() on large inputs
  647. * rand100K.bin
  648. * world192.txt
  649. ==> passed
  650.  
  651. Test 10: decode() on large inputs
  652. * rand100K.bin
  653. * world192.txt
  654. ==> passed
  655.  
  656. Test 11: check that decode(encode()) = original on large inputs
  657. * rand100K.bin
  658. * world192.txt
  659. ==> passed
  660.  
  661.  
  662. Total: 10/12 tests passed!
  663.  
  664. ================================================================
  665.  
  666. ******************************************************************************
  667. * memory
  668. ******************************************************************************
  669.  
  670. Computing memory of CircularSuffixArray
  671. *-----------------------------------------------------------
  672. Running 10 total tests.
  673.  
  674. Memory usage of a CircularSuffixArray with a random string of length N.
  675. Maximum allowed memory is 25x the reference.
  676.  
  677. N student (bytes) reference (bytes) ratio
  678. -----------------------------------------------------------------------
  679. => passed 10 96 96 1.00
  680. => passed 20 136 136 1.00
  681. => passed 50 256 256 1.00
  682. => passed 100 456 456 1.00
  683. => passed 200 856 856 1.00
  684. => passed 500 2056 2056 1.00
  685. => passed 1000 4056 4056 1.00
  686. => passed 2000 8056 8056 1.00
  687. => passed 4000 16056 16056 1.00
  688. => passed 8000 32056 32056 1.00
  689. ==> 10/10 tests passed
  690.  
  691. Total: 10/10 tests passed!
  692.  
  693. Estimated student memory (bytes) = 4.00 N + 56.00 (R^2 = 1.000)
  694. Estimated reference memory (bytes) = 4.00 N + 56.00 (R^2 = 1.000)
  695. ================================================================
  696.  
  697.  
  698.  
  699. ******************************************************************************
  700. * timing
  701. ******************************************************************************
  702.  
  703. Timing CircularSuffixArray
  704. *-----------------------------------------------------------
  705. Tests 1-13: Timing constructor with random ASCII strings of length N
  706. Max allowed time per constructor call is 10 seconds and <= 3x reference.
  707.  
  708. N student reference ratio
  709. ---------------------------------------------------
  710. => passed 1000 0.05 0.00 15.67
  711. => passed 2000 0.01 0.01 1.00
  712. => passed 4000 0.03 0.02 1.43
  713. => passed 8000 0.03 0.03 0.87
  714. => passed 16000 0.06 0.05 1.12
  715. => passed 32000 0.05 0.02 2.94
  716. => passed 64000 0.05 0.01 3.50
  717. => passed 128000 0.08 0.03 2.65
  718. => passed 256000 0.18 0.07 2.61
  719. => passed 512000 0.29 0.14 1.98
  720. => passed 1024000 0.59 0.31 1.89
  721. => passed 2048000 1.19 0.72 1.67
  722. => passed 4096000 3.42 1.66 2.06
  723.  
  724. Estimated runtime (using last 6 measurements) = 4.12e-07 * N^1.03 (R^2 = 0.99)
  725.  
  726.  
  727. Tests 14-26: Timing constructor with first N character of dickens.txt
  728. Max allowed time per constructor call is 10 seconds and <= 3x reference.
  729.  
  730. N student reference ratio
  731. ---------------------------------------------------
  732. => passed 1000 0.00 0.00 -
  733. => passed 2000 0.00 0.00 2.00
  734. => passed 4000 0.00 0.00 4.00
  735. => passed 8000 0.01 0.00 5.00
  736. => passed 16000 0.01 0.00 2.67
  737. => passed 32000 0.01 0.01 2.00
  738. => passed 64000 0.03 0.02 1.65
  739. => passed 128000 0.05 0.04 1.50
  740. => passed 256000 0.10 0.07 1.42
  741. => passed 512000 0.21 0.16 1.32
  742. => passed 1024000 0.44 0.34 1.31
  743. => passed 2048000 1.06 0.72 1.47
  744. => passed 4096000 2.41 1.61 1.49
  745.  
  746. Estimated runtime (using last 6 measurements) = 1.13e-07 * N^1.10 (R^2 = 1.00)
  747.  
  748.  
  749. Running 26 total tests.
  750.  
  751. Total: 26/26 tests passed!
  752.  
  753. ================================================================
  754.  
  755.  
  756.  
  757. Timing MoveToFront
  758. *-----------------------------------------------------------
  759. Running 26 total tests.
  760.  
  761. Tests 1-13: Timing encode() with first N character of dickens.txt
  762. Max allowed time is 10 seconds and <= 2x reference.
  763.  
  764. N student reference ratio
  765. ---------------------------------------------------
  766. => passed 1000 0.01 0.00 4.67
  767. => passed 2000 0.01 0.00 3.00
  768. => passed 4000 0.02 0.00 4.25
  769. => passed 8000 0.02 0.00 7.00
  770. => passed 16000 0.02 0.01 1.73
  771. => passed 32000 0.01 0.00 2.33
  772. => passed 64000 0.01 0.01 2.00
  773. => passed 128000 0.03 0.01 1.79
  774. => passed 256000 0.05 0.03 1.68
  775. => passed 512000 0.09 0.06 1.62
  776. => passed 1024000 0.17 0.11 1.58
  777. => passed 2048000 0.35 0.22 1.58
  778. => passed 4096000 0.68 0.45 1.53
  779.  
  780. Estimated runtime (using last 6 measurements) = 3.14e-07 * N^0.96 (R^2 = 1.00)
  781.  
  782.  
  783. Tests 14-26: Timing decode() with first N character of dickens.txt
  784. Max allowed time is 10 seconds and <= 2x reference.
  785.  
  786. N student reference ratio
  787. ---------------------------------------------------
  788. => passed 1000 0.00 0.00 -
  789. => passed 2000 0.00 0.00 -
  790. => passed 4000 0.00 0.00 1.00
  791. => passed 8000 0.00 0.00 2.00
  792. => passed 16000 0.00 0.00 1.00
  793. => passed 32000 0.01 0.00 1.67
  794. => passed 64000 0.01 0.01 1.71
  795. => passed 128000 0.02 0.01 1.64
  796. => passed 256000 0.05 0.03 1.48
  797. => passed 512000 0.09 0.06 1.58
  798. => passed 1024000 0.18 0.12 1.56
  799. => FAILED 2048000 0.36 0.14 2.54
  800. => passed 4096000 0.56 0.29 1.95
  801.  
  802. Estimated runtime (using last 6 measurements) = 3.82e-07 * N^0.94 (R^2 = 1.00)
  803.  
  804.  
  805. Total: 25/26 tests passed!
  806.  
  807. ================================================================
  808.  
  809.  
  810.  
  811. ******************************************************************************
  812. * timing (substituting reference CircularSuffixArray.java)
  813. ******************************************************************************
  814.  
  815. Timing BurrowsWheeler
  816. *-----------------------------------------------------------
  817. Running 26 total tests.
  818.  
  819. Tests 1-13: Timing encode() with first N character of dickens.txt
  820. Max allowed time is 10 seconds and <= 2x reference.
  821.  
  822. N student reference ratio
  823. ---------------------------------------------------
  824. => passed 1000 0.02 0.01 3.00
  825. => passed 2000 0.03 0.01 2.64
  826. => passed 4000 0.08 0.01 8.30
  827. => passed 8000 0.03 0.00 6.75
  828. => passed 16000 0.02 0.01 4.20
  829. => passed 32000 0.02 0.01 2.18
  830. => passed 64000 0.03 0.02 1.35
  831. => passed 128000 0.04 0.05 0.80
  832. => passed 256000 0.08 0.09 0.94
  833. => passed 512000 0.18 0.19 0.91
  834. => passed 1024000 0.37 0.42 0.88
  835. => passed 2048000 0.86 0.90 0.96
  836. => passed 4096000 1.89 1.84 1.03
  837.  
  838. Estimated runtime (using last 6 measurements) = 6.25e-08 * N^1.13 (R^2 = 1.00)
  839.  
  840.  
  841. Tests 14-26: Timing decode() with first N character of dickens.txt
  842. Max allowed time is 10 seconds and <= 2x reference.
  843.  
  844. N student reference ratio
  845. ---------------------------------------------------
  846. => passed 1000 0.01 0.00 -
  847. => passed 2000 0.01 0.00 13.00
  848. => passed 4000 0.01 0.00 14.00
  849. => passed 8000 0.02 0.00 10.50
  850. => passed 16000 0.03 0.00 7.50
  851. => passed 32000 0.07 0.00 69.00
  852. => passed 64000 0.03 0.00 10.67
  853. => passed 128000 0.06 0.01 8.00
  854. => passed 256000 0.05 0.01 3.71
  855. => FAILED 512000 0.11 0.03 3.65
  856. => FAILED 1024000 0.51 0.07 7.70
  857. => FAILED 2048000 1.02 0.25 4.16
  858. => FAILED 4096000 2.13 0.72 2.97
  859.  
  860. Estimated runtime (using last 6 measurements) = 3.24e-08 * N^1.18 (R^2 = 0.95)
  861.  
  862.  
  863. Total: 22/26 tests passed!
  864.  
  865. ================================================================
  866.  
  867.  
  868.  
  869.  
  870. *********************************************************
  871. compressing:
  872. *********************************************************
  873. Computing compression of BurrowsWheeler and MoveToFront
  874. CPU limit = 60 seconds
  875.  
  876. cat = size (in bytes) of input file
  877. HUFE = size (in bytes) of Huffman encoding
  878. burrows = size (in bytes) of BWT, MTF, and Huffman encoding (with a * if wrong size)
  879. gzip = size (in bytes) of gzip encoding
  880.  
  881. Data File cat HUFE burrows gzip
  882. -----------------------------------------------------------------
  883.  
  884. abra.txt 12 15 19 39
  885. nomatch.txt 73 153 148 105
  886. world-quarter.txt 622786 393153 166587 187791
  887. world192.txt 2473400 1558717 604601 724606
  888. =================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement