reach feature parity with past parser
This commit is contained in:
parent
5bb015ab69
commit
ce399ac24e
3
f2.go
3
f2.go
|
@ -99,6 +99,9 @@ func joinDists(old_dist Dist, new_dist Dist, op string) (Dist, error) {
|
||||||
switch {
|
switch {
|
||||||
case old_dist.Type == "Lognormal" && new_dist.Type == "Lognormal" && op == "*":
|
case old_dist.Type == "Lognormal" && new_dist.Type == "Lognormal" && op == "*":
|
||||||
return Dist{Type: "Lognormal", Lognormal: multiplyLogDists(old_dist.Lognormal, new_dist.Lognormal), Samples: nil}, nil
|
return Dist{Type: "Lognormal", Lognormal: multiplyLogDists(old_dist.Lognormal, new_dist.Lognormal), Samples: nil}, nil
|
||||||
|
case old_dist.Type == "Lognormal" && new_dist.Type == "Lognormal" && op == "/":
|
||||||
|
tmp_dist := Lognormal{low: 1.0 / new_dist.Lognormal.high, high: 1.0 / new_dist.Lognormal.low}
|
||||||
|
return Dist{Type: "Lognormal", Lognormal: multiplyLogDists(old_dist.Lognormal, tmp_dist), Samples: nil}, nil
|
||||||
default:
|
default:
|
||||||
fmt.Printf("For now, can't do anything besides multiplying lognormals\n")
|
fmt.Printf("For now, can't do anything besides multiplying lognormals\n")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user