[Distr-commits] r1414 - in branches/distr-2.9/pkg/distr: . R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jul 20 14:53:27 CEST 2023
Author: ruckdeschel
Date: 2023-07-20 14:53:26 +0200 (Thu, 20 Jul 2023)
New Revision: 1414
Modified:
branches/distr-2.9/pkg/distr/DESCRIPTION
branches/distr-2.9/pkg/distr/R/bAcDcLcDistribution.R
branches/distr-2.9/pkg/distr/inst/NEWS
Log:
[distr-2.9 branch] fixed bug detected by Christoph Dalitz <christoph.dalitz at hs-niederrhein.de>
when multiplying DiscreteDistributions, the positive and negative parts of
which are Dirac Distributions, .finSupport was not returned of length 2
(as needed)...
Modified: branches/distr-2.9/pkg/distr/DESCRIPTION
===================================================================
--- branches/distr-2.9/pkg/distr/DESCRIPTION 2023-07-20 08:17:30 UTC (rev 1413)
+++ branches/distr-2.9/pkg/distr/DESCRIPTION 2023-07-20 12:53:26 UTC (rev 1414)
@@ -1,6 +1,6 @@
Package: distr
Version: 2.9.3
-Date: 2022-11-14
+Date: 2023-07-20
Title: Object Oriented Implementation of Distributions
Description: S4-classes and methods for distributions.
Authors at R: c(person("Florian", "Camphausen", role="ctb", comment="contributed as student in
Modified: branches/distr-2.9/pkg/distr/R/bAcDcLcDistribution.R
===================================================================
--- branches/distr-2.9/pkg/distr/R/bAcDcLcDistribution.R 2023-07-20 08:17:30 UTC (rev 1413)
+++ branches/distr-2.9/pkg/distr/R/bAcDcLcDistribution.R 2023-07-20 12:53:26 UTC (rev 1414)
@@ -36,7 +36,11 @@
e12pp.f <- discretePart(e1DC$pos$D)@.finSupport[2] &
discretePart(e2DC$pos$D)@.finSupport[2]
d12pp <- discretePart(e12pp)
- d12pp at .finSupport <- e12pp.f
+ ## 20230720: detected by Christoph Dalitz <christoph.dalitz at hs-niederrhein.de>
+ ## concerns lines 43, 53, 63, and 76
+ ## .finSupport must a vector of length 2,
+ ## pops up if all e12pp, e12pm, e12mp, e12mm are Dirac distributions
+ d12pp at .finSupport <- c(TRUE,e12pp.f)
discretePart(e12pp) <- d12pp
e12mm <- if(w12mm>ep)
@@ -46,7 +50,7 @@
e12mm.f <- discretePart(e1DC$neg$D)@.finSupport[1]&
discretePart(e2DC$neg$D)@.finSupport[1]
d12mm <- discretePart(e12mm)
- d12mm at .finSupport <- e12mm.f
+ d12mm at .finSupport <- c(TRUE,e12mm.f)
discretePart(e12mm) <- d12mm
e12pm <- if(w12pm>ep)
@@ -56,7 +60,7 @@
e12pm.f <- discretePart(e1DC$pos$D)@.finSupport[2] &
discretePart(e2DC$neg$D)@.finSupport[1]
d12pm <- discretePart(e12pm)
- d12pm at .finSupport <- e12pm.f
+ d12pm at .finSupport <- c(e12pm.f,TRUE)
discretePart(e12pm) <- d12pm
if(identical(e1,e2)){
@@ -69,7 +73,7 @@
e12mp.f <- discretePart(e1DC$neg$D)@.finSupport[1] &
discretePart(e2DC$pos$D)@.finSupport[2]
d12mp <- discretePart(e12mp)
- d12mp at .finSupport <- e12mp.f
+ d12mp at .finSupport <- c(e12mp.f,TRUE)
discretePart(e12mp) <- d12mp
}
e12pm <- .del0dmixfun(e12pm)
Modified: branches/distr-2.9/pkg/distr/inst/NEWS
===================================================================
--- branches/distr-2.9/pkg/distr/inst/NEWS 2023-07-20 08:17:30 UTC (rev 1413)
+++ branches/distr-2.9/pkg/distr/inst/NEWS 2023-07-20 12:53:26 UTC (rev 1414)
@@ -8,6 +8,16 @@
information)
##############
+v 2.9.3
+##############
+bug fixes
++ detected by Christoph Dalitz <christoph.dalitz at hs-niederrhein.de>
+ when multiplying DiscreteDistributions, the positive and negative parts of
+ which are Dirac Distributions, .finSupport was not returned of length 2
+ (as needed),
+
+
+##############
v 2.9.2
##############
under the hood:
More information about the Distr-commits
mailing list