Solvers are now data types and are differentiated from each other using the template pattern; there is an abstract iterative_solver data type, from which the cg_solver data type inherits and overrides methods