MCPcopy Index your code
hub / github.com/EdwardRaff/JSAT / getDataPointIterator

Method getDataPointIterator

JSAT/src/jsat/DataSet.java:361–385  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 1

getOnlineColumnStatsMethod · 0.95

Calls 1

getSampleSizeMethod · 0.95

Tested by

no test coverage detected