Skip to content

Commit 458af43

Browse files
committed
fixed errors
1 parent d219b30 commit 458af43

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/Build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
julia-version: ['1.6.1']
1111
julia-arch: [x64]
12-
os: [windows-latest]
12+
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
exclude:
1414
- os: macOS-latest
1515
julia-arch: x86

src/graphicalmodel.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ function graphicalModelTree(system, virtualMean, virtualVariance, root)
408408
row = system.jacobian.rowval[i]
409409
NvariableInRow = system.jacobianTranspose.colptr[row + 1] - system.jacobianTranspose.colptr[row]
410410
if NvariableInRow == 1
411-
meanDirect[col] += z[row] * system.jacobian[row, col] / v[row]
412-
weightDirect[col] += system.jacobian[row, col]^2 / v[row]
411+
meanDirect[col] += system.observation[row] * system.jacobian[row, col] / system.variance[row]
412+
weightDirect[col] += system.jacobian[row, col]^2 / system.variance[row]
413413
else
414414
push!(colForward[col], row)
415415
push!(colBackward[col], row)

src/inferencetree.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function forwardFactorVariable(gbp::GraphicalModelTree)
3838
gbp.inference.fromFactor[gbp.graph.passFactorVariable] = factor
3939
gbp.inference.toVariable[gbp.graph.passFactorVariable] = variable
4040

41-
Mrow = z[factor]; Vrow = v[factor]
41+
Mrow = gbp.system.observation[factor]; Vrow = gbp.system.variance[factor]
4242
for j in gbp.graph.incomingToFactor[factor]
4343
coeff = gbp.system.jacobian[gbp.inference.toFactor[j], gbp.inference.fromVariable[j]]
4444
Mrow -= coeff * gbp.inference.meanVariableFactor[j]
@@ -105,7 +105,7 @@ function backwardFactorVariable(gbp::GraphicalModelTree)
105105
gbp.inference.fromFactor[gbp.graph.passFactorVariable] = factor
106106
gbp.inference.toVariable[gbp.graph.passFactorVariable] = variable
107107

108-
Mrow = z[factor]; Vrow = v[factor]
108+
Mrow = gbp.system.observation[factor]; Vrow = gbp.system.variance[factor]
109109
for j in gbp.graph.incomingToFactor[factor]
110110
if gbp.inference.fromVariable[j] != variable
111111
coeff = gbp.system.jacobian[factor, gbp.inference.fromVariable[j]]

0 commit comments

Comments
 (0)