From edcf2059f63ad7e5b5b8a44686f81a4984455716 Mon Sep 17 00:00:00 2001 From: Bryan Andrews Date: Sat, 13 Jul 2024 09:33:09 -0500 Subject: [PATCH] fixing dg --- .../cmu/tetrad/search/score/DegenerateGaussianScore.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/score/DegenerateGaussianScore.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/score/DegenerateGaussianScore.java index 6585819a80..384b35cfbd 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/score/DegenerateGaussianScore.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/score/DegenerateGaussianScore.java @@ -157,13 +157,14 @@ public double localScore(int i, int... parents) { B.addAll(this.embedding.get(i_)); } - int[] parents_ = new int[B.size()]; - for (int i_ = 0; i_ < B.size(); i_++) { - parents_[i_] = B.get(i_); - } for (Integer i_ : A) { + int[] parents_ = new int[B.size()]; + for (int i__ = 0; i__ < B.size(); i__++) { + parents_[i__] = B.get(i__); + } score += this.bic.localScore(i_, parents_); + B.add(i_); } return score;