NAMD
C1Vector Struct Reference

`#include <MsmMap.h>`

## Public Member Functions

C1Vector (Float r=0)

void set (Float r)

C1Vectoroperator+= (const C1Vector &v)

## Public Attributes

Float velem [C1_VECTOR_SIZE]

## Friends

Float operator* (const C1Vector &u, const C1Vector &v)

C1Vector operator+ (const C1Vector &u, const C1Vector &v)

## Detailed Description

Definition at line 86 of file MsmMap.h.

## Constructor & Destructor Documentation

 C1Vector::C1Vector ( Float r = `0` )
inline

Definition at line 88 of file MsmMap.h.

References set().

88 { set(r); }
void set(Float r)
Definition: MsmMap.h:89

## Member Function Documentation

 C1Vector& C1Vector::operator+= ( const C1Vector & v )
inline

Definition at line 92 of file MsmMap.h.

References C1_VECTOR_SIZE, and velem.

92  {
93  for (int n=0; n < C1_VECTOR_SIZE; n++) velem[n] += v.velem[n];
94  return(*this);
95  }
Float velem[C1_VECTOR_SIZE]
Definition: MsmMap.h:87
 void C1Vector::set ( Float r )
inline

Definition at line 89 of file MsmMap.h.

References C1_VECTOR_SIZE, and velem.

Referenced by C1Vector().

89  {
90  for (int n=0; n < C1_VECTOR_SIZE; n++) velem[n] = r;
91  }
Float velem[C1_VECTOR_SIZE]
Definition: MsmMap.h:87

## Friends And Related Function Documentation

 Float operator* ( const C1Vector & u, const C1Vector & v )
friend

Definition at line 96 of file MsmMap.h.

96  {
97  Float r=0;
98  for (int n=0; n < C1_VECTOR_SIZE; n++) r += u.velem[n] * v.velem[n];
99  return r;
100  }
float Float
Definition: MsmMap.h:74
Float velem[C1_VECTOR_SIZE]
Definition: MsmMap.h:87
 C1Vector operator+ ( const C1Vector & u, const C1Vector & v )
friend

Definition at line 101 of file MsmMap.h.

101  {
102  C1Vector w;
103  for (int n=0; n < C1_VECTOR_SIZE; n++) {
104  w.velem[n] = u.velem[n] + v.velem[n];
105  }
106  return w;
107  }
Float velem[C1_VECTOR_SIZE]
Definition: MsmMap.h:87

## Member Data Documentation

 Float C1Vector::velem[C1_VECTOR_SIZE]

Definition at line 87 of file MsmMap.h.

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