|
I'm in the process of adding some functionality to deal with Levy processes
which involves implementing fast fourier transforms and the ability to deal
with characteristic functions and PIDE's.
The question I have is that these functions require complex arrays and I was
wondering the best way of implementing those. The thought occurs to me that
we can create an ArrayTemplate class and then
typedef ArrayTemplate<Real> Array
typedef ArrayTemplate<complex<Real> > ComplexArray
Alternatively one can to
class ComplexArray {
Array real;
Array imaginary;
}
Or perhaps
template <class T>
class ComplexTemplate {
T real;
T imaginary;
};
typedef ComplexTemplate<Array> ComplexArray;
Thoughts?
|