Hi Juzhe, looks good from my side, thanks. While going through it I thought of some related cases that we could still handle differently but I didn't bother to formalize them for now. Most likely we already handle them in the shortest way anyway. I'm going to check on that when I find some time at some point.
In the tests I noticed that most (all?) of them are pretty evenly split (half/half) between first and second source vector. Wouldn't we want some more variety there? Still OK without that IMHO. Regards Robin