Skip to content

Histogram (revisited) #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 146 commits into from
Nov 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
03a3d08
Adding skeleton provided by jturner
LukeMathWalker Oct 9, 2018
d1e20bf
Added some IDE-related files
LukeMathWalker Oct 9, 2018
3cdb3ba
Adding missing pieces - now it compiles
LukeMathWalker Oct 9, 2018
3eedbbc
Reusing code of from<Vec> in from<Array1>
Oct 13, 2018
bbaee7d
Fixed bugs, better method names, exported methods needed for doc tests.
Oct 13, 2018
7b19061
Reorganized code in a submodule
Oct 14, 2018
acea0a6
Created Bins struct - split code between Bins and Edges
Oct 14, 2018
b8624a0
Added get method to Bins
Oct 14, 2018
cfc59c8
Implemented IntoIterator for Edges
Oct 14, 2018
e8535a4
Added doc tests for all methods of Edges
Oct 14, 2018
837cb67
Fixed typos
Oct 14, 2018
082ed40
All Bins' methods have been documented
Oct 14, 2018
3897b70
Fixed typo
Oct 14, 2018
6f8d28f
Better formulation in docs
Oct 14, 2018
9b19ad6
Fixed typo, better wording
Oct 14, 2018
d93c5d0
Added short docstring to BinNotFound
LukeMathWalker Oct 18, 2018
f7f9dc7
Improved docstring for `get`
LukeMathWalker Oct 18, 2018
6419da2
HistogramExt trait has been added with a minimal signature
LukeMathWalker Oct 18, 2018
94d71a2
Removed trait parameter D from HistogramExt trait signature
LukeMathWalker Oct 18, 2018
41cc373
Added docstrings to histogram method
LukeMathWalker Oct 18, 2018
0365480
Implemented histogram method; renamed edges to bins in HistogramCount…
LukeMathWalker Oct 18, 2018
6420b3f
Exporting HistogramExt trait
LukeMathWalker Oct 18, 2018
f728a63
Added ndim field to HistogramCounts to implement dimensionality check…
LukeMathWalker Oct 18, 2018
62c46e8
Improving docstring
LukeMathWalker Oct 18, 2018
068c893
Added docstring to Bins::new
LukeMathWalker Oct 18, 2018
6d0f7b6
Removed trailing white line at the end of the file
LukeMathWalker Oct 18, 2018
c03945e
Checked Edges::from methods
LukeMathWalker Oct 18, 2018
71c58ff
Checked right-exclusiveness and left-inclusiveness
LukeMathWalker Oct 18, 2018
992f969
Edges are now duplicates-free
LukeMathWalker Oct 23, 2018
1ac254c
Removed ndim from the HistogramCounts struct; created a ndim method i…
LukeMathWalker Oct 23, 2018
4e39913
HistogramCounts renamed to Histogram
LukeMathWalker Oct 23, 2018
5315286
Added comment to get explaining why it's not implemented using the In…
LukeMathWalker Oct 23, 2018
810d25e
Fixed docs
LukeMathWalker Oct 23, 2018
89a4af9
Added docs to histogram submodule; exported HistogramExt as top level…
LukeMathWalker Oct 23, 2018
f3f3835
Revised docstring for HistogramExt
LukeMathWalker Oct 23, 2018
a9dbb1f
Added quickcheck test for deduplication
LukeMathWalker Oct 23, 2018
d5266c1
Added test for out of bounds access to bins using get
LukeMathWalker Oct 23, 2018
728556c
Added as_view method to Histogram
LukeMathWalker Oct 23, 2018
226ea87
Added a doc_test to add_observation
LukeMathWalker Oct 23, 2018
810f74b
Bins and Edges are now clonable
LukeMathWalker Oct 23, 2018
848b61f
add_observation doctest is now green
LukeMathWalker Oct 23, 2018
18d64f3
Added `grid` method to Histogram to access self.bins
LukeMathWalker Oct 23, 2018
a4490a4
Added grid submodule to histogram submodule
LukeMathWalker Oct 25, 2018
f762f63
Added Grid struct
LukeMathWalker Oct 25, 2018
f7fa2de
Replaced bins with grid in Histogram
LukeMathWalker Oct 25, 2018
327cb48
Compilation is green
LukeMathWalker Oct 25, 2018
2425da5
Implement From<Vec<Bins<A>>> for Grid. Tests are green
LukeMathWalker Oct 26, 2018
69710bd
Implement From<Vec<Bins<A>>> for Grid. Tests are green
LukeMathWalker Oct 26, 2018
e1b3d2f
grid.iter renamed to iter_projections
LukeMathWalker Oct 26, 2018
4d5119c
grid.iter renamed to iter_projections
LukeMathWalker Oct 26, 2018
812aff5
index method added to Grid. Histogram.add_observation refactored to u…
LukeMathWalker Oct 26, 2018
29a26f1
Improved docs
LukeMathWalker Oct 26, 2018
38f4063
Added Grid::shape and used it in Histogram constructor
LukeMathWalker Oct 26, 2018
40d294f
Panic is ensured by grid.index method
LukeMathWalker Oct 26, 2018
bd940e7
Added get method to Grid
LukeMathWalker Oct 28, 2018
5623ab9
Testing the whole histogram matrix in doctest, instead of a single entry
LukeMathWalker Oct 28, 2018
6d5c018
Added docstring to Grid
LukeMathWalker Oct 28, 2018
735079e
Added dosctring to Grid::ndim
LukeMathWalker Oct 28, 2018
715e1b6
Added docstring to all method on Grid. Remove iter_projections
LukeMathWalker Oct 28, 2018
b35e376
Ignoring Grid sketches, they are not tests
LukeMathWalker Oct 28, 2018
7147798
Added panics notice on Grid::get
LukeMathWalker Oct 29, 2018
847b955
Re-indexed all docs from 0 instead of 1, for consistency with rust no…
LukeMathWalker Oct 29, 2018
d7839c2
Minor doc fixes
LukeMathWalker Oct 29, 2018
3e4022d
Bugfix in matrixmultiply is now available in ndarray master branch
LukeMathWalker Oct 31, 2018
a28aeab
Adding bins builders
LukeMathWalker Oct 31, 2018
2d4e455
Brittle implementation of quantile_mut for 1d arrays
LukeMathWalker Oct 31, 2018
592f749
Refactored FreedmanDiaconis implementation
LukeMathWalker Nov 1, 2018
5ff4b21
All important bin building strategies are covered
LukeMathWalker Nov 1, 2018
c949d45
Added signature for GridBuilder
LukeMathWalker Nov 7, 2018
3db5054
Implemented from_array for GridBuilder
LukeMathWalker Nov 7, 2018
35f3af0
Implemented build for GridBuilder
LukeMathWalker Nov 7, 2018
cdaf483
GridBuilder is exported as top level struct
LukeMathWalker Nov 7, 2018
ce0180f
Explicitly require a view. Refactored builders to match it
LukeMathWalker Nov 7, 2018
4cbd66d
Added comment to clarify
LukeMathWalker Nov 8, 2018
7bb3509
More docs for Grid
LukeMathWalker Nov 8, 2018
f2bec0e
Added docs to GridBuilder
LukeMathWalker Nov 8, 2018
4f2f96b
Added docs to GridBuilder's method
LukeMathWalker Nov 8, 2018
2c3c590
Renamed BinsBuilder to BinsBuildingStrategy
LukeMathWalker Nov 8, 2018
3dce989
EquiSpaces is private
LukeMathWalker Nov 8, 2018
2d563ab
Added docs to BinsBuildingStrategy
LukeMathWalker Nov 8, 2018
0f05d73
Documented bin_width method
LukeMathWalker Nov 8, 2018
0d14e53
Docs for all strategies
LukeMathWalker Nov 8, 2018
a48afbb
Added detailed docs to all strategies using NumPy as base (almost ver…
LukeMathWalker Nov 8, 2018
af41380
Renamed `builders` submodule to `strategies`
LukeMathWalker Nov 8, 2018
543742d
Errors is not top-level in histogram
LukeMathWalker Nov 8, 2018
1a02954
Documented quantile_mut
LukeMathWalker Nov 8, 2018
eb78f6d
Added docs to QuantileExt1d
LukeMathWalker Nov 8, 2018
7206e72
Return false for failing tests in quickcheck
jturner314 Nov 11, 2018
cc2376d
Return false for failing tests in quickcheck
jturner314 Nov 11, 2018
e11cce7
rust,ignore => text
jturner314 Nov 11, 2018
3139225
rust,ignore => text
jturner314 Nov 11, 2018
3ac076f
Fixed typo
LukeMathWalker Nov 12, 2018
b6efcfa
Added mention of duplicates getting dropped
LukeMathWalker Nov 12, 2018
ca2da4c
Destructure a tuple in one go
LukeMathWalker Nov 12, 2018
5801ee0
All methods in one impl block
LukeMathWalker Nov 12, 2018
2571829
index => index_of; range => range_of
LukeMathWalker Nov 12, 2018
0042c17
indexes => indices_of
LukeMathWalker Nov 12, 2018
803ba61
Clearer inizialization
LukeMathWalker Nov 12, 2018
c2f375b
Using reference instead of view
LukeMathWalker Nov 12, 2018
9a7170b
Dervice Clone, Debug, Eq and PartialEq for all relevant structs
LukeMathWalker Nov 12, 2018
3ea161c
Typo
LukeMathWalker Nov 12, 2018
1b5c8e3
Omitting turbofish notation
LukeMathWalker Nov 12, 2018
872cdbd
Better doc
LukeMathWalker Nov 12, 2018
9e3cc84
No need to use counters
LukeMathWalker Nov 12, 2018
a89daca
Omitting turbofish notation
LukeMathWalker Nov 12, 2018
9bc0daa
Using reference instead of view, index => index_of
LukeMathWalker Nov 12, 2018
5067686
Avoids cloning
LukeMathWalker Nov 12, 2018
fe86055
Shortened imports
LukeMathWalker Nov 12, 2018
e348299
Add note on ignoring points outside the grid
LukeMathWalker Nov 12, 2018
17253e5
Fix doctest
LukeMathWalker Nov 12, 2018
c969265
Better formatting
LukeMathWalker Nov 12, 2018
56873fe
Better formatting
LukeMathWalker Nov 12, 2018
b1ce607
Fix parenthesis
LukeMathWalker Nov 12, 2018
e8b70ee
Fixed docs
LukeMathWalker Nov 12, 2018
b52fa1f
get => index
LukeMathWalker Nov 12, 2018
6ac45f5
Better formatting
LukeMathWalker Nov 12, 2018
eb7d204
Importing macro without macro_use
LukeMathWalker Nov 12, 2018
095b759
Return option instead of Result from index_of
LukeMathWalker Nov 12, 2018
76d60c7
get => index
LukeMathWalker Nov 12, 2018
d21b031
Simplified method body
LukeMathWalker Nov 12, 2018
96632c7
Simplified method body
LukeMathWalker Nov 12, 2018
85cfc26
Simplified method body
LukeMathWalker Nov 12, 2018
3ed4d3a
Silence compiler warning
LukeMathWalker Nov 12, 2018
d265ea0
Using ? syntax
LukeMathWalker Nov 12, 2018
10a5b46
Add Ok(())
LukeMathWalker Nov 12, 2018
42f086a
as_view => counts
LukeMathWalker Nov 12, 2018
3019d9b
Fixed doc tests
LukeMathWalker Nov 12, 2018
8c6411e
Bumped Rust version to 1.30
Nov 12, 2018
f09720c
Reuse quantile_axis_mut implementation
Nov 12, 2018
3f089a4
Convert as_slice to as_array_view
Nov 12, 2018
bddf12c
Fixed broken tests
Nov 12, 2018
9e432de
Added expected grid
LukeMathWalker Nov 13, 2018
f42dcd7
Fixed FD
LukeMathWalker Nov 13, 2018
f6b5dbd
Fixed doctest
LukeMathWalker Nov 13, 2018
004585f
Refactored bin strategies - one extra bin is now added to the right t…
LukeMathWalker Nov 13, 2018
74723f7
Added explanation for extra bin to the docs
LukeMathWalker Nov 13, 2018
a3fc2de
Using an associated type for BinsBuildingStrategy - reduced type para…
LukeMathWalker Nov 13, 2018
5cb53b8
Added panics conditions.
LukeMathWalker Nov 13, 2018
b3c8e0b
Update src/quantile.rs
jturner314 Nov 18, 2018
af4a198
Added test for panic condition
LukeMathWalker Nov 18, 2018
45cea6a
For strategies, ask for a reference instead of a view
LukeMathWalker Nov 18, 2018
fe943e5
Test panics for Sqrt
LukeMathWalker Nov 18, 2018
bd2570b
Test Rice panics
LukeMathWalker Nov 18, 2018
9cfc013
Test Sturges panics
LukeMathWalker Nov 18, 2018
77be941
Test FreedmanDiaconis panics
LukeMathWalker Nov 18, 2018
e66f8a6
Tested Auto panics
LukeMathWalker Nov 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/target
**/*.rs.bk
Cargo.lock

# IDE-related
tags
rusty-tags.vi
.vscode
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ addons:
- libssl-dev
cache: cargo
rust:
- 1.28.0
- 1.30.0
- stable
- beta
- nightly
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ ndarray = "0.12"
noisy_float = "0.1"
num-traits = "0.2"
rand = "0.5"
itertools = { version = "0.7.0", default-features = false }

[dev-dependencies]
quickcheck = "0.7"
ndarray-rand = "0.8"

[patch.crates-io]
ndarray = { git = "https://github.com/jturner314/ndarray.git", branch = "master" }
ndarray = { git = "https://github.com/rust-ndarray/ndarray.git", branch = "master" }
noisy_float = { git = "https://github.com/SergiusIW/noisy_float-rs.git", rev = "c33a94803987475bbd205c9ff5a697af533f9a17" }
matrixmultiply = { git = "https://github.com/jturner314/matrixmultiply.git", rev = "344f4b43c55fcf7b20be20baff38406ebe9afbfb" }
Loading