#include <G4ThreeMat.hh>
Definition at line 45 of file G4ThreeMat.hh.
◆ G4ThreeMat() [1/3]
G4ThreeMat::G4ThreeMat |
( |
| ) |
|
Definition at line 38 of file G4ThreeMat.cc.
39{
40
41 for (
G4int i = 0; i < 3 ; i++ )
42 {
45
46 for (
G4int j = 0; j < 3 ; j++ )
47 element[i][j] = 0.;
48 }
49}
HepGeom::Vector3D< G4double > G4Vector3D
◆ G4ThreeMat() [2/3]
G4ThreeMat::G4ThreeMat |
( |
G4double |
a[3][3] | ) |
|
Definition at line 52 of file G4ThreeMat.cc.
53{
54
55 for (
G4int i = 0; i < 3 ; i++ )
56 {
57 row[i] =
G4Vector3D( a[i][0], a[i][1], a[i][2] );
58 column[i] =
G4Vector3D( a[0][i], a[1][i], a[2][i] );
59
60 for (
G4int j = 0; j < 3 ; j++ )
61 element[i][j] = a[i][j];
62 }
63}
◆ ~G4ThreeMat()
G4ThreeMat::~G4ThreeMat |
( |
| ) |
|
|
virtual |
◆ G4ThreeMat() [3/3]
Definition at line 71 of file G4ThreeMat.cc.
72{
73
74 for (
G4int i = 0; i < 3 ; i++ )
75 {
76 row[i] = mat.row[i];
77 column[i] = mat.column[i];
78
79 for (
G4int j = 0; j < 3 ; j++ )
80 element[i][j] = mat.element[i][j];
81 }
82}
◆ Determinant()
G4double G4ThreeMat::Determinant |
( |
| ) |
const |
Definition at line 151 of file G4ThreeMat.cc.
152{
153
154 return element[0][0] * ( element[1][1] * element[2][2]
155 - element[2][1] * element[1][2] )
156 - element[0][1] * ( element[1][0] * element[2][2]
157 - element[2][0] * element[1][2] )
158 + element[0][2] * ( element[1][0] * element[2][1]
159 - element[2][0] * element[1][1] );
160}
◆ NameOf()
const char * G4ThreeMat::NameOf |
( |
| ) |
const |
|
virtual |
Definition at line 85 of file G4ThreeMat.cc.
86{
87 return "G4ThreeMat";
88}
◆ operator=()
Definition at line 136 of file G4ThreeMat.cc.
137{
138 if (&mat == this) return *this;
139 for (
G4int i = 0; i < 3 ; i++ )
140 {
141 row[i] = mat.row[i];
142 column[i] = mat.column[i];
143
144 for (
G4int j = 0; j < 3 ; j++ )
145 element[i][j] = mat.element[i][j];
146 }
147 return *this;
148}
◆ operator==()
Definition at line 121 of file G4ThreeMat.cc.
122{
123 for (
G4int i = 0; i < 3 ; i++ )
124 {
125 for (
G4int j = 0; j < 3 ; j++ )
126 {
127 if ( element[i][j] != mat.element[i][j] )
128 return 0;
129 }
130 }
131
132 return 1;
133}
◆ PrintOn()
void G4ThreeMat::PrintOn |
( |
std::ostream & |
os = G4cout | ) |
const |
|
virtual |
Definition at line 100 of file G4ThreeMat.cc.
101{
102
103 os << "[ " << element[0][0] << "\t"
104 << element[0][1] << "\t"
105 << element[0][2] << "\n "
106 << element[1][0] << "\t"
107 << element[1][1] << "\t"
108 << element[1][2] << "\n "
109 << element[2][0] << "\t"
110 << element[2][1] << "\t"
111 << element[2][2] << " ]\n";
112
113
114
115
116
117
118}
◆ operator<<
Definition at line 91 of file G4ThreeMat.cc.
92{
93
94
95 mat.PrintOn( os );
96 return os;
97}
The documentation for this class was generated from the following files: