The C++ Language: Numerical Methods
Modularize
- The code should be designed to separate physics or model from numerical methods.
Speed
vectors
are convenient but slow. 1- Do not copy arrays if not necessary. The example would be for a function return. Most of the time, we can pass the pointer of an array to the function and update the array itself without copying anything and no return is needed at all.
- inline function.
- Use
namespace
instead of class if no data structure is stored in it.
Refs
Planted:
by L Ma;
References:
Similar Articles:
wiki/programming-languages/cpp/numerical
Links to:L Ma (2018). 'The C++ Language: Numerical Methods', Datumorphism, 03 April. Available at: https://datumorphism.leima.is/wiki/programming-languages/cpp/numerical/.