MathArray< Elem, Size > Class Template Reference

#include <MathArray.h>

Inheritance diagram for MathArray< Elem, Size >:

Array< Elem, Size > List of all members.

Public Member Functions

 MathArray (void)
 ~MathArray (void)
 MathArray (const Array< Elem, Size > &a2)
MathArray< Elem, Size > & operator= (const Array< Elem, Size > &a2)
 MathArray (const Elem &v)
MathArray< Elem, Size > & operator= (const Elem &v)
MathArray< Elem, Size > & operator+= (const Array< Elem, Size > &a2)
MathArray< Elem, Size > & operator+= (const Elem &v)
MathArray< Elem, Size > & operator-= (const Array< Elem, Size > &a2)
MathArray< Elem, Size > & operator-= (const Elem &v)
MathArray< Elem, Size > & operator *= (const Array< Elem, Size > &a2)
MathArray< Elem, Size > & operator *= (const Elem &v)
MathArray< Elem, Size > & operator/= (const Array< Elem, Size > &a2)
MathArray< Elem, Size > & operator/= (const Elem &v)

Friends

MathArray< Elem, Size > operator+ (const Array< Elem, Size > &a1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator+ (const Array< Elem, Size > &a1, const Elem &v2)
MathArray< Elem, Size > operator+ (const Elem &v1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator- (const Array< Elem, Size > &a1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator- (const Array< Elem, Size > &a1, const Elem &v2)
MathArray< Elem, Size > operator- (const Elem &v1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator * (const Array< Elem, Size > &a1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator * (const Array< Elem, Size > &a1, const Elem &v2)
MathArray< Elem, Size > operator * (const Elem &v1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator/ (const Array< Elem, Size > &a1, const Array< Elem, Size > &a2)
MathArray< Elem, Size > operator/ (const Array< Elem, Size > &a1, const Elem &v2)
MathArray< Elem, Size > operator/ (const Elem &v1, const Array< Elem, Size > &a2)

Detailed Description

template<class Elem, int Size>
class MathArray< Elem, Size >

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

Definition at line 12 of file MathArray.h.


Constructor & Destructor Documentation

template<class Elem, int Size>
MathArray< Elem, Size >::MathArray ( void   )  [inline]

Definition at line 16 of file MathArray.h.

00016 : Array<Elem,Size>(0) { ; }

template<class Elem, int Size>
MathArray< Elem, Size >::~MathArray ( void   )  [inline]

Definition at line 19 of file MathArray.h.

00019 { ; }

template<class Elem, int Size>
MathArray< Elem, Size >::MathArray ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 22 of file MathArray.h.

00022 : Array<Elem,Size>(a2) { ; }

template<class Elem, int Size>
MathArray< Elem, Size >::MathArray ( const Elem &  v  )  [inline]

Definition at line 31 of file MathArray.h.

00031 : Array<Elem,Size>(v) { ; }


Member Function Documentation

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator *= ( const Elem &  v  )  [inline]

Definition at line 58 of file MathArray.h.

00058                                                       {
00059       for ( int i = 0; i < Size; ++i ) { this->data[i] *= v; }
00060       return (*this);
00061     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator *= ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 54 of file MathArray.h.

References Array< Elem, Size >::data.

00054                                                                    {
00055       for ( int i = 0; i < Size; ++i ) { this->data[i] *= a2.data[i]; }
00056       return (*this);
00057     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator+= ( const Elem &  v  )  [inline]

Definition at line 42 of file MathArray.h.

00042                                                       {
00043       for ( int i = 0; i < Size; ++i ) { this->data[i] += v; }
00044       return (*this);
00045     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator+= ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 38 of file MathArray.h.

References Array< Elem, Size >::data.

00038                                                                    {
00039       for ( int i = 0; i < Size; ++i ) { this->data[i] += a2.data[i]; }
00040       return (*this);
00041     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator-= ( const Elem &  v  )  [inline]

Definition at line 50 of file MathArray.h.

00050                                                       {
00051       for ( int i = 0; i < Size; ++i ) { this->data[i] -= v; }
00052       return (*this);
00053     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator-= ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 46 of file MathArray.h.

References Array< Elem, Size >::data.

00046                                                                    {
00047       for ( int i = 0; i < Size; ++i ) { this->data[i] -= a2.data[i]; }
00048       return (*this);
00049     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator/= ( const Elem &  v  )  [inline]

Definition at line 66 of file MathArray.h.

00066                                                       {
00067       for ( int i = 0; i < Size; ++i ) { this->data[i] /= v; }
00068       return (*this);
00069     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator/= ( const Array< Elem, Size > &  a2  )  [inline]

Definition at line 62 of file MathArray.h.

References Array< Elem, Size >::data.

00062                                                                    {
00063       for ( int i = 0; i < Size; ++i ) { this->data[i] /= a2.data[i]; }
00064       return (*this);
00065     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator= ( const Elem &  v  )  [inline]

Reimplemented from Array< Elem, Size >.

Definition at line 32 of file MathArray.h.

References Array< Elem, Size >::operator=().

00032                                                      {
00033       Array<Elem,Size>::operator=(v);
00034       return (*this);
00035     }

template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator= ( const Array< Elem, Size > &  a2  )  [inline]

Reimplemented from Array< Elem, Size >.

Definition at line 25 of file MathArray.h.

References Array< Elem, Size >::operator=().

00025                                                                   {
00026       Array<Elem,Size>::operator=(a2);
00027       return (*this);
00028     }


Friends And Related Function Documentation

template<class Elem, int Size>
MathArray<Elem,Size> operator * ( const Elem &  v1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 102 of file MathArray.h.

00103                                                               {
00104       return (MathArray<Elem,Size>(v1) *= a2);
00105     }

template<class Elem, int Size>
MathArray<Elem,Size> operator * ( const Array< Elem, Size > &  a1,
const Elem &  v2 
) [friend]

Definition at line 98 of file MathArray.h.

00099                                                              {
00100       return (MathArray<Elem,Size>(a1) *= v2);
00101     }

template<class Elem, int Size>
MathArray<Elem,Size> operator * ( const Array< Elem, Size > &  a1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 94 of file MathArray.h.

00095                                                                          {
00096       return (MathArray<Elem,Size>(a1) *= a2);
00097     }

template<class Elem, int Size>
MathArray<Elem,Size> operator+ ( const Elem &  v1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 78 of file MathArray.h.

00079                                                               {
00080       return (MathArray<Elem,Size>(v1) += a2);
00081     }

template<class Elem, int Size>
MathArray<Elem,Size> operator+ ( const Array< Elem, Size > &  a1,
const Elem &  v2 
) [friend]

Definition at line 74 of file MathArray.h.

00075                                                              {
00076       return (MathArray<Elem,Size>(a1) += v2);
00077     }

template<class Elem, int Size>
MathArray<Elem,Size> operator+ ( const Array< Elem, Size > &  a1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 70 of file MathArray.h.

00071                                                                          {
00072       return (MathArray<Elem,Size>(a1) += a2);
00073     }

template<class Elem, int Size>
MathArray<Elem,Size> operator- ( const Elem &  v1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 90 of file MathArray.h.

00091                                                               {
00092       return (MathArray<Elem,Size>(v1) -= a2);
00093     }

template<class Elem, int Size>
MathArray<Elem,Size> operator- ( const Array< Elem, Size > &  a1,
const Elem &  v2 
) [friend]

Definition at line 86 of file MathArray.h.

00087                                                              {
00088       return (MathArray<Elem,Size>(a1) -= v2);
00089     }

template<class Elem, int Size>
MathArray<Elem,Size> operator- ( const Array< Elem, Size > &  a1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 82 of file MathArray.h.

00083                                                                          {
00084       return (MathArray<Elem,Size>(a1) -= a2);
00085     }

template<class Elem, int Size>
MathArray<Elem,Size> operator/ ( const Elem &  v1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 114 of file MathArray.h.

00115                                                               {
00116       return (MathArray<Elem,Size>(v1) /= a2);
00117     }

template<class Elem, int Size>
MathArray<Elem,Size> operator/ ( const Array< Elem, Size > &  a1,
const Elem &  v2 
) [friend]

Definition at line 110 of file MathArray.h.

00111                                                              {
00112       return (MathArray<Elem,Size>(a1) /= v2);
00113     }

template<class Elem, int Size>
MathArray<Elem,Size> operator/ ( const Array< Elem, Size > &  a1,
const Array< Elem, Size > &  a2 
) [friend]

Definition at line 106 of file MathArray.h.

00107                                                                          {
00108       return (MathArray<Elem,Size>(a1) /= a2);
00109     }


The documentation for this class was generated from the following file:
Generated on Thu Nov 23 01:17:18 2017 for NAMD by  doxygen 1.4.7