File: classOpenBabel_1_1matrix3x3.shtml

package info (click to toggle)
openbabel 2.3.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 75,308 kB
  • ctags: 41,952
  • sloc: cpp: 321,252; ansic: 89,228; python: 7,262; perl: 6,418; pascal: 793; sh: 194; xml: 97; ruby: 55; makefile: 47; java: 23
file content (1076 lines) | stat: -rw-r--r-- 60,334 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>matrix3x3 Class Reference</title>
<link href="/site.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="search/search.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<!--#include file="header.html" -->
<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.shtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.shtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.shtml"><span>Modules</span></a></li>
      <li><a href="namespaces.shtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.shtml"><span>Classes</span></a></li>
      <li><a href="files.shtml"><span>Files</span></a></li>
      <li><a href="examples.shtml"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.shtml"><span>Class&#160;List</span></a></li>
      <li><a href="classes.shtml"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.shtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.shtml"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceOpenBabel.shtml">OpenBabel</a>      </li>
      <li class="navelem"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">matrix3x3 Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="OpenBabel::matrix3x3" -->
<p><code>#include &lt;<a class="el" href="matrix3x3_8h_source.shtml">openbabel/math/matrix3x3.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for matrix3x3:</div>
<div class="dyncontent">
<div class="center"><img src="classOpenBabel_1_1matrix3x3__inherit__graph.png" border="0" usemap="#matrix3x3_inherit__map" alt="Inheritance graph"/></div>
<map name="matrix3x3_inherit__map" id="matrix3x3_inherit__map">
<area shape="rect" id="node3" href="classOpenBabel_1_1transform3d.shtml" title="Handle 3D transformations, such as space group definitions." alt="" coords="5,83,109,112"/></map>
<center><span class="legend">[<a href="graph_legend.shtml">legend</a>]</span></center></div>

<p><a href="classOpenBabel_1_1matrix3x3-members.shtml">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a02fbfa24687cc574a29a8d1c0ff0a2db">matrix3x3</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#ac0461afe3f76b83a10fe99fac330f702">matrix3x3</a> (double s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a4736c0c51dc08725c39e02a84c2390ec">matrix3x3</a> (<a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> row1, <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> row2, <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> row3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a0a0be9b2cd186a15d56efdaaefa9a994">matrix3x3</a> (double d[3][3])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a6d3758cd834f7dd0f5c0816231349cb9">~matrix3x3</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a3f648014bbd17f8090159d2d93cbe30c">GetArray</a> (double *m)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const double &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aa6e296b71371e9b9b334dca8c7f3314a">operator()</a> (int row, int column) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a59c4092616c1d0ffc2c3e022350ee02d">operator()</a> (int row, int column)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a8ef05a892601489ef84e46c0a00bcc41">inverse</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a4c534cebd13efb9ac42d39722d85602c">transpose</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aff25b8b63c0aec5f2c83d0cb70ae55cb">randomRotation</a> (<a class="el" href="classOpenBabel_1_1OBRandom.shtml">OBRandom</a> &amp;rnd)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a390024ffecb7973f5de3194dc2f606f5">determinant</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a17ea6953708a00e57d99aaf52495f62a">isSymmetric</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#ae8249851867ad7b2795614ee2b4f0078">isOrthogonal</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#af6fefdc3ee1db949d064e63eabb5fdaa">isDiagonal</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aa95d7e7bec24e89ad8ff73a47607b1f8">isUnitMatrix</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a0aba6c9a55fa03689378594bb58f1ff1">Get</a> (int row, int column) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aae7e56afba0365c34add2d93288995ca">Set</a> (int row, int column, double v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a39efd7a5999c653b840ac4445b9f86c2">SetColumn</a> (int column, const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#ab20b033e3e502ab19ae92f55a9ef2fe2">SetRow</a> (int row, const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a3f43f67cedadf2e178bd338b8ec26231">GetColumn</a> (unsigned int col) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a8e10214c207950dbaec09438c4992a46">GetRow</a> (unsigned int row) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a4623ee2f3c5b2b7cc4c2efb081273f62">operator*=</a> (const double &amp;c)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a56c27ea39208380495f812df6b865289">operator/=</a> (const double &amp;c)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a99b052f9d6eaea593f20a032679bcc55">SetupRotMat</a> (double x, double y, double z)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a031b9641f48f7639949cad29a6a99109">PlaneReflection</a> (const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;norm)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#ae2b83cb7b73473405cd57594c88f541c">RotAboutAxisByAngle</a> (const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;axis, const double angle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aeae6ec0ae0d036137c03275be0010878">FillOrth</a> (double alpha, double beta, double gamma, double a, double b, double c)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a5f09543ae4cdaf031d0adaa0480f2b8c">findEigenvectorsIfSymmetric</a> (<a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;eigenvals) const </td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aeb205a916fa467164e6bdebc62d22e7a">jacobi</a> (unsigned int n, double *a, double *d, double *v)</td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#afa46ab021c49dc30bac7116157793dff">operator*</a> (const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;, const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a35fd56b260acc82508c9bf7e9a710125">operator*</a> (const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;, const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a0f3e65b4976b2ac7ce2a02b778e5cc71">operator&lt;&lt;</a> (std::ostream &amp;, const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Represents a real 3x3 matrix. </p>
<p>Rotating points in space can be performed by a vector-matrix multiplication. The <a class="el" href="classOpenBabel_1_1matrix3x3.shtml" title="Represents a real 3x3 matrix.">matrix3x3</a> class is designed as a helper to the <a class="el" href="classOpenBabel_1_1vector3.shtml" title="Represents a vector in 3-dimensional real space.">vector3</a> class for rotating points in space. The rotation matrix may be initialised by passing in the array of floating point values, by passing euler angles, or a rotation vector and angle of rotation about that vector. Once set, the <a class="el" href="classOpenBabel_1_1matrix3x3.shtml" title="Represents a real 3x3 matrix.">matrix3x3</a> class can be used to rotate vectors by the overloaded multiplication operator. The following demonstrates the usage of the <a class="el" href="classOpenBabel_1_1matrix3x3.shtml" title="Represents a real 3x3 matrix.">matrix3x3</a> class:</p>
<div class="fragment"><pre class="fragment">      <a class="code" href="classOpenBabel_1_1matrix3x3.shtml#a02fbfa24687cc574a29a8d1c0ff0a2db" title="Constructs the zero-matrix.">matrix3x3</a> mat;
      mat.SetupRotMat(0.0,180.0,0.0); <span class="comment">//rotate theta by 180 degrees</span>
      vector3 v = <a class="code" href="namespaceOpenBabel.shtml#a6ca3b632d31093a7110635452bccc7bd" title="The x unit vector: &lt;1.0, 0.0, 0.0&gt;">VX</a>;
      v *= mat; <span class="comment">//apply the rotation</span>
</pre></div> </div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a02fbfa24687cc574a29a8d1c0ff0a2db"></a><!-- doxytag: member="OpenBabel::matrix3x3::matrix3x3" ref="a02fbfa24687cc574a29a8d1c0ff0a2db" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs the zero-matrix. </p>

</div>
</div>
<a class="anchor" id="ac0461afe3f76b83a10fe99fac330f702"></a><!-- doxytag: member="OpenBabel::matrix3x3::matrix3x3" ref="ac0461afe3f76b83a10fe99fac330f702" args="(double s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs s times the unit matrix. </p>

</div>
</div>
<a class="anchor" id="a4736c0c51dc08725c39e02a84c2390ec"></a><!-- doxytag: member="OpenBabel::matrix3x3::matrix3x3" ref="a4736c0c51dc08725c39e02a84c2390ec" args="(vector3 row1, vector3 row2, vector3 row3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td>
          <td class="paramname"><em>row1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td>
          <td class="paramname"><em>row2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a>&#160;</td>
          <td class="paramname"><em>row3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a matrix from row vectors. </p>

</div>
</div>
<a class="anchor" id="a0a0be9b2cd186a15d56efdaaefa9a994"></a><!-- doxytag: member="OpenBabel::matrix3x3::matrix3x3" ref="a0a0be9b2cd186a15d56efdaaefa9a994" args="(double d[3][3])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>d</em>[3][3]</td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a matrix from a 3x3-array of doubles. </p>
<p>The first index represents the row, the second index the column </p>

</div>
</div>
<a class="anchor" id="a6d3758cd834f7dd0f5c0816231349cb9"></a><!-- doxytag: member="OpenBabel::matrix3x3::~matrix3x3" ref="a6d3758cd834f7dd0f5c0816231349cb9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3f648014bbd17f8090159d2d93cbe30c"></a><!-- doxytag: member="OpenBabel::matrix3x3::GetArray" ref="a3f648014bbd17f8090159d2d93cbe30c" args="(double *m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GetArray </td>
          <td>(</td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<p>Writes the matrix into the 1-dimensional array m, row by row. The array must be able to hold 9 doubles, otherwise your program will segfault. </p>

</div>
</div>
<a class="anchor" id="aa6e296b71371e9b9b334dca8c7f3314a"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator()" ref="aa6e296b71371e9b9b334dca8c7f3314a" args="(int row, int column) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const double&amp; operator() </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a constant reference to an element of the matrix. row and column must be between 0 and 2. No check is done. </dd></dl>

</div>
</div>
<a class="anchor" id="a59c4092616c1d0ffc2c3e022350ee02d"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator()" ref="a59c4092616c1d0ffc2c3e022350ee02d" args="(int row, int column)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double&amp; operator() </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a non-constant reference to an element of the matrix. row and column must be between 0 and 2. No check is done. </dd></dl>

</div>
</div>
<a class="anchor" id="a8ef05a892601489ef84e46c0a00bcc41"></a><!-- doxytag: member="OpenBabel::matrix3x3::inverse" ref="a8ef05a892601489ef84e46c0a00bcc41" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> inverse </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates the inverse of a matrix. </p>
<p>This method checks if the absolute value of the determinant is smaller than 1e-6. If so, nothing is done and an exception is thrown. Otherwise, the inverse matrix is calculated and returned. *this is not changed.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the determinant is close to zero, but not == 0.0, this method may behave in unexpected ways and return almost random results; details may depend on your particular floating point implementation. The use of this method is therefore highly discouraged, unless you are certain that the determinant is in a reasonable range, away from 0.0 (Stefan Kebekus) </dd></dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#ae04a9f37ac44205cdbcbcd29ce2e8471">OBUnitCell::CartesianToFractional()</a>, <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a2ac2c43b65936f802681d33aff49bc25">OBUnitCell::GetFractionalMatrix()</a>, and <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#aa087a37fcd1c8b08d5d58277caefbc9a">OBUnitCell::SetData()</a>.</p>

</div>
</div>
<a class="anchor" id="a4c534cebd13efb9ac42d39722d85602c"></a><!-- doxytag: member="OpenBabel::matrix3x3::transpose" ref="a4c534cebd13efb9ac42d39722d85602c" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> transpose </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates the transpose of a matrix. </p>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#ac2cb274fb0a8e40a1df98af82b2da063">OBUnitCell::GetCellMatrix()</a>, and <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#aa087a37fcd1c8b08d5d58277caefbc9a">OBUnitCell::SetData()</a>.</p>

</div>
</div>
<a class="anchor" id="aff25b8b63c0aec5f2c83d0cb70ae55cb"></a><!-- doxytag: member="OpenBabel::matrix3x3::randomRotation" ref="aff25b8b63c0aec5f2c83d0cb70ae55cb" args="(OBRandom &amp;rnd)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void randomRotation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBRandom.shtml">OBRandom</a> &amp;&#160;</td>
          <td class="paramname"><em>rnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generates a matrix for a random rotation. </p>
<p>The axis of the rotation will be uniformly distributed on the unit sphere and the angle will be uniformly distributed in the interval 0..360 degrees. </p>

</div>
</div>
<a class="anchor" id="a390024ffecb7973f5de3194dc2f606f5"></a><!-- doxytag: member="OpenBabel::matrix3x3::determinant" ref="a390024ffecb7973f5de3194dc2f606f5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double determinant </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>The determinant of the matrix </dd></dl>

<p>Referenced by <a class="el" href="namespaceOpenBabel.shtml#a07c3e3dff340f78121cc2c15da53cdb2">OpenBabel::signed_volume()</a>.</p>

</div>
</div>
<a class="anchor" id="a17ea6953708a00e57d99aaf52495f62a"></a><!-- doxytag: member="OpenBabel::matrix3x3::isSymmetric" ref="a17ea6953708a00e57d99aaf52495f62a" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isSymmetric </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks if a matrix is symmetric. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>False if there are indices i,j such that fabs(*this[i][j]-*this[j][i]) &gt; 1e-6. Otherwise, it returns true. </dd></dl>

</div>
</div>
<a class="anchor" id="ae8249851867ad7b2795614ee2b4f0078"></a><!-- doxytag: member="OpenBabel::matrix3x3::isOrthogonal" ref="ae8249851867ad7b2795614ee2b4f0078" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isOrthogonal </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks if a matrix is orthogonal. </p>
<p>This method checks if a matrix is orthogonal, i.e. if all column vectors are normalized and are mutually orthogonal. A matrix is orthogonal if, and only if the transformation it describes is orthonormal. An orthonormal transformation is a transformation that preserves length and angle.</p>
<p>The check is performed using the method <a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aa95d7e7bec24e89ad8ff73a47607b1f8">isUnitMatrix()</a> to check if </p>
<div class="fragment"><pre class="fragment">        *<span class="keyword">this</span> * <a class="code" href="classOpenBabel_1_1matrix3x3.shtml#a4c534cebd13efb9ac42d39722d85602c" title="Calculates the transpose of a matrix.">transpose</a>()
</pre></div><p> is a unit matrix. The criterion is therefore numerically quite tight. </p>

</div>
</div>
<a class="anchor" id="af6fefdc3ee1db949d064e63eabb5fdaa"></a><!-- doxytag: member="OpenBabel::matrix3x3::isDiagonal" ref="af6fefdc3ee1db949d064e63eabb5fdaa" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isDiagonal </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>if a matrix is diagonal</dd></dl>
<p>This method returns true if and only if the matrix is (approximately) a diagonal matrix. The precision used by this function is 1e-6. </p>

</div>
</div>
<a class="anchor" id="aa95d7e7bec24e89ad8ff73a47607b1f8"></a><!-- doxytag: member="OpenBabel::matrix3x3::isUnitMatrix" ref="aa95d7e7bec24e89ad8ff73a47607b1f8" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isUnitMatrix </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>if a matrix is the unit matrix</dd></dl>
<p>This method returns true if and only if the matrix is (approximately) equal to the identity matrix. The precision used by this function is 1e-6. </p>

</div>
</div>
<a class="anchor" id="a0aba6c9a55fa03689378594bb58f1ff1"></a><!-- doxytag: member="OpenBabel::matrix3x3::Get" ref="a0aba6c9a55fa03689378594bb58f1ff1" args="(int row, int column) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Get </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>row or column are not in the range 0..2, zero is returned !</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.shtml#_deprecated000079">Deprecated:</a></b></dt><dd>use the constant operator() instead </dd></dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1vector3.shtml#ab879d8d94111c53fd9b9013fb9345734">vector3::operator*=()</a>.</p>

</div>
</div>
<a class="anchor" id="aae7e56afba0365c34add2d93288995ca"></a><!-- doxytag: member="OpenBabel::matrix3x3::Set" ref="aae7e56afba0365c34add2d93288995ca" args="(int row, int column, double v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Set </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>if row or column are not in the range 0..2, nothing will happen !</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.shtml#_deprecated000080">Deprecated:</a></b></dt><dd>use the non-constant operator() instead </dd></dl>

</div>
</div>
<a class="anchor" id="a39efd7a5999c653b840ac4445b9f86c2"></a><!-- doxytag: member="OpenBabel::matrix3x3::SetColumn" ref="a39efd7a5999c653b840ac4445b9f86c2" args="(int column, const vector3 &amp;v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetColumn </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If column is not in the range 0..2, the vector remains unchanged and an exception is thrown. </dd></dl>

</div>
</div>
<a class="anchor" id="ab20b033e3e502ab19ae92f55a9ef2fe2"></a><!-- doxytag: member="OpenBabel::matrix3x3::SetRow" ref="ab20b033e3e502ab19ae92f55a9ef2fe2" args="(int row, const vector3 &amp;v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetRow </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If column is not in the range 0..2, the vector remains unchanged and an exception is thrown. </dd></dl>

</div>
</div>
<a class="anchor" id="a3f43f67cedadf2e178bd338b8ec26231"></a><!-- doxytag: member="OpenBabel::matrix3x3::GetColumn" ref="a3f43f67cedadf2e178bd338b8ec26231" args="(unsigned int col) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> GetColumn </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>col</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If col is not in the range 0..2, an exception is thrown. </dd></dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a3bacc0010fd34814039b26758da67dae">OBUnitCell::GetA()</a>, <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a6897ba879a5e0f5ac4ac5aefeb94601d">OBUnitCell::GetAlpha()</a>, <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#ac0f9682b3743c4ec91dd9fd16bb5bd82">OBUnitCell::GetB()</a>, <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a8b788f95c3fa1f2cc9aedaa1b92b78a1">OBUnitCell::GetBeta()</a>, <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a229a18fdc499aafe149c55011f9fb2fb">OBUnitCell::GetC()</a>, and <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a53b3c98860a330a6b95074945fc2895f">OBUnitCell::GetGamma()</a>.</p>

</div>
</div>
<a class="anchor" id="a8e10214c207950dbaec09438c4992a46"></a><!-- doxytag: member="OpenBabel::matrix3x3::GetRow" ref="a8e10214c207950dbaec09438c4992a46" args="(unsigned int row) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> GetRow </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>row</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access function. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If row is not in the range 0..2, an exception is thrown. </dd></dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a021c578d8328027ac9ef282cadc98692">OBUnitCell::GetCellVectors()</a>, and <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#a305d661a815053b610cb220fdfc3922c">OBUnitCell::SetData()</a>.</p>

</div>
</div>
<a class="anchor" id="a4623ee2f3c5b2b7cc4c2efb081273f62"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator*=" ref="a4623ee2f3c5b2b7cc4c2efb081273f62" args="(const double &amp;c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&amp; operator*= </td>
          <td>(</td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Multiplies all entries of the matrix by a scalar c. </p>

</div>
</div>
<a class="anchor" id="a56c27ea39208380495f812df6b865289"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator/=" ref="a56c27ea39208380495f812df6b865289" args="(const double &amp;c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a>&amp; operator/= </td>
          <td>(</td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Divides all entries of the matrix by a scalar c. </p>

</div>
</div>
<a class="anchor" id="a99b052f9d6eaea593f20a032679bcc55"></a><!-- doxytag: member="OpenBabel::matrix3x3::SetupRotMat" ref="a99b052f9d6eaea593f20a032679bcc55" args="(double x, double y, double z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetupRotMat </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculate a rotation matrix for rotation about the x, y, and z axes by the angles specified (in degrees) </p>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBBuilder.shtml#abe40cdbb1abc8939273d9cde6b7b638a">OBBuilder::Connect()</a>.</p>

</div>
</div>
<a class="anchor" id="a031b9641f48f7639949cad29a6a99109"></a><!-- doxytag: member="OpenBabel::matrix3x3::PlaneReflection" ref="a031b9641f48f7639949cad29a6a99109" args="(const vector3 &amp;norm)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PlaneReflection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>norm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates a matrix that represents reflection on a plane. </p>
<p>Replaces *this with a matrix that represents reflection on the plane through 0 which is given by the normal vector norm.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the vector norm has length zero, this method will generate the 0-matrix. If the length of the axis is close to zero, but not == 0.0, this method may behave in unexpected ways and return almost random results; details may depend on your particular floating point implementation. The use of this method is therefore highly discouraged, unless you are certain that the length is in a reasonable range, away from 0.0 (Stefan Kebekus)</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.shtml#_deprecated000095">Deprecated:</a></b></dt><dd>This method will probably replaced by a safer algorithm in the future.</dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.shtml#_todo000013">Todo:</a></b></dt><dd>Replace this method with a more fool-proof version.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">norm</td><td>specifies the normal to the plane </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae2b83cb7b73473405cd57594c88f541c"></a><!-- doxytag: member="OpenBabel::matrix3x3::RotAboutAxisByAngle" ref="ae2b83cb7b73473405cd57594c88f541c" args="(const vector3 &amp;axis, const double angle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RotAboutAxisByAngle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>angle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates a rotation matrix, rotating around the specified axis by the specified angle (in degrees) </p>
<p>Replaces *this with a matrix that represents rotation about the axis by a an angle.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the vector axis has length zero, this method will generate the 0-matrix. If the length of the axis is close to zero, but not == 0.0, this method may behave in unexpected ways and return almost random results; details may depend on your particular floating point implementation. The use of this method is therefore highly discouraged, unless you are certain that the length is in a reasonable range, away from 0.0 (Stefan Kebekus)</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.shtml#_deprecated000096">Deprecated:</a></b></dt><dd>This method will probably replaced by a safer algorithm in the future.</dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.shtml#_todo000014">Todo:</a></b></dt><dd>Replace this method with a more fool-proof version.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>specifies the axis of the rotation </td></tr>
    <tr><td class="paramname">angle</td><td>angle in degrees (0..360) </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBMol.shtml#a228de88f48ee3ca6a11554b74d82dedd">OBMol::Align()</a>, <a class="el" href="classOpenBabel_1_1OBBuilder.shtml#ad0cefa50ad126c06c03bad33175ce2b4">OBBuilder::GetNewBondVector()</a>, and <a class="el" href="classOpenBabel_1_1OBAtom.shtml#af7a144a4ef755d5cc31e0d2e47a2e84a">OBAtom::SetHybAndGeom()</a>.</p>

</div>
</div>
<a class="anchor" id="aeae6ec0ae0d036137c03275be0010878"></a><!-- doxytag: member="OpenBabel::matrix3x3::FillOrth" ref="aeae6ec0ae0d036137c03275be0010878" args="(double alpha, double beta, double gamma, double a, double b, double c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FillOrth </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>beta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>gamma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calculate an orthogonalisation matrix for a unit cell specified by the parameters alpha, beta, gamma, a, b, c where alpha, beta, and gamma are the cell angles (in degrees) and a, b, and c are the cell vector lengths Used by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml" title="Used for storing information about periodic boundary conditions with conversion to/from translation v...">OBUnitCell</a> </p>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBUnitCell.shtml#acca66a4b8a38d190c178b6ed85f9b8ed">OBUnitCell::SetData()</a>.</p>

</div>
</div>
<a class="anchor" id="a5f09543ae4cdaf031d0adaa0480f2b8c"></a><!-- doxytag: member="OpenBabel::matrix3x3::findEigenvectorsIfSymmetric" ref="a5f09543ae4cdaf031d0adaa0480f2b8c" args="(vector3 &amp;eigenvals) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> findEigenvectorsIfSymmetric </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>eigenvals</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find the eigenvalues and -vectors of a symmetric matrix. </p>
<p>This method employs the static method <a class="el" href="classOpenBabel_1_1matrix3x3.shtml#aeb205a916fa467164e6bdebc62d22e7a" title="Eigenvalue calculation.">matrix3x3::jacobi</a>(...) to find the eigenvalues and eigenvectors of a symmetric matrix. On entry it is checked if the matrix really is symmetric: if <a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a17ea6953708a00e57d99aaf52495f62a" title="Checks if a matrix is symmetric.">isSymmetric()</a> returns 'false', an <a class="el" href="classOpenBabel_1_1OBError.shtml" title="Customizable error handling and logging -- store a message, including the method yielding the error...">OBError</a> is thrown.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The jacobi algorithm is should work great for all symmetric 3x3 matrices. If you need to find the eigenvectors of a non-symmetric matrix, you might want to resort to the sophisticated routines of LAPACK.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">eigenvals</td><td>a reference to a <a class="el" href="classOpenBabel_1_1vector3.shtml" title="Represents a vector in 3-dimensional real space.">vector3</a> where the eigenvalues will be stored. The eigenvalues are ordered so that eigenvals[0] &lt;= eigenvals[1] &lt;= eigenvals[2].</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>an orthogonal matrix whose ith column is an eigenvector for the eigenvalue eigenvals[i]. Here 'orthogonal' means that all eigenvectors have length one and are mutually orthogonal. The ith eigenvector can thus be conveniently accessed by the <a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a3f43f67cedadf2e178bd338b8ec26231" title="Access function.">GetColumn()</a> method, as in the following example. <div class="fragment"><pre class="fragment">    <span class="comment">// Calculate eigenvectors and -values</span>
    vector3 eigenvals;
    <a class="code" href="classOpenBabel_1_1matrix3x3.shtml#a02fbfa24687cc574a29a8d1c0ff0a2db" title="Constructs the zero-matrix.">matrix3x3</a> eigenmatrix = somematrix.findEigenvectorsIfSymmetric(eigenvals);

    <span class="comment">// Print the 2nd eigenvector</span>
    cout &lt;&lt; eigenmatrix.GetColumn(1) &lt;&lt; endl;
</pre></div> With these conventions, a matrix is diagonalized in the following way: <div class="fragment"><pre class="fragment">    <span class="comment">// Diagonalize the matrix</span>
    <a class="code" href="classOpenBabel_1_1matrix3x3.shtml#a02fbfa24687cc574a29a8d1c0ff0a2db" title="Constructs the zero-matrix.">matrix3x3</a> diagonalMatrix = eigenmatrix.inverse() * somematrix * eigenmatrix;
</pre></div> </dd></dl>

</div>
</div>
<a class="anchor" id="aeb205a916fa467164e6bdebc62d22e7a"></a><!-- doxytag: member="OpenBabel::matrix3x3::jacobi" ref="aeb205a916fa467164e6bdebc62d22e7a" args="(unsigned int n, double *a, double *d, double *v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void jacobi </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Eigenvalue calculation. </p>
<p>This static function computes the eigenvalues and eigenvectors of a SYMMETRIC nxn matrix. This method is used internally by <a class="el" href="namespaceOpenBabel.shtml" title="Global namespace for all Open Babel code.">OpenBabel</a>, but may be useful as a general eigenvalue finder.</p>
<p>The algorithm uses Jacobi transformations. It is described e.g. in Wilkinson, Reinsch "Handbook for automatic computation,
    Volume II: Linear Algebra", part II, contribution II/1. The implementation is also similar to the implementation in this book. This method is adequate to solve the eigenproblem for small matrices, of size perhaps up to 10x10. For bigger problems, you might want to resort to the sophisticated routines of LAPACK.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If you plan to find the eigenvalues of a symmetric 3x3 matrix, you will probably prefer to use the more convenient method <a class="el" href="classOpenBabel_1_1matrix3x3.shtml#a5f09543ae4cdaf031d0adaa0480f2b8c" title="Find the eigenvalues and -vectors of a symmetric matrix.">findEigenvectorsIfSymmetric()</a></dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>the size of the matrix that should be diagonalized</td></tr>
    <tr><td class="paramname">a</td><td>array of size n^2 which holds the symmetric matrix whose eigenvectors are to be computed. The convention is that the entry in row r and column c is addressed as a[n*r+c] where, of course, 0 &lt;= r &lt; n and 0 &lt;= c &lt; n. There is no check that the matrix is actually symmetric. If it is not, the behaviour of this function is undefined. On return, the matrix is overwritten with junk.</td></tr>
    <tr><td class="paramname">d</td><td>pointer to a field of at least n doubles which will be overwritten. On return of this function, the entries d[0]..d[n-1] will contain the eigenvalues of the matrix.</td></tr>
    <tr><td class="paramname">v</td><td>an array of size n^2 where the eigenvectors will be stored. On return, the columns of this matrix will contain the eigenvectors. The eigenvectors are normalized and mutually orthogonal. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="afa46ab021c49dc30bac7116157793dff"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator*" ref="afa46ab021c49dc30bac7116157793dff" args="(const matrix3x3 &amp;, const vector3 &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1vector3.shtml">vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Matrix-vector multiplication. </p>
<p>Calculates the product m*v of the matrix m and the column vector represented by v </p>

</div>
</div>
<a class="anchor" id="a35fd56b260acc82508c9bf7e9a710125"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator*" ref="a35fd56b260acc82508c9bf7e9a710125" args="(const matrix3x3 &amp;, const matrix3x3 &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td>
          <td class="paramname"><em>B</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Matrix-matrix multiplication. </p>

</div>
</div>
<a class="anchor" id="a0f3e65b4976b2ac7ce2a02b778e5cc71"></a><!-- doxytag: member="OpenBabel::matrix3x3::operator&lt;&lt;" ref="a0f3e65b4976b2ac7ce2a02b778e5cc71" args="(std::ostream &amp;, const matrix3x3 &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenBabel_1_1matrix3x3.shtml">matrix3x3</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Output a text representation of a matrix. </p>
<p>Print a text representation of the matrix in the standardized form: [ a, b, c ] <br/>
 [ d, e, f ] <br/>
 [ g, h, i ] <br/>
 where the letters represent the appropriate entries in the matrix. Uses the standard output format for the individual entries, separated by ", " for each column, and [ ] indicating each row. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="matrix3x3_8h_source.shtml">matrix3x3.h</a></li>
<li><a class="el" href="matrix3x3_8cpp.shtml">matrix3x3.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- end content -->

<!--#include file="footer.html" -->

<div id="footer">
<hr size="1">
<img src="http://openbabel.org/babel256.png" width="136" height="127" alt="" style="float: left;" />
<p>This file is part of the documentation for <a href="http://openbabel.org/wiki/">Open Babel</a>, version 2.3.</p>
<div class="bottom">
Documentation copyright &copy; 1998-2007, the <a href="http://openbabel.org/wiki/THANKS">Open Babel Developers</a>.<br>
Open Babel is hosted by: <a href="http://sourceforge.net">
<img src="http://sourceforge.net/sflogo.php?group_id=40728" 
width="88" height="31" border="0" alt="SourceForge Logo"></a><br>
Generated on Thu Oct 13 2011 16:08:11 by&nbsp;<a href="http://www.doxygen.org/"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.5.1.
</div>

</body>
</html>