Ensure that it is possible to use the same vector for both in and output in the methods by writing to the output vector after all inputs were read.