NAMD
Public Member Functions | Friends | List of all members
MathArray< Elem, Size > Class Template Reference

#include <MathArray.h>

Inheritance diagram for MathArray< Elem, Size >:
Array< Elem, Size >

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)
 
- Public Member Functions inherited from Array< Elem, Size >
 Array (void)
 
 ~Array (void)
 
 Array (const Array< Elem, Size > &a2)
 
Array< Elem, Size > & operator= (const Array< Elem, Size > &a2)
 
 Array (const Elem &v)
 
Array< Elem, Size > & operator= (const Elem &v)
 
Elem & operator[] (int index)
 
const Elem & operator[] (int index) const
 
iterator begin (void)
 
iterator end (void)
 
const_iterator const_begin (void) const
 
const_iterator const_end (void) const
 

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)
 

Additional Inherited Members

- Public Types inherited from Array< Elem, Size >
typedef Elem * iterator
 
typedef const Elem * const_iterator
 
- Public Attributes inherited from Array< Elem, Size >
Elem data [Size]
 

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.

16 : Array<Elem,Size>(0) { ; }
Definition: Array.h:10
template<class Elem, int Size>
MathArray< Elem, Size >::~MathArray ( void  )
inline

Definition at line 19 of file MathArray.h.

19 { ; }
template<class Elem, int Size>
MathArray< Elem, Size >::MathArray ( const Array< Elem, Size > &  a2)
inline

Definition at line 22 of file MathArray.h.

22 : Array<Elem,Size>(a2) { ; }
Definition: Array.h:10
template<class Elem, int Size>
MathArray< Elem, Size >::MathArray ( const Elem &  v)
inline

Definition at line 31 of file MathArray.h.

31 : Array<Elem,Size>(v) { ; }
Definition: Array.h:10

Member Function Documentation

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.

54  {
55  for ( int i = 0; i < Size; ++i ) { this->data[i] *= a2.data[i]; }
56  return (*this);
57  }
Elem data[Size]
Definition: Array.h:13
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator*= ( const Elem &  v)
inline

Definition at line 58 of file MathArray.h.

58  {
59  for ( int i = 0; i < Size; ++i ) { this->data[i] *= v; }
60  return (*this);
61  }
Elem data[Size]
Definition: Array.h:13
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.

38  {
39  for ( int i = 0; i < Size; ++i ) { this->data[i] += a2.data[i]; }
40  return (*this);
41  }
Elem data[Size]
Definition: Array.h:13
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator+= ( const Elem &  v)
inline

Definition at line 42 of file MathArray.h.

42  {
43  for ( int i = 0; i < Size; ++i ) { this->data[i] += v; }
44  return (*this);
45  }
Elem data[Size]
Definition: Array.h:13
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.

46  {
47  for ( int i = 0; i < Size; ++i ) { this->data[i] -= a2.data[i]; }
48  return (*this);
49  }
Elem data[Size]
Definition: Array.h:13
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator-= ( const Elem &  v)
inline

Definition at line 50 of file MathArray.h.

50  {
51  for ( int i = 0; i < Size; ++i ) { this->data[i] -= v; }
52  return (*this);
53  }
Elem data[Size]
Definition: Array.h:13
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.

62  {
63  for ( int i = 0; i < Size; ++i ) { this->data[i] /= a2.data[i]; }
64  return (*this);
65  }
Elem data[Size]
Definition: Array.h:13
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator/= ( const Elem &  v)
inline

Definition at line 66 of file MathArray.h.

66  {
67  for ( int i = 0; i < Size; ++i ) { this->data[i] /= v; }
68  return (*this);
69  }
Elem data[Size]
Definition: Array.h:13
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator= ( const Array< Elem, Size > &  a2)
inline

Definition at line 25 of file MathArray.h.

25  {
27  return (*this);
28  }
Array< Elem, Size > & operator=(const Array< Elem, Size > &a2)
Definition: Array.h:27
template<class Elem, int Size>
MathArray<Elem,Size>& MathArray< Elem, Size >::operator= ( const Elem &  v)
inline

Definition at line 32 of file MathArray.h.

32  {
34  return (*this);
35  }
Array< Elem, Size > & operator=(const Array< Elem, Size > &a2)
Definition: Array.h:27

Friends And Related Function Documentation

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.

95  {
96  return (MathArray<Elem,Size>(a1) *= a2);
97  }
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.

99  {
100  return (MathArray<Elem,Size>(a1) *= v2);
101  }
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.

103  {
104  return (MathArray<Elem,Size>(v1) *= a2);
105  }
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.

71  {
72  return (MathArray<Elem,Size>(a1) += a2);
73  }
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.

75  {
76  return (MathArray<Elem,Size>(a1) += v2);
77  }
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.

79  {
80  return (MathArray<Elem,Size>(v1) += a2);
81  }
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.

83  {
84  return (MathArray<Elem,Size>(a1) -= a2);
85  }
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.

87  {
88  return (MathArray<Elem,Size>(a1) -= v2);
89  }
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.

91  {
92  return (MathArray<Elem,Size>(v1) -= a2);
93  }
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.

107  {
108  return (MathArray<Elem,Size>(a1) /= a2);
109  }
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.

111  {
112  return (MathArray<Elem,Size>(a1) /= v2);
113  }
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.

115  {
116  return (MathArray<Elem,Size>(v1) /= a2);
117  }

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