Skip to content

Commit 6e8c146

Browse files
committed
Add more comment
1 parent bf00ca1 commit 6e8c146

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/contexts/init.jl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,21 @@ function tilde_assume!!(
317317
# is that the transform used by `VectorWithRanges` is `from_linked_VEC_transform`,
318318
# which is NOT the same as `inverse(link_transform)` (because there is an additional
319319
# vectorisation step). We need `init` and `tilde_assume!!` to share this information
320-
# but it's not clear right now how to do this. In my opinion, the most productive
321-
# way forward would be to clean up the behaviour of bijectors so that we can have a
322-
# clean separation between the linking and vectorisation parts of it. That way, `x`
323-
# can either be unlinked, unlinked vectorised, linked, or linked vectorised, and
324-
# regardless of which it is, we should only need to apply at most one linking and
325-
# one vectorisation transform.
320+
# but it's not clear right now how to do this. In my opinion, there are a couple of
321+
# potential ways forward:
322+
#
323+
# 1. Just remove metadata entirely so that there is never any need to construct
324+
# a linked vectorised value again. This would require us to use VAIMAcc as the only
325+
# way of getting values. I consider this the best option, but it might take a long
326+
# time.
327+
#
328+
# 2. Clean up the behaviour of bijectors so that we can have a complete separation
329+
# between the linking and vectorisation parts of it. That way, `x` can either be
330+
# unlinked, unlinked vectorised, linked, or linked vectorised, and regardless of
331+
# which it is, we should only need to apply at most one linking and one
332+
# vectorisation transform. Doing so would allow us to remove the first call to
333+
# `with_logabsdet_jacobian`, and instead compose and/or uncompose the
334+
# transformations before calling `with_logabsdet_jacobian` once.
326335
y, -inv_logjac + fwd_logjac
327336
else
328337
x, -inv_logjac

0 commit comments

Comments
 (0)