SheafSystem  0.0.0.0
antisymmetric_matrix_3x3.impl.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Implementation for antisymmetric_matrix_3x3.
19 
20 
21 #ifndef ANTISYMMETRIC_MATRIX_3X3_IMPL_H
22 #define ANTISYMMETRIC_MATRIX_3X3_IMPL_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ASSERT_CONTRACT_H
29 #include "SheafSystem/assert_contract.h"
30 #endif
31 
32 #ifndef ERROR_MESSAGE_H
33 #include "SheafSystem/error_message.h"
34 #endif
35 
36 #ifndef ANTISYMMETRIC_MATRIX_3X3_H
37 #include "SheafSystem/antisymmetric_matrix_3x3.h"
38 #endif
39 
40 #ifndef GENERAL_MATRIX_1x3_H
41 #include "SheafSystem/general_matrix_1x3.h"
42 #endif
43 
44 #ifndef GENERAL_MATRIX_3X2_H
45 #include "SheafSystem/general_matrix_3x2.h"
46 #endif
47 
48 #ifndef GENERAL_MATRIX_3X1_H
49 #include "SheafSystem/general_matrix_3x1.h"
50 #endif
51 
52 #ifndef GENERAL_MATRIX_3X3_H
53 #include "SheafSystem/general_matrix_3x3.h"
54 #endif
55 
56 #ifndef STD_SSTREAM_H
57 #include "SheafSystem/std_sstream.h"
58 #endif
59 
60 #ifndef STD_CMATH_H
61 #include "SheafSystem/std_cmath.h"
62 #endif
63 
64 namespace fiber_bundle
65 {
66 
67 using namespace sheaf;
68 
69 //==============================================================================
70 // MEMBER FUNCTIONS
71 //==============================================================================
72 
74 template <typename T>
75 antisymmetric_matrix_3x3<T>::
76 operator at2_e3_row_dofs_type<T>& () const
77 {
78  // Preconditions:
79 
80  // Body:
81 
82  T* lcomps = const_cast<T*>(components);
83 
84  at2_e3_row_dofs_type<T>& result =
85  reinterpret_cast<at2_e3_row_dofs_type<T>&>(*lcomps);
86 
87  // Postconditions:
88 
89  // Exit:
90 
91  return result;
92 }
93 
95 template <typename T>
96 int
99 {
100  // Preconditions:
101 
102  // Body:
103 
104  // Postconditions:
105 
106  // Exit:
107 
108  return 3;
109 }
110 
112 template <typename T>
113 int
116 {
117  // Preconditions:
118 
119  // Body:
120 
121  // Postconditions:
122 
123  // Exit:
124 
125  return 3;
126 }
127 
129 template <typename T>
130 int
132 d()
133 {
134  // Preconditions:
135 
136  // Body:
137 
138  // Postconditions:
139 
140  // Exit:
141 
142  return 3;
143 }
144 
146 template <typename T>
147 T*
149 operator[](int nrow)
150 {
151  // Preconditions:
152 
153  require(nrow >= 0 && nrow < number_of_rows());
154 
155  // Body:
156 
157  T* result = &components[row_index(nrow)];
158 
159  // Postconditions:
160 
161  ensure(result != 0);
162 
163  // Exit:
164 
165  return result;
166 }
167 
168 template <typename T>
169 const T*
171 operator[](int nrow) const
172 {
173  // Preconditions:
174 
175  require(nrow >= 0 && nrow < number_of_rows());
176 
177  // Body:
178 
179  const T* result = &components[row_index(nrow)];
180 
181  // Postconditions:
182 
183  ensure(result != 0);
184 
185  // Exit:
186 
187  return result;
188 }
189 
191 template <typename T>
193 operator T* ()
194 {
195  // Preconditions:
196 
197  // Body:
198 
199  //cout << "antisymmetric_matrix_3x3<T>::operator T* () " << std::endl;
200 
201  T* result = components;
202 
203  // Postconditions:
204 
205  ensure(result != 0);
206 
207  // Exit:
208 
209  return result;
210 }
211 
213 template <typename T>
215 operator const T* () const
216 {
217  // Preconditions:
218 
219  // Body:
220 
221  //cout << "antisymmetric_matrix_3x3<T>::operator const T* () const " << std::endl;
222 
223  const T* result = components;
224 
225  // Postconditions:
226 
227  ensure(result != 0);
228 
229  // Exit:
230 
231  return result;
232 }
233 
235 template <typename T>
236 int
238 row_index(int xrow) const
239 {
240 
241  // Preconditions:
242 
243  require(xrow >= 0 && xrow < number_of_rows()-1);
244 
245  // Body:
246 
247  int nrows = number_of_rows();
248  int result = (xrow*(2*nrows-1-xrow))/2 - 1 - xrow;
249 
250  //int result = (xrow*(5-xrow))/2 - 1 - xrow;
251 
252  // Postconditions:
253 
254  ensure(result == (xrow*(2*number_of_rows()-1-xrow))/2 - 1 - xrow);
255 
256  // Exit:
257 
258  return result;
259 }
260 
262 template <typename T>
264 operator general_matrix_3x3<T> () const
265 {
266  // Preconditions:
267 
268  // Body:
269 
270  general_matrix_3x3<T> result;
271 
272  const antisymmetric_matrix_3x3<T>& lm = *this;
273 
274  result[0][0] = 0.0;
275  result[0][1] = lm[0][1];
276  result[0][2] = lm[0][2];
277 
278  result[1][0] = -lm[0][1];
279  result[1][1] = 0.0;
280  result[1][2] = lm[1][2];
281 
282  result[2][0] = -lm[0][2];
283  result[2][1] = -lm[1][2];
284  result[2][2] = 0.0;
285 
286  // Postconditions:
287 
288  ensure(unexecutable("result == *this"));
289 
290  // Exit:
291 
292  return result;
293 }
294 
296 template <typename T>
299 row(int xrow) const
300 {
301  // Preconditions:
302 
303  require(xrow >= 0 && xrow < number_of_rows());
304 
305  // Body:
306 
307  general_matrix_1x3<T> result;
308 
309  // Just brute force it for the 3x3 case.
310 
311  if(xrow == 0)
312  {
313  result.components[0] = 0.0; // [0][0];
314  result.components[1] = components[0]; // [0][1];
315  result.components[2] = components[1]; // [0][2];
316  }
317  else if(xrow == 1)
318  {
319  result.components[0] = -components[0]; // [1][0];
320  result.components[1] = 0.0; // [1][1];
321  result.components[2] = components[2]; // [1][2];
322  }
323  else // xrow == 2
324  {
325  result.components[0] = -components[1]; // [2][0];
326  result.components[1] = -components[2]; // [1][2];
327  result.components[2] = 0.0; // [2][2];
328  }
329 
330  // Postconditions:
331 
332  // Exit:
333 
334  return result;
335 
336 }
337 
339 template <typename T>
342 column(int xcolumn) const
343 {
344  // Preconditions:
345 
346  require(xcolumn >= 0 && xcolumn < number_of_columns());
347 
348  // Body:
349 
350  general_matrix_3x1<T> result;
351 
352  // Just brute force it for the 3x3 case.
353 
354  if(xcolumn == 0)
355  {
356  result.components[0] = 0.0; // [0][0];
357  result.components[1] = -components[0]; // [1][0];
358  result.components[2] = -components[1]; // [2][0];
359  }
360  else if(xcolumn == 1)
361  {
362  result.components[0] = components[0]; // [0][1];
363  result.components[1] = 0.0; // [1][1];
364  result.components[2] = -components[2]; // [2][1];
365  }
366  else // xcolumn == 2
367  {
368  result.components[0] = components[1]; // [0][2];
369  result.components[1] = components[2]; // [1][2];
370  result.components[2] = 0.0; // [2][2];
371  }
372 
373  // Postconditions:
374 
375  // Exit:
376 
377  return result;
378 }
379 
381 template <typename T>
382 void
385 {
386  // Preconditions:
387 
388  // Body:
389 
390  // Get the cofactors.
391 
392  const antisymmetric_matrix_3x3<T>& lm = *this;
393 
394  //T a00 = 0;
395  T a01 = lm[0][1];
396  T a02 = lm[0][2];
397  T a10 = -a01;
398  //T a11 = 0;
399  T a12 = lm[1][2];
400  T a20 = -a02;
401  T a21 = -a12;
402  //T a22 = 0;
403 
404  //T c00 = a11*a22 - a12*a21;
405  //T c01 = a12*a20 - a10*a22;
406  //T c02 = a10*a21 - a11*a20;
407 
408  //T c10 = a02*a21 - a01*a22;
409  //T c11 = a00*a22 - a02*a20;
410  //T c12 = a01*a20 - a00*a21;
411 
412  //T c20 = a01*a12 - a02*a11;
413  //T c21 = a02*a10 - a00*a12;
414  //T c22 = a00*a11 - a01*a10;
415 
416  T c00 = -a12*a21;
417  T c01 = a12*a20;
418  T c02 = a10*a21;
419 
420  T c10 = a02*a21;
421  T c11 = -a02*a20;
422  T c12 = a01*a20;
423 
424  T c20 = a01*a12;
425  T c21 = a02*a10;
426  T c22 = -a01*a10;
427 
428  // The adjoint matrix is the transpose of the cofactor matrix.
429 
430  xresult[0][0] = c00;
431  xresult[0][1] = c10;
432  xresult[0][2] = c20;
433 
434  xresult[1][0] = c01;
435  xresult[1][1] = c11;
436  xresult[1][2] = c21;
437 
438  xresult[2][0] = c02;
439  xresult[2][1] = c12;
440  xresult[2][2] = c22;
441 
442  // Postconditions:
443 
444  // Exit:
445 }
446 
448 template <typename T>
451 adjoint() const
452 {
453  // Preconditions:
454 
455  // Body:
456 
457  general_matrix_3x3<T> result;
458  adjoint(result);
459 
460  // Postconditions:
461 
462  // Exit:
463 
464  return result;
465 }
466 
468 template <typename T>
469 void
471 assign(const T& xvalue)
472 {
473  // Preconditions:
474 
475  // Body:
476 
477  // Unroll the loop in this case.
478 
479  components[0] = xvalue;
480  components[1] = xvalue;
481  components[2] = xvalue;
482 
483  // Postconditions:
484 
485  // Exit:
486 }
487 
489 template <typename T>
490 void
492 determinant(T& xresult) const
493 {
494  // Preconditions:
495 
496  // Body:
497 
498  // For an antisymmetric matrix, the determinant is zero
499  // for all odd n (ie; n = 1, 3 5, ...).
500 
501  xresult = T(0);
502 
503  // Postconditions:
504 
505  // Exit:
506 
507 }
508 
510 template <typename T>
511 T
513 determinant() const
514 {
515  // Preconditions:
516 
517  // Body:
518 
519  T result;
520 
521  determinant(result);
522 
523  // Postconditions:
524 
525  // Exit:
526 
527  return result;
528 }
529 
530 
532 template <typename T>
533 void
536 {
537  // Preconditions:
538 
539  // Body:
540 
541  post_fatal_error_message("No inverse; determinant is zero.");
542 
543  // Postconditions:
544 
545  // Exit:
546 }
547 
549 template <typename T>
552 inverse() const
553 {
554  // Preconditions:
555 
556  // Body:
557 
559  inverse(result);
560 
561  // Postconditions:
562 
563  // Exit:
564 
565  return result;
566 }
567 
569 template <typename T>
570 bool
573 {
574  // Preconditions:
575 
576  // Body:
577 
578  bool result = false;
579 
580  // Postconditions:
581 
582  ensure(result == false);
583 
584  // Exit:
585 
586  return result;
587 }
588 
590 template <typename T>
591 void
593 multiply(const T& xscalar, antisymmetric_matrix_3x3<T>& xresult) const
594 {
595  // Preconditions:
596 
597  // Body:
598 
599  // Unroll the loop in this case.
600 
601  xresult.components[0] = xscalar*components[0];
602  xresult.components[1] = xscalar*components[1];
603  xresult.components[2] = xscalar*components[2];
604 
605  // Postconditions:
606 
607  //@issue $$ISSUE: We can't make the following comparison because of
608  // floating point roundoff.
609  //ensure_for_all(i, 0, d(), xresult.components[i] == xscalar*components[i]);
610 
611  // Exit:
612 
613 }
614 
616 template <typename T>
619 multiply(const T& xscalar) const
620 {
621  // Preconditions:
622 
623  // Body:
624 
626  multiply(xscalar, result);
627 
628  // Postconditions:
629 
630  // Exit:
631 
632  return result;
633 }
634 
636 template <typename T>
637 void
640  general_matrix_3x1<T>& xresult) const
641 {
642  // Preconditions:
643 
644  // Body:
645 
646  // Multiply [A][B] where [A] = *this & [B] = xother.
647 
648  const antisymmetric_matrix_3x3<T>& lm = *this;
649 
650  T a00 = 0.0;
651  T a01 = lm[0][1];
652  T a02 = lm[0][2];
653  T a10 = -a01;
654  T a11 = 0.0;
655  T a12 = lm[1][2];
656  T a20 = -a02;
657  T a21 = -a12;
658  T a22 = 0.0;
659 
660  T b00 = xother[0][0];
661  T b10 = xother[1][0];;
662  T b20 = xother[2][0];
663 
664  //xresult[0][0] = a00*b00 + a01*b10 + a02*b20;
665  //xresult[1][0] = a10*b00 + a11*b10 + a12*b20;
666  //xresult[2][0] = a20*b00 + a21*b10 + a22*b20;
667 
668  xresult[0][0] = a01*b10 + a02*b20;
669  xresult[1][0] = a10*b00 + a12*b20;
670  xresult[2][0] = a20*b00 + a21*b10;
671 
672  // Postconditions:
673 
674  // Exit:
675 
676 }
677 
679 template <typename T>
682 multiply(const general_matrix_3x1<T>& xother) const
683 {
684  // Preconditions:
685 
686  // Body:
687 
688  general_matrix_3x1<T> result;
689  multiply(xother, result);
690 
691  // Postconditions:
692 
693  // Exit:
694 
695  return result;
696 }
697 
699 template <typename T>
700 void
703  general_matrix_3x2<T>& xresult) const
704 {
705  // Preconditions:
706 
707  // Body:
708 
709  // Multiply [A][B] where [A] = *this & [B] = xother.
710 
711  const antisymmetric_matrix_3x3<T>& lm = *this;
712 
713  T a00 = 0.0;
714  T a01 = lm[0][1];
715  T a02 = lm[0][2];
716  T a10 = -a01;
717  T a11 = 0.0;
718  T a12 = lm[1][2];
719  T a20 = -a02;
720  T a21 = -a12;
721  T a22 = 0.0;
722 
723  T b00 = xother[0][0];
724  T b01 = xother[0][1];
725 
726  T b10 = xother[1][0];;
727  T b11 = xother[1][1];
728 
729  T b20 = xother[2][0];
730  T b21 = xother[2][1];
731 
732  //xresult[0][0] = a00*b00 + a01*b10 + a02*b20;
733  //xresult[0][1] = a00*b01 + a01*b11 + a02*b21;
734 
735  //xresult[1][0] = a10*b00 + a11*b10 + a12*b20;
736  //xresult[1][1] = a10*b01 + a11*b11 + a12*b21;
737 
738  //xresult[2][0] = a20*b00 + a21*b10 + a22*b20;
739  //xresult[2][1] = a20*b01 + a21*b11 + a22*b21;
740 
741  xresult[0][0] = a01*b10 + a02*b20;
742  xresult[0][1] = a01*b11 + a02*b21;
743 
744  xresult[1][0] = a10*b00 + a12*b20;
745  xresult[1][1] = a10*b01 + a12*b21;
746 
747  xresult[2][0] = a20*b00 + a21*b10;
748  xresult[2][1] = a20*b01 + a21*b11;
749 
750  // Postconditions:
751 
752  // Exit:
753 
754 }
755 
757 template <typename T>
760 multiply(const general_matrix_3x2<T>& xother) const
761 {
762  // Preconditions:
763 
764  // Body:
765 
766  general_matrix_3x2<T> result;
767  multiply(xother, result);
768 
769  // Postconditions:
770 
771  // Exit:
772 
773  return result;
774 }
775 
777 template <typename T>
778 void
781  general_matrix_3x3<T>& xresult) const
782 {
783  // Preconditions:
784 
785  // Body:
786 
787  // Multiply [A][B] where [A] = *this & [B] = xother.
788 
789  const antisymmetric_matrix_3x3<T>& lm = *this;
790 
791  T a00 = 0.0;
792  T a01 = lm[0][1];
793  T a02 = lm[0][2];
794  T a10 = -a01;
795  T a11 = 0.0;
796  T a12 = lm[1][2];
797  T a20 = -a02;
798  T a21 = -a12;
799  T a22 = 0.0;
800 
801  T b00 = xother[0][0];
802  T b01 = xother[0][1];
803  T b02 = xother[0][2];
804 
805  T b10 = xother[1][0];;
806  T b11 = xother[1][1];
807  T b12 = xother[1][2];
808 
809  T b20 = xother[2][0];
810  T b21 = xother[2][1];
811  T b22 = xother[2][2];
812 
813  //xresult[0][0] = a00*b00 + a01*b10 + a02*b20;
814  //xresult[0][1] = a00*b01 + a01*b11 + a02*b21;
815  //xresult[0][2] = a00*b02 + a01*b12 + a02*b22;
816 
817  //xresult[1][0] = a10*b00 + a11*b10 + a12*b20;
818  //xresult[1][1] = a10*b01 + a11*b11 + a12*b21;
819  //xresult[1][2] = a10*b02 + a11*b12 + a12*b22;
820 
821  //xresult[2][0] = a20*b00 + a21*b10 + a22*b20;
822  //xresult[2][1] = a20*b01 + a21*b11 + a22*b21;
823  //xresult[2][2] = a20*b02 + a21*b12 + a22*b22;
824 
825  xresult[0][0] = a01*b10 + a02*b20;
826  xresult[0][1] = a01*b11 + a02*b21;
827  xresult[0][2] = a01*b12 + a02*b22;
828 
829  xresult[1][0] = a10*b00 + a12*b20;
830  xresult[1][1] = a10*b01 + a12*b21;
831  xresult[1][2] = a10*b02 + a12*b22;
832 
833  xresult[2][0] = a20*b00 + a21*b10;
834  xresult[2][1] = a20*b01 + a21*b11;
835  xresult[2][2] = a20*b02 + a21*b12;
836 
837 
838  // Postconditions:
839 
840  // Exit:
841 
842 }
843 
845 template <typename T>
848 multiply(const general_matrix_3x3<T>& xother) const
849 {
850  // Preconditions:
851 
852  // Body:
853 
854  general_matrix_3x3<T> result;
855  multiply(xother, result);
856 
857  // Postconditions:
858 
859  // Exit:
860 
861  return result;
862 }
863 
865 template <typename T>
866 void
869  general_matrix_3x3<T>& xresult) const
870 {
871  // Preconditions:
872 
873  // Body:
874 
875  // Multiply [A][B] where [A] = *this & [B] = xother.
876 
877  const antisymmetric_matrix_3x3<T>& lm = *this;
878 
879  T a00 = 0.0;
880  T a01 = lm[0][1];
881  T a02 = lm[0][2];
882  T a10 = -a01;
883  T a11 = 0.0;
884  T a12 = lm[1][2];
885  T a20 = -a02;
886  T a21 = -a12;
887  T a22 = 0.0;
888 
889  T b00 = 0.0;
890  T b01 = xother[0][1];
891  T b02 = xother[0][2];
892  T b10 = -b01;
893  T b11 = 0.0;
894  T b12 = xother[1][2];
895  T b20 = -b02;
896  T b21 = -b12;
897  T b22 = 0.0;
898 
899  //xresult[0][0] = a00*b00 + a01*b10 + a02*b20;
900  //xresult[0][1] = a00*b01 + a01*b11 + a02*b21;
901  //xresult[0][2] = a00*b02 + a01*b12 + a02*b22;
902 
903  //xresult[1][0] = a10*b00 + a11*b10 + a12*b20;
904  //xresult[1][1] = a10*b01 + a11*b11 + a12*b21;
905  //xresult[1][2] = a10*b02 + a11*b12 + a12*b22;
906 
907  //xresult[2][0] = a20*b00 + a21*b10 + a22*b20;
908  //xresult[2][1] = a20*b01 + a21*b11 + a22*b21;
909  //xresult[2][2] = a20*b02 + a21*b12 + a22*b22;
910 
911  xresult[0][0] = a01*b10 + a02*b20;
912  xresult[0][1] = a02*b21;
913  xresult[0][2] = a01*b12;
914 
915  xresult[1][0] = a12*b20;
916  xresult[1][1] = a10*b01 + a12*b21;
917  xresult[1][2] = a10*b02;
918 
919  xresult[2][0] = a21*b10;
920  xresult[2][1] = a20*b01;
921  xresult[2][2] = a20*b02 + a21*b12;
922 
923  // Postconditions:
924 
925  // Exit:
926 
927 }
928 
930 template <typename T>
934 {
935  // Preconditions:
936 
937  // Body:
938 
939  general_matrix_3x3<T> result;
940  multiply(xother, result);
941 
942  // Postconditions:
943 
944  // Exit:
945 
946  return result;
947 }
948 
950 template <typename T>
951 void
953 trace(T& xresult) const
954 {
955  // Preconditions:
956 
957  // Body:
958 
959  xresult = T(0);
960 
961  // Postconditions:
962 
963  ensure(xresult == 0);
964 
965  // Exit:
966 }
967 
969 template <typename T>
970 T
972 trace() const
973 {
974  // Preconditions:
975 
976  // Body:
977 
978  T result;
979 
980  trace(result);
981 
982  // Postconditions:
983 
984  // Exit:
985 
986  return result;
987 }
988 
990 template <typename T>
991 void
994 {
995  // Preconditions:
996 
997  // Body:
998 
999  // Just unroll the loop here.
1000 
1001  const antisymmetric_matrix_3x3<T>& lm = *this;
1002 
1003  xresult[0][1] = -lm[0][1];
1004  xresult[0][2] = -lm[0][2];
1005  xresult[1][2] = -lm[1][2];
1006 
1007  // Postconditions:
1008 
1009  // Exit:
1010 
1011 }
1012 
1014 template <typename T>
1017 transpose() const
1018 {
1019  // Preconditions:
1020 
1021  // Body:
1022 
1024  transpose(result);
1025 
1026  // Postconditions:
1027 
1028  // Exit:
1029 
1030  return result;
1031 }
1032 
1033 // =============================================================================
1034 // NON-MEMBER FUNCTIONS
1035 // =============================================================================
1036 
1037 #ifndef DOXYGEN_SKIP_IMPLEMENTATIONS
1038 
1040 template <typename T>
1041 std::ostream& operator<<(std::ostream& xos, const antisymmetric_matrix_3x3<T>& xm)
1042 {
1043  // Preconditions:
1044 
1045  // Body:
1046 
1047  // Here we will actually print the elements on and below the diagonal
1048  // even though we don't store them.
1049 
1050  int nrows = xm.number_of_rows();
1051  int ncols = xm.number_of_columns();
1052 
1053  for(int i=0; i<nrows; ++i)
1054  {
1055  for(int j=0; j<ncols; ++j)
1056  {
1057  T v;
1058  if(i == j)
1059  v = T(0);
1060  else if(i < j)
1061  v = xm[i][j];
1062  else
1063  v = -xm[j][i];
1064 
1065  xos << " " << v;
1066  }
1067  xos << std::endl;
1068  }
1069 
1070  // Postconditions:
1071 
1072  // Exit:
1073 
1074  return xos;
1075 }
1076 
1077 #endif // ifndef DOXYGEN_SKIP_IMPLEMENTATIONS
1078 
1079 //==============================================================================
1080 //==============================================================================
1081 
1082 } // namespace fiber_bundle
1083 
1084 #endif // ANTISYMMETRIC_MATRIX_3X3_IMPL
1085 
general_matrix_1x3< T > row(int xrow) const
A 1x3 matrix containing the elements or row xrow.
antisymmetric_matrix_3x3< T > inverse() const
The inverse of the matrix (auto-allocated).
static int number_of_rows()
The number of rows.
Antisymmetric matrix with 3 rows and 3 columns.
General matrix with 3 rows and 2 columns.
void assign(const T &xscalar)
Assign all elements of this matrix to the value xvalue.
antisymmetric_matrix_3x3< T > transpose() const
The transpose of the matrix (auto-allocated).
int row_index(int xrow) const
Index for row xrow in the linear storage array.
T trace() const
The trace of the matrix (auto-allocated).
void trace(const S0 &x0, SR &xresult, bool xauto_access)
Definition: sec_st2.impl.h:99
void multiply(const T &xscalar, antisymmetric_matrix_3x3< T > &xresult) const
This matrix multiplied by a scalar (pre-allocated).
general_matrix_3x3< T > adjoint() const
The adjoint of the matrix (auto-allocated).
Row dofs type for class at2_e3.
Definition: at2_e3.h:51
General matrix with 3 rows and 1 column.
static int d()
Dimension of the underlying elements.
bool is_positive_definite() const
True if this matrix is positive definite. Always returns false for antisymmetric_matrices.
static int number_of_columns()
The number of columns.
general_matrix_3x1< T > column(int xcolumn) const
A 3x1 matrix containing the elements or column xcolumn.
T components[3]
Linear storage array.
T determinant() const
The determinant of the matrix (auto-allocated).
void determinant(const S0 &x0, SR &xresult, bool xauto_access)
Definition: sec_st2.impl.h:131
General matrix with 3 rows and 3 columns.
General matrix with 1 row and 3 columns.
Namespace for the sheaves component of the sheaf system.
T * operator[](int xrow)
Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i]...
T components[3]
Linear storage array.
SHEAF_DLL_SPEC void multiply(const vd &x0, const vd_value_type &x1, vd &xresult, bool xauto_access)
Vector x0 multiplied by scalar x1 (pre-allocated version for persistent types).
Definition: vd.cc:1924
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC void inverse(const gl2_lite &xlite, gl2_lite &xresult)
Inverse (pre-allocated version for volatile type).
Definition: gl2.cc:1484