Returns an iterator that will iterate over all data points in the set. The behavior is not defined if one attempts to modify the data set while being iterated. @return an iterator for the data points
()
| 359 | * @return an iterator for the data points |
| 360 | */ |
| 361 | public Iterator<DataPoint> getDataPointIterator() |
| 362 | { |
| 363 | Iterator<DataPoint> iteData = new Iterator<DataPoint>() |
| 364 | { |
| 365 | int cur = 0; |
| 366 | int to = getSampleSize(); |
| 367 | |
| 368 | public boolean hasNext() |
| 369 | { |
| 370 | return cur < to; |
| 371 | } |
| 372 | |
| 373 | public DataPoint next() |
| 374 | { |
| 375 | return getDataPoint(cur++); |
| 376 | } |
| 377 | |
| 378 | public void remove() |
| 379 | { |
| 380 | throw new UnsupportedOperationException("This operation is not supported for DataSet"); |
| 381 | } |
| 382 | }; |
| 383 | |
| 384 | return iteData; |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * Returns the number of data points in this data set |
no test coverage detected