aws / random-cut-forest-by-aws

An implementation of the Random Cut Forest data structure for sketching streaming data, with support for anomaly detection, density estimation, imputation, and more.
https://github.com/aws/random-cut-forest-by-aws
Apache License 2.0
206 stars 33 forks source link

Update the RCF trait to use Result in return types #336

Closed jotok closed 2 years ago

jotok commented 2 years ago

Currently the library uses asserts and panics when errors are encountered. This change updates the RCF trait to use a Result type instead to allow for error handling (see https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html). In future PRs we will extend this pattern to other modules.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.