Open dimy-x opened 7 months ago
Hello guys,
If we have the following input data vectors (same size dimension)
std::vector times = {1, 2, 1, 3, 4, 1, 2, 3, 4, 5}; std::vector doubles = {1.1, 2.1, 1.1001, 3.1, 4.1, 1.1, 2.1, 3.1, 4.1, 5.1}; std::vector values = {"s1", "s2", "s1s1", "s3", "s4", "s1", "s2", "s3", "s4", "s5"};
I want to modify the original three vectors by removing the duplicates. I consider that there is duplicate if times[n] = times[k] && doubles[n] = doubles[k]
Is there an elegant and effitient solution with the range-v3 library ?
Many thanks in advance, dimy-x
Hello guys,
If we have the following input data vectors (same size dimension)
std::vector times = {1, 2, 1, 3, 4, 1, 2, 3, 4, 5};
std::vector doubles = {1.1, 2.1, 1.1001, 3.1, 4.1, 1.1, 2.1, 3.1, 4.1, 5.1};
std::vector values = {"s1", "s2", "s1s1", "s3", "s4", "s1", "s2", "s3", "s4", "s5"};
I want to modify the original three vectors by removing the duplicates. I consider that there is duplicate if times[n] = times[k] && doubles[n] = doubles[k]
Is there an elegant and effitient solution with the range-v3 library ?
Many thanks in advance, dimy-x