Examples
Overview
In this section, we present several examples using the Rogue Wave Essential Math Module class library. All of the files needed to build and run the examples are located in the following directory:
buildspace\examples\math
Table 3 describes the Essential Math Module examples. If you are reading this manual online, you can click on the example to take you to its code in this chapter.
Table 3 – The Essential Math Module examples 
Filename
Link to Section
Example Description
example1.cpp
Uses class RWMathVec<double> to do simple statistics with double precision vectors
example2.cpp
Uses matrix classes to multiply a double precision matrix by a vector
example3.cpp
Uses the complex FFT server class
example4.cpp
Illustrates type conversion
example5.cpp
Uses member functions saveOn() and restoreFrom() for data storage and retrieval
example6.cpp
Shows how a CosVec class may be derived from the class RWMathVec<double>
example7.cpp
Uses class RWGenFact<T> to do linear algebra with double precision matrices
example8.cpp
Uses multiple inheritance to do runtime binding
example9.cpp
Demonstrates how to convert a function into a function object, for use as the template parameter to the random number generator classes in Math.h++
example10.cpp
Shows how to use a user-defined type