Some useful classes with applications
Joseph F. Boudreau, Eric S. Swanson · 2017
Abstract In this learn-by-doing chapter, some widely available classes are introduced and employed to solve problems in the physical sciences. By using linear algebra classes from the Eigen package, collection classes from the C++ standard library, and function classes from the authors’ own Qat libraries, readers become familiar some classes that can be effectively applied in physics computation and which are illustrative of good class design. Practice obtained in using these classes is intended to be helpful in understanding the more formal treatment of C++ concepts in subsequent chapters. Physics applications include familiar problems such as coupled oscillations and quantum mechanical scattering in one dimension from piecewise-constant potentials, for which computational methods are necessary in all but the simplest cases. Visualization of functions with the Qt-based Qat library is also introduced.