MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
matvec3n.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/libraries/libmbmath/matvec3n.h,v 1.33 2017/01/12 14:43:54 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #ifndef MATVEC3N_H
33 #define MATVEC3N_H
34 
35 #include "matvec3.h"
36 class MatNx3;
37 class MatNxN;
38 
39 /* VecN - begin */
40 
41 /*
42  * FIXME: why not derived from VectorHandler, or viceversa?
43  */
44 
45 class ArrayView {
46 private:
48 
49 public:
51  : start(s), offset(o), number(n) {
52  NO_OP;
53  };
54 
55  ~ArrayView(void) {
56  NO_OP;
57  };
58 
59  inline integer Start(void) const {
60  return start;
61  };
62 
63  inline integer Offset(void) const {
64  return offset;
65  };
66 
67  inline integer Number(void) const {
68  return number;
69  };
70 
71  inline integer Last(void) const {
72  return start + (number-1)*offset;
73  };
74 };
75 
76 class VecN {
77  friend class Mat3xN;
78  friend class MatNx3;
79  friend class MatNxN;
80 
81  private:
82 
83  /* not defined */
84  const VecN& operator = (const VecN&);
85 
86  protected:
90 
91 #ifdef DEBUG
92  void IsValid(void) const;
93 #endif /* DEBUG */
94  void Create_(integer ns);
95  void Destroy_(void);
96 
97  public:
98  VecN(void);
99  VecN(integer ns);
100  VecN(integer ns, const doublereal& d);
101 
102  /* costruttore copia */
103  VecN(const VecN&);
104 
105  /* costruttore da VectorHandler (Aggiunta) */
106  VecN(const VectorHandler& vh, integer ns, integer iFirstIndex);
107 
108  ~VecN(void);
109 
110  inline integer iGetNumRows(void) const;
111 
112  void Resize(integer ns);
113  void Reset(const doublereal d = 0.);
114 
115  inline void Put(integer i, const doublereal& d);
116  inline void Add(integer i, const doublereal& d);
117  inline void Sub(integer i, const doublereal& d);
118  inline const doublereal& dGet(integer i) const;
119 
120  const VecN& Copy(const VectorHandler& vh, integer iFirstIndex = 1);
121 
122  /*
123  Dirty job: restituisce il puntatore al vettore (deprecato).
124  */
125  const doublereal* pGetVec(void) const {
126  return pdVec;
127  };
128 
129  doublereal* pGetVec(void) {
130  return pdVec;
131  };
132 
133  /* *this = n * v */
134  void RightMult(const MatNx3& n, const Vec3& v);
135 
136  /* *this = m * n */
137  const VecN& Mult(const MatNxN& m, const VecN& n);
138  const VecN& Mult(const MatNxN& m, const ArrayView& vm,
139  const VecN& n, const ArrayView& vn);
140  const VecN& operator += (const VecN& m);
141 
142  /* prodotto per scalare */
143  const VecN& operator *= (const doublereal & d);
144 
145  inline doublereal& operator () (integer i);
146  inline const doublereal& operator () (integer i) const;
147 };
148 
149 
150 inline integer VecN::iGetNumRows(void) const
151 {
152 #ifdef DEBUG
153  IsValid();
154 #endif /* DEBUG */
155  return iNumRows;
156 }
157 
158 
159 inline void VecN::Put(integer i, const doublereal& d)
160 {
161 #ifdef DEBUG
162  IsValid();
163 #endif /* DEBUG */
164  ASSERT(i > 0 && i <= iNumRows);
165  pdVec[--i] = d;
166 }
167 
168 
169 inline void VecN::Add(integer i, const doublereal& d)
170 {
171 #ifdef DEBUG
172  IsValid();
173 #endif /* DEBUG */
174  ASSERT(i > 0 && i <= iNumRows);
175  pdVec[--i] += d;
176 }
177 
178 inline void VecN::Sub(integer i, const doublereal& d)
179 {
180 #ifdef DEBUG
181  IsValid();
182 #endif /* DEBUG */
183  ASSERT(i > 0 && i <= iNumRows);
184  pdVec[--i] -= d;
185 }
186 
187 
188 inline const doublereal& VecN::dGet(integer i) const
189 {
190 #ifdef DEBUG
191  IsValid();
192 #endif /* DEBUG */
193  ASSERT(i > 0 && i <= iNumRows);
194  return pdVec[--i];
195 }
196 
197 inline doublereal &
199 {
200 #ifdef DEBUG
201  IsValid();
202 #endif /* DEBUG */
203  ASSERT(i > 0 && i <= iNumRows);
204  return pdVec[--i];
205 }
206 
207 inline const doublereal &
209 {
210 #ifdef DEBUG
211  IsValid();
212 #endif /* DEBUG */
213  ASSERT(i > 0 && i <= iNumRows);
214  return pdVec[--i];
215 }
216 
217 /* VecN - end */
218 
219 
220 /* Mat3xN - begin */
221 
222 class Mat3xN {
223 
224  friend class MatNx3;
225  friend class MatNxN;
226 
227  private:
228 
229  /* not defined */
230  Mat3xN(const Mat3xN&);
231  const Mat3xN& operator = (const Mat3xN&);
232 
233  protected:
237 
238 #ifdef DEBUG
239  void IsValid(void) const;
240 #endif /* DEBUG */
241  void Create_(integer ns);
242  void Destroy_(void);
243 
244  public:
245  Mat3xN(void); /* to allow arrays of Mat3xN */
246  Mat3xN(integer nc);
247  Mat3xN(integer nc, const doublereal& d);
248  ~Mat3xN(void);
249 
250  void Resize(integer ns);
251  void Reset(const doublereal& d = 0.);
252 
253  inline integer iGetNumCols(void) const;
254  inline integer iGetNumRows(void) const { return 3; }
255 
256  inline void Put(int i, integer j, const doublereal& d);
257  inline void Add(int i, integer j, const doublereal& d);
258  inline void Sub(int i, integer j, const doublereal& d);
259  inline const doublereal& dGet(int i, integer j) const;
260 
261  /* *this = m x *this */
262  const Mat3xN& LeftMult(const Mat3x3& m);
263 
264  /* *this = m x n */
265  const Mat3xN& LeftMult(const Mat3x3& m, const Mat3xN& n);
266 
267  /* *this = m * n */
268  const Mat3xN& Mult(const Mat3xN& m, const MatNxN& n);
269  const Mat3xN& Copy(const Mat3xN& m);
270 
271  const Mat3xN& operator *= (const doublereal& d);
272  const Mat3xN& operator /= (const doublereal& d);
273 
274  const Mat3xN& operator += (const Mat3xN& m);
275  const Mat3xN& operator -= (const Mat3xN& m);
276 
277  Vec3 operator * (const VecN& v) const;
278 
279  Vec3 Mult(const ArrayView& vm, const VecN& v) const;
280  Vec3 Mult(const ArrayView& vm, const VecN& v, const ArrayView& vv) const;
281 
282  Vec3 GetVec(integer iCol) const;
283  void PutVec(integer iCol, const Vec3& v);
284  void AddVec(integer iCol, const Vec3& v);
285  void SubVec(integer iCol, const Vec3& v);
286 
287  Mat3x3 GetMat3x3(integer iFirstCol) const;
288  void PutMat3x3(integer iCol, const Mat3x3& m);
289  void AddMat3x3(integer iCol, const Mat3x3& m);
290  void SubMat3x3(integer iCol, const Mat3x3& m);
291  Mat3x3 GetMat3x3ScalarMult(integer iFirstCol, const doublereal& d) const;
292 
293  inline doublereal & operator () (integer i, integer j);
294  inline const doublereal & operator () (integer i, integer j) const;
295 };
296 
297 
298 inline integer Mat3xN::iGetNumCols(void) const
299 {
300 #ifdef DEBUG
301  IsValid();
302 #endif /* DEBUG */
303  return iNumCols;
304 }
305 
306 inline void Mat3xN::Put(int i, integer j, const doublereal& d)
307 {
308 #ifdef DEBUG
309  IsValid();
310 #endif /* DEBUG */
311  ASSERT(i > 0 && i <= 3);
312  ASSERT(j > 0 && j <= iNumCols);
313  pdRows[--i][--j] = d;
314 }
315 
316 inline void Mat3xN::Add(int i, integer j, const doublereal& d)
317 {
318 #ifdef DEBUG
319  IsValid();
320 #endif /* DEBUG */
321  ASSERT(i > 0 && i <= 3);
322  ASSERT(j > 0 && j <= iNumCols);
323  pdRows[--i][--j] += d;
324 }
325 
326 inline void Mat3xN::Sub(int i, integer j, const doublereal& d)
327 {
328 #ifdef DEBUG
329  IsValid();
330 #endif /* DEBUG */
331  ASSERT(i > 0 && i <= 3);
332  ASSERT(j > 0 && j <= iNumCols);
333  pdRows[--i][--j] -= d;
334 }
335 
336 inline const doublereal& Mat3xN::dGet(int i, integer j) const
337 {
338 #ifdef DEBUG
339  IsValid();
340 #endif /* DEBUG */
341  ASSERT(i > 0 && i <= 3);
342  ASSERT(j > 0 && j <= iNumCols);
343  return pdRows[--i][--j];
344 }
345 
346 inline doublereal &
348 {
349 #ifdef DEBUG
350  IsValid();
351 #endif /* DEBUG */
352  ASSERT(i > 0 && i <= 3);
353  ASSERT(j > 0 && j <= iNumCols);
354  return pdRows[--i][--j];
355 }
356 
357 inline const doublereal &
359 {
360 #ifdef DEBUG
361  IsValid();
362 #endif /* DEBUG */
363  ASSERT(i > 0 && i <= 3);
364  ASSERT(j > 0 && j <= iNumCols);
365  return pdRows[--i][--j];
366 }
367 
368 /* Mat3xN - end */
369 
370 /* MatNx3 - begin */
371 
372  /* classe aggiunta per gestire operazioni con matrici Nx3. Per adesso
373  sono memorizzate come tre array Nx1 */
374 
375 class MatNx3 {
376 
377  friend class VecN;
378  friend class Mat3xN;
379  friend class MatNxN;
380  private:
381 
382  /* not defined */
383  MatNx3(const MatNx3&);
384  const MatNx3& operator = (const MatNx3&);
385 
386  protected:
390 
391 #ifdef DEBUG
392  void IsValid(void) const;
393 #endif /* DEBUG */
394  void Create_(integer ns);
395  void Destroy_(void);
396 
397  public:
398  MatNx3(void);
399  MatNx3(integer ns);
400  MatNx3(integer ns, const doublereal& d);
401  ~MatNx3(void);
402 
403  inline integer iGetNumRows(void) const;
404  void Resize(integer ns);
405  void Reset(const doublereal d = 0.);
406 
407  inline void Put(integer i, integer j, const doublereal& d);
408  inline void Add(integer i, integer j, const doublereal& d);
409  inline void Sub(integer i, integer j, const doublereal& d);
410  inline const doublereal& dGet(integer i, integer j) const;
411  /* *this = n x m */
412  const MatNx3& RightMult(const MatNx3& n, const Mat3x3& m);
413 
414  /* *this = [3xN]T */
415  const MatNx3& Transpose(const Mat3xN& n);
416 
417  /* *this = m * n */
418  const MatNx3& Mult(const MatNxN& m, const MatNx3& n);
419 
420  Vec3 GetVec(integer iRow) const;
421  void PutVec(integer iRow, const Vec3& v);
422  void AddVec(integer iRow, const Vec3& v);
423  void SubVec(integer iRow, const Vec3& v);
424 
425  inline doublereal & operator () (integer i, integer j);
426  inline const doublereal & operator () (integer i, integer j) const;
427 };
428 
429 
430 inline integer
432 {
433 #ifdef DEBUG
434  IsValid();
435 #endif /* DEBUG */
436  return iNumRows;
437 }
438 
439 
440 inline void
442 {
443 #ifdef DEBUG
444  IsValid();
445 #endif /* DEBUG */
446  ASSERT(i > 0 && i <= iNumRows);
447  ASSERT(j > 0 && j <= 3);
448  pdCols[--j][--i] = d;
449 }
450 
451 inline void
453 {
454 #ifdef DEBUG
455  IsValid();
456 #endif /* DEBUG */
457  ASSERT(i > 0 && i <= iNumRows);
458  ASSERT(j > 0 && j <= 3);
459  pdCols[--j][--i] += d;
460 }
461 
462 inline void
464 {
465 #ifdef DEBUG
466  IsValid();
467 #endif /* DEBUG */
468  ASSERT(i > 0 && i <= iNumRows);
469  ASSERT(j > 0 && j <= 3);
470  pdCols[--j][--i] -= d;
471 }
472 
473 inline const doublereal&
475 {
476 #ifdef DEBUG
477  IsValid();
478 #endif /* DEBUG */
479  ASSERT(i > 0 && i <= iNumRows);
480  ASSERT(j > 0 && j <= 3);
481  return pdCols[--j][--i];
482 }
483 
484 inline doublereal &
486 {
487 #ifdef DEBUG
488  IsValid();
489 #endif /* DEBUG */
490  ASSERT(i > 0 && i <= iNumRows);
491  ASSERT(j > 0 && j <= 3);
492  return pdCols[--j][--i];
493 }
494 
495 inline const doublereal &
497 {
498 #ifdef DEBUG
499  IsValid();
500 #endif /* DEBUG */
501  ASSERT(i > 0 && i <= iNumRows);
502  ASSERT(j > 0 && j <= 3);
503  return pdCols[--j][--i];
504 }
505 
506 /* Mat Nx3 - end */
507 
508 /* MatNxN - begin */
509 /* Questa classe memorizza matrici quadrate di dimensioni n x n in array (n^2) x 1.
510  Nota: in origine l'ho messa per memorizzare le matrici di massa e rigidezza modale.
511  In verita' queste matrici devono comunque essere diagonali (o non si riesce a escludere i
512  modi rigidi quando si esportano i modi nel multi-corpo) quindi non dovrebbe servire piu' */
513 
514 class MatNxN {
515  friend class Mat3xN;
516  friend class MatNx3;
517  friend class VecN;
518  friend std::ostream& operator << (std::ostream&, const MatNxN&);
519 
520  private:
521 
522  /* not defined */
523  MatNxN(const MatNxN&);
524  const MatNxN& operator = (const MatNxN&);
525 
526  protected:
531 
532 #ifdef DEBUG
533  void IsValid(void) const;
534 #endif /* DEBUG */
535  void Create_(integer ns);
536  void Destroy_(void);
537 
538  public:
539  MatNxN(void);
540  MatNxN(integer ns);
541  MatNxN(integer ns, const doublereal& d);
542  ~MatNxN(void);
543 
544  inline integer iGetNumRows(void) const;
545  inline integer iGetNumCols(void) const;
546  void Reset(const doublereal d = 0.);
547  inline void Put(integer i, integer j, const doublereal& d);
548  inline void Add(integer i, integer j, const doublereal& d);
549  inline void Sub(integer i, integer j, const doublereal& d);
550  inline const doublereal& dGet(integer i, integer j) const;
551 
552  const MatNxN& Copy(const MatNxN& m);
553 
554  /* *this = m * n */
555  const MatNxN& Mult(const MatNx3& m, const Mat3xN& n);
556 
557  inline doublereal& operator () (integer i, integer j);
558  inline const doublereal& operator () (integer i, integer j) const;
559 };
560 
561 
562 inline integer MatNxN::iGetNumRows(void) const
563 {
564 #ifdef DEBUG
565  IsValid();
566 #endif /* DEBUG */
567  return iNumRows;
568 }
569 
570 inline integer MatNxN::iGetNumCols(void) const
571 {
572 #ifdef DEBUG
573  IsValid();
574 #endif /* DEBUG */
575  return iNumRows;
576 }
577 
578 inline void MatNxN::Put(integer i, integer j, const doublereal& d)
579 {
580 #ifdef DEBUG
581  IsValid();
582 #endif /* DEBUG */
583  ASSERT(i > 0 && i <= iNumRows);
584  ASSERT(j > 0 && j <= iNumRows);
585  pdMat[--j][--i] = d;
586 }
587 
588 
589 inline void MatNxN::Add(integer i, integer j, const doublereal& d)
590 {
591 #ifdef DEBUG
592  IsValid();
593 #endif /* DEBUG */
594  ASSERT(i > 0 && i <= iNumRows);
595  ASSERT(j > 0 && j <= iNumRows);
596  pdMat[--j][--i] += d;
597 }
598 
599 
600 inline void MatNxN::Sub(integer i, integer j, const doublereal& d)
601 {
602 #ifdef DEBUG
603  IsValid();
604 #endif /* DEBUG */
605  ASSERT(i > 0 && i <= iNumRows);
606  ASSERT(j > 0 && j <= iNumRows);
607  pdMat[--j][--i] -= d;
608 }
609 
610 
611 inline const doublereal&
613 {
614 #ifdef DEBUG
615  IsValid();
616 #endif /* DEBUG */
617  ASSERT(i > 0 && i <= iNumRows);
618  ASSERT(j > 0 && j <= iNumRows);
619  return pdMat[--j][--i];
620 }
621 
622 inline doublereal&
624 {
625 #ifdef DEBUG
626  IsValid();
627 #endif /* DEBUG */
628  ASSERT(i > 0 && i <= iNumRows);
629  ASSERT(j > 0 && j <= iNumRows);
630  return pdMat[--j][--i];
631 }
632 
633 inline const doublereal&
635 {
636 #ifdef DEBUG
637  IsValid();
638 #endif /* DEBUG */
639  ASSERT(i > 0 && i <= iNumRows);
640  ASSERT(j > 0 && j <= iNumRows);
641  return pdMat[--j][--i];
642 }
643 
644 std::ostream& operator << (std::ostream&, const MatNxN&);
645 
646 /* MatNxN - end */
647 
648 
649 #endif /* MATVEC3N_H */
650 
void Resize(integer ns)
Definition: matvec3n.cc:133
void Sub(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:463
integer iMaxRows
Definition: matvec3n.h:527
void Put(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:578
const Mat3xN & LeftMult(const Mat3x3 &m)
Definition: matvec3n.cc:348
void Put(int i, integer j, const doublereal &d)
Definition: matvec3n.h:306
Definition: matvec3.h:98
const VecN & Copy(const VectorHandler &vh, integer iFirstIndex=1)
Definition: matvec3n.cc:116
integer iGetNumRows(void) const
Definition: matvec3n.h:562
integer start
Definition: matvec3n.h:47
~MatNx3(void)
Definition: matvec3n.cc:784
void PutVec(integer iRow, const Vec3 &v)
Definition: matvec3n.cc:856
const doublereal & dGet(integer i, integer j) const
Definition: matvec3n.h:474
integer iGetNumRows(void) const
Definition: matvec3n.h:254
void Create_(integer ns)
Definition: matvec3n.cc:252
void Add(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:452
~Mat3xN(void)
Definition: matvec3n.cc:312
void Create_(integer ns)
Definition: matvec3n.cc:737
integer iMaxRows
Definition: matvec3n.h:387
~VecN(void)
Definition: matvec3n.cc:127
Mat3x3 GetMat3x3(integer iFirstCol) const
Definition: matvec3n.cc:607
void Resize(integer ns)
Definition: matvec3n.cc:789
const Mat3xN & operator+=(const Mat3xN &m)
Definition: matvec3n.cc:459
integer iGetNumRows(void) const
Definition: matvec3n.h:431
const doublereal & dGet(integer i, integer j) const
Definition: matvec3n.h:612
void PutMat3x3(integer iCol, const Mat3x3 &m)
Definition: matvec3n.cc:628
#define NO_OP
Definition: myassert.h:74
MatNx3(void)
Definition: matvec3n.cc:757
integer iNumRows
Definition: matvec3n.h:528
const MatNxN & Mult(const MatNx3 &m, const Mat3xN &n)
Definition: matvec3n.cc:1017
integer iNumCols
Definition: matvec3n.h:235
doublereal * pdVec
Definition: matvec3n.h:89
void Destroy_(void)
Definition: matvec3n.cc:264
doublereal ** pdMat
Definition: matvec3n.h:530
void Add(integer i, const doublereal &d)
Definition: matvec3n.h:169
Vec3 GetVec(integer iRow) const
Definition: matvec3n.cc:844
~MatNxN(void)
Definition: matvec3n.cc:981
std::ostream & operator<<(std::ostream &, const MatNxN &)
Definition: matvec3n.cc:1041
integer Number(void) const
Definition: matvec3n.h:67
const Mat3xN & operator-=(const Mat3xN &m)
Definition: matvec3n.cc:473
integer iNumRows
Definition: matvec3n.h:88
void SubMat3x3(integer iCol, const Mat3x3 &m)
Definition: matvec3n.cc:676
const MatNx3 & Transpose(const Mat3xN &n)
Definition: matvec3n.cc:898
integer iMaxCols
Definition: matvec3n.h:234
Vec3 GetVec(integer iCol) const
Definition: matvec3n.cc:553
integer offset
Definition: matvec3n.h:47
doublereal & operator()(integer i, integer j)
Definition: matvec3n.h:485
const MatNx3 & RightMult(const MatNx3 &n, const Mat3x3 &m)
Definition: matvec3n.cc:814
void Create_(integer ns)
Definition: matvec3n.cc:928
ArrayView(integer s, integer o, integer n)
Definition: matvec3n.h:50
void Put(integer i, const doublereal &d)
Definition: matvec3n.h:159
void SubVec(integer iRow, const Vec3 &v)
Definition: matvec3n.cc:884
void Add(int i, integer j, const doublereal &d)
Definition: matvec3n.h:316
friend std::ostream & operator<<(std::ostream &, const MatNxN &)
Definition: matvec3n.cc:1041
const doublereal * pGetVec(void) const
Definition: matvec3n.h:125
integer Offset(void) const
Definition: matvec3n.h:63
void Destroy_(void)
Definition: matvec3n.cc:944
doublereal * pdRows[3]
Definition: matvec3n.h:236
void Reset(const doublereal d=0.)
Definition: matvec3n.cc:986
const MatNx3 & Mult(const MatNxN &m, const MatNx3 &n)
integer iMaxRows
Definition: matvec3n.h:87
integer iGetNumRows(void) const
Definition: matvec3n.h:150
void Reset(const doublereal &d=0.)
Definition: matvec3n.cc:334
void Sub(integer i, const doublereal &d)
Definition: matvec3n.h:178
integer iGetNumCols(void) const
Definition: matvec3n.h:570
void AddVec(integer iRow, const Vec3 &v)
Definition: matvec3n.cc:870
void Sub(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:600
void SubVec(integer iCol, const Vec3 &v)
Definition: matvec3n.cc:593
integer iGetNumCols(void) const
Definition: matvec3n.h:298
void RightMult(const MatNx3 &n, const Vec3 &v)
Definition: matvec3n.cc:157
Mat3x3 GetMat3x3ScalarMult(integer iFirstCol, const doublereal &d) const
Definition: matvec3n.cc:700
#define ASSERT(expression)
Definition: colamd.c:977
const VecN & operator*=(const doublereal &d)
Definition: matvec3n.cc:181
const doublereal & dGet(int i, integer j) const
Definition: matvec3n.h:336
void Add(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:589
Vec3 operator*(const VecN &v) const
Definition: matvec3n.cc:488
void Resize(integer ns)
Definition: matvec3n.cc:318
const VecN & Mult(const MatNxN &m, const VecN &n)
Definition: matvec3n.cc:192
integer Last(void) const
Definition: matvec3n.h:71
void AddVec(integer iCol, const Vec3 &v)
Definition: matvec3n.cc:579
void Create_(integer ns)
Definition: matvec3n.cc:47
doublereal & operator()(integer i)
Definition: matvec3n.h:198
MatNxN(void)
Definition: matvec3n.cc:956
const Mat3xN & Mult(const Mat3xN &m, const MatNxN &n)
const Mat3xN & operator=(const Mat3xN &)
integer number
Definition: matvec3n.h:47
void PutVec(integer iCol, const Vec3 &v)
Definition: matvec3n.cc:565
const MatNx3 & operator=(const MatNx3 &)
Definition: matvec3n.h:76
const MatNxN & operator=(const MatNxN &)
doublereal & operator()(integer i, integer j)
Definition: matvec3n.h:347
void Destroy_(void)
Definition: matvec3n.cc:57
const VecN & operator=(const VecN &)
Mat3xN(void)
Definition: matvec3n.cc:272
doublereal * pdCols[3]
Definition: matvec3n.h:389
const Mat3xN & Copy(const Mat3xN &m)
Definition: matvec3n.cc:407
void Reset(const doublereal d=0.)
Definition: matvec3n.cc:147
~ArrayView(void)
Definition: matvec3n.h:55
doublereal & operator()(integer i, integer j)
Definition: matvec3n.h:623
void Reset(const doublereal d=0.)
Definition: matvec3n.cc:802
void AddMat3x3(integer iCol, const Mat3x3 &m)
Definition: matvec3n.cc:652
double doublereal
Definition: colamd.c:52
doublereal * pdVec
Definition: matvec3n.h:529
const VecN & operator+=(const VecN &m)
Definition: matvec3n.cc:169
integer Start(void) const
Definition: matvec3n.h:59
long int integer
Definition: colamd.c:51
void Sub(int i, integer j, const doublereal &d)
Definition: matvec3n.h:326
doublereal * pGetVec(void)
Definition: matvec3n.h:129
VecN(void)
Definition: matvec3n.cc:65
const Mat3xN & operator*=(const doublereal &d)
Definition: matvec3n.cc:422
const doublereal & dGet(integer i) const
Definition: matvec3n.h:188
integer iNumRows
Definition: matvec3n.h:388
void Put(integer i, integer j, const doublereal &d)
Definition: matvec3n.h:441
const Mat3xN & operator/=(const doublereal &d)
Definition: matvec3n.cc:439
void Destroy_(void)
Definition: matvec3n.cc:749
const MatNxN & Copy(const MatNxN &m)
Definition: matvec3n.cc:997