Closed afwlehmann closed 13 years ago
Incorporated. Thanks for taking a crack at an IO API. It's a good first step, but eventually the IO API will look more like (or actually just use) the scalanlp-data project's serialization API. I've included your stuff for now, but it'll get swapped out eventually.
Adapted logSum and logDiff such that they have the same consistent behavior w.r.t. the (extended) logarithm of 0 represented (also before) by Double.NegativeInfinity.
Wrote unit tests to assure the correct behavior.
2nd commit fixes a bug that I accidentally introduced in the first commit.
Corresponding to the addition of reduceLeft by Daniel, I added reduceRight, foldLeft and foldRight. However, instead of using own implementations I think it might be advantageous to use the iterator's supplied methods and only provide appropriate proxies. If you feel this is not what you want please make sure that reduceLeft throws an UnsupportedOperationException in case of an empty dataset (so does Scala's stdlib, e.g. List.empty[Double] reduceLeft (+)).
Added load and store facilities for matrices.