MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ScalExp Class Reference

#include <matvecexp.h>

Collaboration diagram for ScalExp:

Public Member Functions

 ScalExp (void)
 
 ~ScalExp (void)
 
 ScalExp (const ScalExp &vin)
 
 ScalExp (const doublereal &d1, const doublereal &d2=0.)
 
const doublerealGetVec (void) const
 
const doublerealGetMom (void) const
 
void PutVec (const doublereal &x)
 
void PutMom (const doublereal &x)
 
ScalExpoperator= (const ScalExp &v)
 
ScalExpoperator+= (const ScalExp &v)
 
ScalExpoperator-= (const ScalExp &v)
 
ScalExp operator+ (void) const
 
ScalExp operator- (void) const
 
ScalExp operator+ (const ScalExp &v) const
 
ScalExp operator- (const ScalExp &v) const
 
ScalExp operator* (const ScalExp &v) const
 
ScalExp operator/ (const ScalExp &v) const
 
std::ostream & Write (std::ostream &out, const char *sFill=" ") const
 

Protected Attributes

doublereal vec
 
doublereal mom
 

Detailed Description

Definition at line 63 of file matvecexp.h.

Constructor & Destructor Documentation

ScalExp::ScalExp ( void  )
inline

Definition at line 69 of file matvecexp.h.

References NO_OP.

Referenced by operator*(), operator+(), operator-(), and operator/().

69  {
70  NO_OP;
71  };
#define NO_OP
Definition: myassert.h:74
ScalExp::~ScalExp ( void  )
inline

Definition at line 73 of file matvecexp.h.

References NO_OP.

73  {
74  NO_OP;
75  };
#define NO_OP
Definition: myassert.h:74
ScalExp::ScalExp ( const ScalExp vin)
inline

Definition at line 77 of file matvecexp.h.

References mom, and vec.

77  {
78  vec = vin.vec;
79  mom = vin.mom;
80  };
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66
ScalExp::ScalExp ( const doublereal d1,
const doublereal d2 = 0. 
)
inline

Definition at line 82 of file matvecexp.h.

References mom, and vec.

85  {
86  vec = d1;
87  mom = d2;
88  };
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Member Function Documentation

const doublereal& ScalExp::GetMom ( void  ) const
inline

Definition at line 94 of file matvecexp.h.

References mom.

Referenced by cos(), exp(), VecExp::operator*(), VecExp::operator/(), operator<<(), pow(), sin(), sqrt(), and Write().

94  {
95  return mom;
96  };
doublereal mom
Definition: matvecexp.h:66
const doublereal& ScalExp::GetVec ( void  ) const
inline

Definition at line 90 of file matvecexp.h.

References vec.

Referenced by cos(), exp(), VecExp::operator*(), VecExp::operator/(), operator<<(), pow(), sin(), sqrt(), and Write().

90  {
91  return vec;
92  };
doublereal vec
Definition: matvecexp.h:65
ScalExp ScalExp::operator* ( const ScalExp v) const
inline

Definition at line 140 of file matvecexp.h.

References mom, ScalExp(), and vec.

140  {
141  return ScalExp(vec*v.vec,mom*v.vec+vec*v.mom);;
142  };
ScalExp(void)
Definition: matvecexp.h:69
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Here is the call graph for this function:

ScalExp ScalExp::operator+ ( void  ) const
inline

Definition at line 124 of file matvecexp.h.

124  {
125  return *this;
126  };
ScalExp ScalExp::operator+ ( const ScalExp v) const
inline

Definition at line 132 of file matvecexp.h.

References mom, ScalExp(), and vec.

132  {
133  return ScalExp(vec+v.vec, mom+v.mom);
134  };
ScalExp(void)
Definition: matvecexp.h:69
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Here is the call graph for this function:

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

Definition at line 112 of file matvecexp.h.

References mom, and vec.

112  {
113  vec += v.vec;
114  mom += v.mom;
115  return *this;
116  };
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66
ScalExp ScalExp::operator- ( void  ) const
inline

Definition at line 128 of file matvecexp.h.

References mom, ScalExp(), and vec.

128  {
129  return ScalExp(-vec, -mom);
130  };
ScalExp(void)
Definition: matvecexp.h:69
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Here is the call graph for this function:

ScalExp ScalExp::operator- ( const ScalExp v) const
inline

Definition at line 136 of file matvecexp.h.

References mom, ScalExp(), and vec.

136  {
137  return ScalExp(vec-v.vec, mom-v.mom);
138  };
ScalExp(void)
Definition: matvecexp.h:69
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Here is the call graph for this function:

ScalExp& ScalExp::operator-= ( const ScalExp v)
inline

Definition at line 118 of file matvecexp.h.

References mom, and vec.

118  {
119  vec -= v.vec;
120  mom -= v.mom;
121  return *this;
122  };
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66
ScalExp ScalExp::operator/ ( const ScalExp v) const
inline

Definition at line 144 of file matvecexp.h.

References mom, ScalExp(), and vec.

144  {
145  return ScalExp(vec/v.vec,(mom*v.vec-vec*v.mom)/(v.vec*v.vec));
146  };
ScalExp(void)
Definition: matvecexp.h:69
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66

Here is the call graph for this function:

ScalExp& ScalExp::operator= ( const ScalExp v)
inline

Definition at line 106 of file matvecexp.h.

References mom, and vec.

106  {
107  vec = v.vec;
108  mom = v.mom;
109  return *this;
110  };
doublereal vec
Definition: matvecexp.h:65
doublereal mom
Definition: matvecexp.h:66
void ScalExp::PutMom ( const doublereal x)
inline

Definition at line 102 of file matvecexp.h.

References mom.

102  {
103  mom = x;
104  };
doublereal mom
Definition: matvecexp.h:66
void ScalExp::PutVec ( const doublereal x)
inline

Definition at line 98 of file matvecexp.h.

References vec.

98  {
99  vec = x;
100  };
doublereal vec
Definition: matvecexp.h:65
std::ostream & ScalExp::Write ( std::ostream &  out,
const char *  sFill = " " 
) const

Definition at line 110 of file matvecexp.cc.

References GetMom(), and GetVec().

Referenced by Write().

111 {
112  return out
113  << GetVec() << sFill
114  << GetMom();
115 }
const doublereal & GetVec(void) const
Definition: matvecexp.h:90
const doublereal & GetMom(void) const
Definition: matvecexp.h:94

Here is the call graph for this function:

Member Data Documentation

doublereal ScalExp::mom
protected
doublereal ScalExp::vec
protected

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