seal::Complex< T > Class Template Reference

#include <complex.h>

List of all members.

Public Member Functions

 Complex (void)
 Complex (const Complex< T > &c)
template<typename Tr, typename Ti>
 Complex (const Tr re, const Ti im=0)
 ~Complex ()
T & real ()
T & imag ()
const T & real () const
const T & imag () const


Detailed Description

template<typename T>
class seal::Complex< T >

A template class which encapsulates a complex number type. Various arithmetic operators are supported on the objects of type this class.

Constructor & Destructor Documentation

template<typename T>
seal::Complex< T >::Complex ( void   )  [inline]

Default constructor. The real and imaginary parts are initialised to unknown values.

template<typename T>
seal::Complex< T >::Complex ( const Complex< T > &  c  )  [inline]

Copy constructor.

template<typename T>
template<typename Tr, typename Ti>
seal::Complex< T >::Complex ( const Tr  re,
const Ti  im = 0 
) [inline]

The constructor which initialises the real and imaginary parts as desired by the client.

Parameters:
re The desired real part
im The desired imaginary part

template<typename T>
seal::Complex< T >::~Complex (  )  [inline]

Destructor.


Member Function Documentation

template<typename T>
T& seal::Complex< T >::real (  )  [inline]

Returns a reference to the real part of the complex number. Hence, this function can be used as an lvalue.

template<typename T>
T& seal::Complex< T >::imag (  )  [inline]

Returns a reference to the imaginary part of the complex number. Hence, this function can be used as an lvalue.

template<typename T>
const T& seal::Complex< T >::real (  )  const [inline]

Returns a constant reference to the real part of the complex number.

template<typename T>
const T& seal::Complex< T >::imag (  )  const [inline]

Returns a constant reference to the imaginary part of the complex number.


The documentation for this class was generated from the following file:

Generated on Sat May 16 21:35:20 2009 for SEAL by  doxygen 1.5.5