merge_complementary_vectors function

Merge several complementary vectors into one.