Skip to content

Commit

Permalink
all: update for new gonum/stat/distuv Source->Src
Browse files Browse the repository at this point in the history
  • Loading branch information
sbinet committed Dec 20, 2017
1 parent a8b12c8 commit a3118ec
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion fads/btagging.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (tsk *BTagging) Configure(ctx fwk.Context) error {
}

tsk.src = rand.New(rand.NewSource(tsk.seed))
tsk.flat = distuv.Uniform{Min: 0, Max: 1, Source: tsk.src}
tsk.flat = distuv.Uniform{Min: 0, Max: 1, Src: tsk.src}
return err
}

Expand Down
2 changes: 1 addition & 1 deletion fads/calo.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (tsk *Calorimeter) Configure(ctx fwk.Context) error {
}

tsk.src = rand.New(rand.NewSource(tsk.seed))
tsk.gauss = distuv.Normal{Mu: 0, Sigma: 1, Source: tsk.src}
tsk.gauss = distuv.Normal{Mu: 0, Sigma: 1, Src: tsk.src}
return err
}

Expand Down
2 changes: 1 addition & 1 deletion fads/efficiency.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (tsk *Efficiency) Configure(ctx fwk.Context) error {
func (tsk *Efficiency) StartTask(ctx fwk.Context) error {
var err error
src := rand.New(rand.NewSource(tsk.seed))
tsk.dist = distuv.Uniform{Min: 0, Max: 1, Source: src}
tsk.dist = distuv.Uniform{Min: 0, Max: 1, Src: src}
return err
}

Expand Down
2 changes: 1 addition & 1 deletion fads/energy_smearing.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (tsk *EnergySmearing) Process(ctx fwk.Context) error {

// apply smearing
tsk.srcmu.Lock()
smearEne := distuv.Normal{Mu: ene, Sigma: tsk.smear(eta, ene), Source: tsk.src}
smearEne := distuv.Normal{Mu: ene, Sigma: tsk.smear(eta, ene), Src: tsk.src}
ene = smearEne.Rand()
tsk.srcmu.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion fads/momentum_smearing.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (tsk *MomentumSmearing) Process(ctx fwk.Context) error {

// apply smearing
tsk.srcmu.Lock()
smearPt := distuv.Normal{Mu: pt, Sigma: tsk.smear(pt, eta) * pt, Source: tsk.src}
smearPt := distuv.Normal{Mu: pt, Sigma: tsk.smear(pt, eta) * pt, Src: tsk.src}
pt = smearPt.Rand()
tsk.srcmu.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion fads/tautagging.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (tsk *TauTagging) Configure(ctx fwk.Context) error {
}

tsk.src = rand.New(rand.NewSource(tsk.seed))
tsk.flat = distuv.Uniform{Min: 0, Max: 1, Source: tsk.src}
tsk.flat = distuv.Uniform{Min: 0, Max: 1, Src: tsk.src}
return err
}

Expand Down
6 changes: 3 additions & 3 deletions fit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func ExampleH1D_gaussian(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: mean,
Sigma: sigma,
Source: rand.New(rand.NewSource(0)),
Mu: mean,
Sigma: sigma,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down
6 changes: 3 additions & 3 deletions fit/hist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func ExampleH1D_gaussian(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: mean,
Sigma: sigma,
Source: rand.New(rand.NewSource(0)),
Mu: mean,
Sigma: sigma,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down
6 changes: 3 additions & 3 deletions hbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func ExampleH1D() {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down
6 changes: 3 additions & 3 deletions hbook/h1d_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func ExampleH1D() {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down
12 changes: 6 additions & 6 deletions hplot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func ExampleH1D(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down Expand Up @@ -91,9 +91,9 @@ func ExampleTiledPlot(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

newHist := func(p *hplot.Plot) {
Expand Down
12 changes: 6 additions & 6 deletions hplot/h1d_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func ExampleH1D(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down Expand Up @@ -79,9 +79,9 @@ func ExampleH1D_toPDF(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down
18 changes: 9 additions & 9 deletions hplot/hplot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ func Example_subplot() {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

// Draw some random values from the standard
Expand Down Expand Up @@ -147,9 +147,9 @@ func Example_diffplot() {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

hist1 := hbook.NewH1D(20, -4, +4)
Expand Down Expand Up @@ -251,9 +251,9 @@ func Example_latexplot() {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

hist := hbook.NewH1D(20, -4, +4)
Expand Down
6 changes: 3 additions & 3 deletions hplot/tiledplot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func ExampleTiledPlot(t *testing.T) {

// Create a normal distribution.
dist := distuv.Normal{
Mu: 0,
Sigma: 1,
Source: rand.New(rand.NewSource(0)),
Mu: 0,
Sigma: 1,
Src: rand.New(rand.NewSource(0)),
}

newHist := func(p *hplot.Plot) {
Expand Down

0 comments on commit a3118ec

Please sign in to comment.