I'm implementing a long algorithm (about 500 lines of C++). The algorithm consists currently of about 10 different methods. Each method I have to hand over multiple data-structures as parameters, which are calling each other. Only one method is can (should) be used by the end-consumer.
I was wondering if a class would be better. This way I can hold all data-structures in one place (as instance variables) and can access them from each method without passing all these as parameters.
A typical usage would be:
MyAlg myalg_instance(input_param1, input_param2, pointer to computation_results);
myalg_instance.do();
And afterwards the instance is useless and can be deleted. Is this patter good? Are there better patterns?