floatcomplex Class Reference

#include <ComputeEwald.h>

List of all members.

Public Member Functions

 floatcomplex ()
 floatcomplex (float c)
 floatcomplex (float a, float b)
 ~floatcomplex ()
floatcomplex star () const
float mod2 () const
floatcomplexoperator= (const float &c)
floatcomplexoperator+= (const floatcomplex &d)
floatcomplexoperator *= (const float &c)
floatcomplexoperator *= (const floatcomplex &d)

Public Attributes

float r
float i


Detailed Description

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 19 of file ComputeEwald.h.


Constructor & Destructor Documentation

floatcomplex::floatcomplex (  )  [inline]

Definition at line 22 of file ComputeEwald.h.

Referenced by star().

00022 {}

floatcomplex::floatcomplex ( float  c  )  [inline]

Definition at line 23 of file ComputeEwald.h.

00023 : r(c), i(0) {}

floatcomplex::floatcomplex ( float  a,
float  b 
) [inline]

Definition at line 24 of file ComputeEwald.h.

00024 : r(a), i(b) {}

floatcomplex::~floatcomplex (  )  [inline]

Definition at line 25 of file ComputeEwald.h.

00025 {}


Member Function Documentation

float floatcomplex::mod2 (  )  const [inline]

Definition at line 33 of file ComputeEwald.h.

References i, and r.

00034   {
00035     return r*r + i*i;
00036   }

floatcomplex& floatcomplex::operator *= ( const floatcomplex d  )  [inline]

Definition at line 59 of file ComputeEwald.h.

References i, and r.

00060   {
00061     float re = r*d.r - i*d.i;
00062     float im = r*d.i + i*d.r;
00063     r = re;
00064     i = im;
00065     return *this;
00066   }

floatcomplex& floatcomplex::operator *= ( const float &  c  )  [inline]

Definition at line 52 of file ComputeEwald.h.

References i, and r.

00053   {
00054     r *= c;
00055     i *= c;
00056     return *this;
00057   }

floatcomplex& floatcomplex::operator+= ( const floatcomplex d  )  [inline]

Definition at line 45 of file ComputeEwald.h.

References i, and r.

00046   {
00047     r += d.r;
00048     i += d.i;
00049     return *this;
00050   }

floatcomplex& floatcomplex::operator= ( const float &  c  )  [inline]

Definition at line 38 of file ComputeEwald.h.

References i, and r.

00039   {
00040     r = c;
00041     i = 0;
00042     return *this;
00043   }

floatcomplex floatcomplex::star (  )  const [inline]

Definition at line 28 of file ComputeEwald.h.

References floatcomplex(), i, and r.

00029   {
00030     return floatcomplex(r, -i);
00031   }


Member Data Documentation

float floatcomplex::i

Definition at line 21 of file ComputeEwald.h.

Referenced by mod2(), operator *=(), operator+=(), operator=(), and star().

float floatcomplex::r

Definition at line 21 of file ComputeEwald.h.

Referenced by mod2(), operator *=(), operator+=(), operator=(), and star().


The documentation for this class was generated from the following file:
Generated on Wed Sep 20 01:17:18 2017 for NAMD by  doxygen 1.4.7