diff --git a/dev/custom/custom-addons/index.html b/dev/custom/custom-addons/index.html index 96889eb7f..6d36db803 100644 --- a/dev/custom/custom-addons/index.html +++ b/dev/custom/custom-addons/index.html @@ -21,4 +21,4 @@ end
The goal is to update the AddonCount
structure when we multiply 2 messages. As a result, we need to write a function that allows us to define this behaviour. This function is called multiply_addons
and accepts 5 arguments. In our example this becomes
function multiply_addons(left_addon::AddonCount, right_addon::AddonCount, new_dist, left_dist, right_dist)
return AddonCount(left_addon.count + right_addon.count + 1)
-end
here we add the number of operations from the addons that are being multiplied and we add one (for the current operation). we are aware that this is likely not valid for iterative message passing schemes, but it still serves as a nice example. the left_addon
and right_addon
argument specify the addoncount
objects that are being multiplied. corresponding to these addons, there are the distributions left_dist
and right_dist
, which might contain information for computing the product. the new distribution new_dist ∝ left_dist * right_dist
is also passed along for potentially reusing the result of earlier computations.
For more advanced information check the implementation of the log-scale or memory addons.
Settings
This document was generated with Documenter.jl version 0.27.25 on Wednesday 12 July 2023. Using Julia version 1.9.2.