ndarray_histogram/lib.rs
1//! Histogram support for n-dimensional arrays ([`ndarray`]).
2//!
3//! # Features
4//!
5//! * `rayon` for parallel sorting and bulk-selection as part of histogram computations.
6
7#![deny(
8 missing_docs,
9 rustdoc::broken_intra_doc_links,
10 rustdoc::missing_crate_level_docs
11)]
12#![allow(clippy::tabs_in_doc_comments)]
13#![cfg_attr(docsrs, feature(doc_auto_cfg))]
14
15pub use crate::histogram::HistogramExt;
16pub use crate::maybe_nan::{MaybeNan, MaybeNanExt, N32, N64, O32, O64, n32, n64, o32, o64};
17pub use crate::quantile::{Quantile1dExt, QuantileExt, interpolate};
18
19pub use ndarray;
20
21#[macro_use]
22mod private {
23 /// This is a public type in a private module, so it can be included in
24 /// public APIs, but other crates can't access it.
25 pub struct PrivateMarker;
26
27 /// Defines an associated function for a trait that is impossible for other
28 /// crates to implement. This makes it possible to add new associated
29 /// types/functions/consts/etc. to the trait without breaking changes.
30 macro_rules! private_decl {
31 () => {
32 /// This method makes this trait impossible to implement outside of
33 /// `ndarray-stats` so that we can freely add new methods, etc., to
34 /// this trait without breaking changes.
35 ///
36 /// We don't anticipate any other crates needing to implement this
37 /// trait, but if you do have such a use-case, please let us know.
38 ///
39 /// **Warning** This method is not considered part of the public
40 /// API, and client code should not rely on it being present. It
41 /// may be removed in a non-breaking release.
42 fn __private__(&self, _: crate::private::PrivateMarker);
43 };
44 }
45
46 /// Implements the associated function defined by `private_decl!`.
47 macro_rules! private_impl {
48 () => {
49 fn __private__(&self, _: crate::private::PrivateMarker) {}
50 };
51 }
52}
53
54pub mod errors;
55pub mod histogram;
56mod maybe_nan;
57mod quantile;