-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make Sampler{E} encode the type E of elements which are generated
Before, a call like `rand(mm, Sampler(mm, 1:10), 3)` generated an `Array{Any,1}`, so a way to get the `eltype` of a Sampler is necessary. Instead of changing Sampler -> Sampler{E}, implementing appropriate eltype methods would have been possible, to keep the helper Sampler subtypes more flexible, but it seemed to be simpler this way.
- Loading branch information
Showing
2 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters