47 m_afTuple =
new Real[m_iSize];
48 memset(m_afTuple,0,m_iSize*
sizeof(Real));
63 m_afTuple =
new Real[m_iSize];
64 size_t uiSize = m_iSize*
sizeof(Real);
65 memcpy(m_afTuple,afTuple,uiSize);
81 size_t uiSize =
m_iSize*
sizeof(Real);
103 m_afTuple =
new Real[m_iSize];
104 memset(m_afTuple,0,m_iSize*
sizeof(Real));
113 template <
class Real>
119 template <
class Real>
125 template <
class Real>
131 template <
class Real>
138 template <
class Real>
145 template <
class Real>
154 m_afTuple =
new Real[m_iSize];
156 size_t uiSize = m_iSize*
sizeof(Real);
168 template <
class Real>
171 return memcmp(m_afTuple,rkV.
m_afTuple,m_iSize*
sizeof(Real));
174 template <
class Real>
177 return CompareArrays(rkV) == 0;
180 template <
class Real>
183 return CompareArrays(rkV) != 0;
186 template <
class Real>
189 return CompareArrays(rkV) < 0;
192 template <
class Real>
195 return CompareArrays(rkV) <= 0;
198 template <
class Real>
201 return CompareArrays(rkV) > 0;
204 template <
class Real>
207 return CompareArrays(rkV) >= 0;
210 template <
class Real>
214 for (
int i = 0; i < m_iSize; i++)
221 template <
class Real>
225 for (
int i = 0; i < m_iSize; i++)
232 template <
class Real>
236 for (
int i = 0; i < m_iSize; i++)
238 kProd.
m_afTuple[i] = fScalar*m_afTuple[i];
243 template <
class Real>
249 if (fScalar != (Real)0.0)
251 Real fInvScalar = ((Real)1.0)/fScalar;
252 for (i = 0; i < m_iSize; i++)
254 kQuot.
m_afTuple[i] = fInvScalar*m_afTuple[i];
259 for (i = 0; i < m_iSize; i++)
268 template <
class Real>
272 for (
int i = 0; i < m_iSize; i++)
279 template <
class Real>
283 for (
int i = 0; i < rkV.
GetSize(); i++)
285 kProd[i] = fScalar*rkV[i];
290 template <
class Real>
293 for (
int i = 0; i < m_iSize; i++)
300 template <
class Real>
303 for (
int i = 0; i < m_iSize; i++)
310 template <
class Real>
313 for (
int i = 0; i < m_iSize; i++)
315 m_afTuple[i] *= fScalar;
320 template <
class Real>
325 if (fScalar != (Real)0.0)
327 Real fInvScalar = ((Real)1.0)/fScalar;
328 for (i = 0; i < m_iSize; i++)
330 m_afTuple[i] *= fInvScalar;
335 for (i = 0; i < m_iSize; i++)
344 template <
class Real>
347 Real fSqrLen = (Real)0.0;
348 for (
int i = 0; i < m_iSize; i++)
350 fSqrLen += m_afTuple[i]*m_afTuple[i];
355 template <
class Real>
358 Real fSqrLen = (Real)0.0;
359 for (
int i = 0; i < m_iSize; i++)
361 fSqrLen += m_afTuple[i]*m_afTuple[i];
366 template <
class Real>
369 Real fDot = (Real)0.0;
370 for (
int i = 0; i < m_iSize; i++)
377 template <
class Real>
380 Real fLength = Length();
385 Real fInvLength = ((Real)1.0)/fLength;
386 for (i = 0; i < m_iSize; i++)
388 m_afTuple[i] *= fInvLength;
394 for (i = 0; i < m_iSize; i++)
396 m_afTuple[i] = (Real)0.0;
moDVector & operator-=(const moDVector &rkV)
bool operator==(const moDVector &rkV) const
moDVector operator+(const moDVector &rkV) const
int CompareArrays(const moDVector &rkV) const
moDVector operator-() const
bool operator<=(const moDVector &rkV) const
Clase base abstracta de donde deben derivar los objetos [virtual pura].
moDVector & operator*=(Real fScalar)
Real operator[](int i) const
Real Dot(const moDVector &rkV) const
moDVector & operator/=(Real fScalar)
moDVector operator/(Real fScalar) const
moDVector< Real > operator*(Real fScalar, const moDVector< Real > &rkV)
static Real Sqrt(Real fValue)
bool operator<(const moDVector &rkV) const
moDVector & operator+=(const moDVector &rkV)
moDVector & operator=(const moDVector &rkV)
moDVector operator*(Real fScalar) const
bool operator>=(const moDVector &rkV) const
bool operator>(const moDVector &rkV) const
bool operator!=(const moDVector &rkV) const
Real SquaredLength() const