You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This result did not equal to what I expected; The result table at p.45 of X, Y, Z can be obtained by replacing 0 -> 1, 1-> 2, and 2->3 in our definition. After checking the code of assignment in Algorithm 2.1, I'm thinking that this result is from 1:v.m of
functionassignments(vars::AbstractVector{Variable})
names = [var.name for var in vars]
returnvec([Assignment(n=>v for (n,v) inzip(names, values)) for values inproduct((1:v.m for v in vars)...)])
end
So, some parts of examples are a bit confusing for me. I know that the value in Julia is often assumed as 1-origin, but for probabilities we often uses {0,1} and I'm sorry I have no answer about this point. However, some remarks or comments are useful to learn deeply from the textbook with Julia.
The text was updated successfully, but these errors were encountered:
Thanks for filing this issue! To make the algorithms simpler, we assume all variables can take on values 1:n. If you want something else, then you'd have to wrap the code to do the appropriate mapping. See notes in Example 2.5.
Thanks @mykelk for your great work! I have overlooked some notes in Sec.2, but now I can confirm that the code works (maybe comments in Algorithm 2.1 rather than Example 2.5?).
I tried to run Example 3.1 based on codes in Sec. 2 and Sec.3 as follows:
and I got the below result after applying Base.:* function:
This result did not equal to what I expected; The result table at p.45 of X, Y, Z can be obtained by replacing 0 -> 1, 1-> 2, and 2->3 in our definition. After checking the code of assignment in Algorithm 2.1, I'm thinking that this result is from 1:v.m of
So, some parts of examples are a bit confusing for me. I know that the value in Julia is often assumed as 1-origin, but for probabilities we often uses {0,1} and I'm sorry I have no answer about this point. However, some remarks or comments are useful to learn deeply from the textbook with Julia.
The text was updated successfully, but these errors were encountered: