-
Notifications
You must be signed in to change notification settings - Fork 28
Commit fcbe35a
authored
Histogram (#9)
* Adding skeleton provided by jturner
* Added some IDE-related files
* Adding missing pieces - now it compiles
* Reusing code of from<Vec> in from<Array1>
* Fixed bugs, better method names, exported methods needed for doc tests.
* Reorganized code in a submodule
* Created Bins struct - split code between Bins and Edges
* Added get method to Bins
* Implemented IntoIterator for Edges
* Added doc tests for all methods of Edges
* Fixed typos
* All Bins' methods have been documented
* Fixed typo
* Better formulation in docs
* Fixed typo, better wording
* Added short docstring to BinNotFound
* Improved docstring for `get`
* HistogramExt trait has been added with a minimal signature
* Removed trait parameter D from HistogramExt trait signature
* Added docstrings to histogram method
* Implemented histogram method; renamed edges to bins in HistogramCounts constructor
* Exporting HistogramExt trait
* Added ndim field to HistogramCounts to implement dimensionality check in add_dimensions
* Improving docstring
* Added docstring to Bins::new
* Removed trailing white line at the end of the file
* Checked Edges::from methods
* Checked right-exclusiveness and left-inclusiveness
* Edges are now duplicates-free
* Removed ndim from the HistogramCounts struct; created a ndim method instead
* HistogramCounts renamed to Histogram
* Added comment to get explaining why it's not implemented using the Index trait for Bins
* Fixed docs
* Added docs to histogram submodule; exported HistogramExt as top level trait
* Revised docstring for HistogramExt
* Added quickcheck test for deduplication
* Added test for out of bounds access to bins using get
* Added as_view method to Histogram
* Added a doc_test to add_observation
* Bins and Edges are now clonable
* add_observation doctest is now green
* Added `grid` method to Histogram to access self.bins
* Added grid submodule to histogram submodule
* Added Grid struct
* Replaced bins with grid in Histogram
* Compilation is green
* Implement From<Vec<Bins<A>>> for Grid. Tests are green
* Implement From<Vec<Bins<A>>> for Grid. Tests are green
* grid.iter renamed to iter_projections
* grid.iter renamed to iter_projections
* index method added to Grid. Histogram.add_observation refactored to use it
* Improved docs
* Added Grid::shape and used it in Histogram constructor
* Panic is ensured by grid.index method
* Added get method to Grid
* Testing the whole histogram matrix in doctest, instead of a single entry
* Added docstring to Grid
* Added dosctring to Grid::ndim
* Added docstring to all method on Grid. Remove iter_projections
* Ignoring Grid sketches, they are not tests
* Added panics notice on Grid::get
* Re-indexed all docs from 0 instead of 1, for consistency with rust notation.
* Minor doc fixes
* Bugfix in matrixmultiply is now available in ndarray master branch
* Adding bins builders
* Brittle implementation of quantile_mut for 1d arrays
* Refactored FreedmanDiaconis implementation
* All important bin building strategies are covered
* Added signature for GridBuilder
* Implemented from_array for GridBuilder
* Implemented build for GridBuilder
* GridBuilder is exported as top level struct
* Explicitly require a view. Refactored builders to match it
* Added comment to clarify
* More docs for Grid
* Added docs to GridBuilder
* Added docs to GridBuilder's method
* Renamed BinsBuilder to BinsBuildingStrategy
* EquiSpaces is private
* Added docs to BinsBuildingStrategy
* Documented bin_width method
* Docs for all strategies
* Added detailed docs to all strategies using NumPy as base (almost verbatim)
* Renamed `builders` submodule to `strategies`
* Errors is not top-level in histogram
* Documented quantile_mut
* Added docs to QuantileExt1d
* Return false for failing tests in quickcheck
Co-Authored-By: LukeMathWalker <[email protected]>
* Return false for failing tests in quickcheck
Co-Authored-By: LukeMathWalker <[email protected]>
* rust,ignore => text
Co-Authored-By: LukeMathWalker <[email protected]>
* rust,ignore => text
Co-Authored-By: LukeMathWalker <[email protected]>
* Fixed typo
* Added mention of duplicates getting dropped
* Destructure a tuple in one go
* All methods in one impl block
* index => index_of; range => range_of
* indexes => indices_of
* Clearer inizialization
* Using reference instead of view
* Dervice Clone, Debug, Eq and PartialEq for all relevant structs
* Typo
* Omitting turbofish notation
* Better doc
* No need to use counters
* Omitting turbofish notation
* Using reference instead of view, index => index_of
* Avoids cloning
* Shortened imports
* Add note on ignoring points outside the grid
* Fix doctest
* Better formatting
* Better formatting
* Fix parenthesis
* Fixed docs
* get => index
* Better formatting
* Importing macro without macro_use
* Return option instead of Result from index_of
* get => index
* Simplified method body
* Simplified method body
* Simplified method body
* Silence compiler warning
* Using ? syntax
* Add Ok(())
* as_view => counts
* Fixed doc tests
* Bumped Rust version to 1.30
* Reuse quantile_axis_mut implementation
* Convert as_slice to as_array_view
* Fixed broken tests
* Added expected grid
* Fixed FD
* Fixed doctest
* Refactored bin strategies - one extra bin is now added to the right to make sure the maximum does not get dropped
* Added explanation for extra bin to the docs
* Using an associated type for BinsBuildingStrategy - reduced type parameters from 2 to 1
* Added panics conditions.
* Update src/quantile.rs
Co-Authored-By: LukeMathWalker <[email protected]>
* Added test for panic condition
* For strategies, ask for a reference instead of a view
* Test panics for Sqrt
* Test Rice panics
* Test Sturges panics
* Test FreedmanDiaconis panics
* Tested Auto panics1 parent cee262a commit fcbe35aCopy full SHA for fcbe35a
File tree
11 files changed
+1410
-4
lines changedFilter options
- src
- histogram
11 files changed
+1410
-4
lines changed.gitignore
Copy file name to clipboard+5
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
+1-1
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
|
+1
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
|
0 commit comments