Returns the corresponding A
Returns the corresponding A
If b is not mapped to an element in the current frame then this will find the element in the most recent frame
Returns the corresponding B
Returns the corresponding B
If a is not mapped to an element in the current frame then this will find the element deeper in the stack, if it exists.
Remove the latest frame of bijection
Remove the latest frame of bijection
Add a new frame of bijection
Add a new frame of bijection
Clears the entire IncrementalBijection
Clears the entire IncrementalBijection
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Return an IncrementalBijection in the other direction
Return an IncrementalBijection in the other direction
The returned bijection remains linked to the original, which means that any push/pop on any of the two bijection should be visible in both, same goes for new mappings added.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Extends a Bijection with incremental (push/pop) features
This maintains a stack of frames, at each frame there is a bijection. When pushing a new frame, the previous mapping are kept, but new mappings only happen in the current frame, which means that on the next pop, only the additional mapping at this frame level will be removed from the structure.
Useful when you have a stack structure for your process and want to be able to do some modification to the bijection and then come back to the original bijection later.