|
|
// --------------------------------------------------- // Reduce counting sample when size exceeds threshold // --------------------------------------------------- if ( size(S) > threshold ) { ... } |
This will not guarantee to reduce the size. I used the construct to explain the concept.
The correct code is:
// --------------------------------------------------- // Reduce counting sample when size exceeds threshold // --------------------------------------------------- while ( size(S) > threshold ) { ... } |
The format of the data file is:
datapoint1 datapoint2 datapoint3 datapoint4 ... |
/home/cs584001/turnin Makefile hw2(If you use Java, you still need a Makefile. Let me know if you don't know how to create a Makefile)
/home/cs584001/turnin Filename hw2-?where "?" is a number from 0 to 9.