Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Commit

Permalink
add Uniform fix
Browse files Browse the repository at this point in the history
  • Loading branch information
btracey committed May 6, 2017
1 parent da9eaf0 commit 9674fcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions distmv/uniform.go
Expand Up @@ -18,11 +18,11 @@ type Bound struct {
type Uniform struct {
bounds []Bound
dim int
src *rand.Source
src *rand.Rand
}

// NewUniform creates a new uniform distribution with the given bounds.
func NewUniform(bnds []Bound, src *rand.Source) *Uniform {
func NewUniform(bnds []Bound, src *rand.Rand) *Uniform {
dim := len(bnds)
if dim == 0 {
panic(badZeroDimension)
Expand All @@ -47,7 +47,7 @@ func NewUniform(bnds []Bound, src *rand.Source) *Uniform {
// NewUnitUniform creates a new Uniform distribution over the dim-dimensional
// unit hypercube. That is, a uniform distribution where each dimension has
// Min = 0 and Max = 1.
func NewUnitUniform(dim int, src *rand.Source) *Uniform {
func NewUnitUniform(dim int, src *rand.Rand) *Uniform {
if dim <= 0 {
panic(nonPosDimension)
}
Expand Down

0 comments on commit 9674fcb

Please sign in to comment.