Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ErrorSymMatrix.hh File Reference
#include <vector>
#include "globals.hh"
#include "G4ErrorSymMatrix.icc"

Go to the source code of this file.

Classes

class  G4ErrorSymMatrix
 
class  G4ErrorSymMatrix::G4ErrorSymMatrix_row
 
class  G4ErrorSymMatrix::G4ErrorSymMatrix_row_const
 

Functions

std::ostream & operator<< (std::ostream &s, const G4ErrorSymMatrix &q)
 
G4ErrorMatrix operator* (const G4ErrorMatrix &m1, const G4ErrorSymMatrix &m2)
 
G4ErrorMatrix operator* (const G4ErrorSymMatrix &m1, const G4ErrorMatrix &m2)
 
G4ErrorMatrix operator* (const G4ErrorSymMatrix &m1, const G4ErrorSymMatrix &m2)
 
G4ErrorSymMatrix operator* (G4double t, const G4ErrorSymMatrix &s1)
 
G4ErrorSymMatrix operator* (const G4ErrorSymMatrix &s1, G4double t)
 
G4ErrorSymMatrix operator/ (const G4ErrorSymMatrix &m1, G4double t)
 
G4ErrorMatrix operator+ (const G4ErrorMatrix &m1, const G4ErrorSymMatrix &s2)
 
G4ErrorMatrix operator+ (const G4ErrorSymMatrix &s1, const G4ErrorMatrix &m2)
 
G4ErrorSymMatrix operator+ (const G4ErrorSymMatrix &s1, const G4ErrorSymMatrix &s2)
 
G4ErrorMatrix operator- (const G4ErrorMatrix &m1, const G4ErrorSymMatrix &s2)
 
G4ErrorMatrix operator- (const G4ErrorSymMatrix &m1, const G4ErrorMatrix &m2)
 
G4ErrorSymMatrix operator- (const G4ErrorSymMatrix &s1, const G4ErrorSymMatrix &s2)
 
G4ErrorSymMatrix dsum (const G4ErrorSymMatrix &s1, const G4ErrorSymMatrix &s2)
 
G4double condition (const G4ErrorSymMatrix &m)
 
void diag_step (G4ErrorSymMatrix *t, G4int begin, G4int end)
 
void diag_step (G4ErrorSymMatrix *t, G4ErrorMatrix *u, G4int begin, G4int end)
 
G4ErrorMatrix diagonalize (G4ErrorSymMatrix *s)
 
void house_with_update2 (G4ErrorSymMatrix *a, G4ErrorMatrix *v, G4int row=1, G4int col=1)
 
void tridiagonal (G4ErrorSymMatrix *a, G4ErrorMatrix *hsm)
 
G4ErrorMatrix tridiagonal (G4ErrorSymMatrix *a)
 

Function Documentation

◆ condition()

G4double condition ( const G4ErrorSymMatrix m)

Referenced by G4BiasingProcessInterface::AtRestGetPhysicalInteractionLength(), G4AntiNeutronAnnihilationAtRest::AtRestGetPhysicalInteractionLength(), G4MuonicAtomDecay::AtRestGetPhysicalInteractionLength(), G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(), G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::AtRestGetPhysicalInteractionLength(), G4ScoreSplittingProcess::AtRestGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4AdjointProcessEquivalentToDirectProcess::AtRestGetPhysicalInteractionLength(), G4VITRestProcess::AtRestGetPhysicalInteractionLength(), G4HadronStoppingProcess::AtRestGetPhysicalInteractionLength(), G4MuonMinusAtomicCapture::AtRestGetPhysicalInteractionLength(), G4VRestProcess::AtRestGetPhysicalInteractionLength(), G4WrapperProcess::AtRestGetPhysicalInteractionLength(), G4Decay::AtRestGetPhysicalInteractionLength(), G4DNAMolecularDissociation::AtRestGetPhysicalInteractionLength(), G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(), G4VProcess::AtRestGPIL(), G4BOptnCloning::DistanceToApplyOperation(), G4Channeling::GetMeanFreePath(), G4PhononDownconversion::GetMeanFreePath(), G4PhononReflection::GetMeanFreePath(), G4PhononScattering::GetMeanFreePath(), G4MicroElecSurface::GetMeanFreePath(), G4ForwardXrayTR::GetMeanFreePath(), G4TransitionRadiation::GetMeanFreePath(), G4OpBoundaryProcess::GetMeanFreePath(), G4PolarizedCompton::GetMeanFreePath(), G4VXTRenergyLoss::GetMeanFreePath(), G4Scintillation::GetMeanFreePath(), G4UCNBoundaryProcess::GetMeanFreePath(), G4hImpactIonisation::GetMeanFreePath(), G4VAdjointReverseReaction::GetMeanFreePath(), G4GammaGeneralProcess::GetMeanFreePath(), G4eplusPolarizedAnnihilation::GetMeanFreePath(), G4VEmProcess::GetMeanFreePath(), G4VEnergyLossProcess::GetMeanFreePath(), G4SynchrotronRadiation::GetMeanFreePath(), G4SynchrotronRadiationInMat::GetMeanFreePath(), G4VMultipleScattering::GetMeanFreePath(), G4VTransitionRadiation::GetMeanFreePath(), G4Scintillation::GetMeanLifeTime(), G4VMultipleScattering::PostStepGetPhysicalInteractionLength(), G4ParallelGeometriesLimiterProcess::PostStepGetPhysicalInteractionLength(), G4ParallelWorldProcess::PostStepGetPhysicalInteractionLength(), G4ImportanceProcess::PostStepGetPhysicalInteractionLength(), G4WeightCutOffProcess::PostStepGetPhysicalInteractionLength(), G4WeightWindowProcess::PostStepGetPhysicalInteractionLength(), G4Cerenkov::PostStepGetPhysicalInteractionLength(), G4ErrorMagFieldLimitProcess::PostStepGetPhysicalInteractionLength(), G4ErrorStepLengthLimitProcess::PostStepGetPhysicalInteractionLength(), G4ErrorTrackLengthTarget::PostStepGetPhysicalInteractionLength(), G4MaxTimeCuts::PostStepGetPhysicalInteractionLength(), G4MinEkineCuts::PostStepGetPhysicalInteractionLength(), G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength(), G4AdjointForcedInteractionForGamma::PostStepGetPhysicalInteractionLength(), G4AdjointProcessEquivalentToDirectProcess::PostStepGetPhysicalInteractionLength(), G4VITDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4HadronStoppingProcess::PostStepGetPhysicalInteractionLength(), G4MuonicAtomDecay::PostStepGetPhysicalInteractionLength(), G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4WrapperProcess::PostStepGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::PostStepGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::PostStepGetPhysicalInteractionLength(), G4ScoreSplittingProcess::PostStepGetPhysicalInteractionLength(), G4NeutronKiller::PostStepGetPhysicalInteractionLength(), G4StepLimiter::PostStepGetPhysicalInteractionLength(), G4UserSpecialCuts::PostStepGetPhysicalInteractionLength(), G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength(), G4Decay::PostStepGetPhysicalInteractionLength(), G4UnknownDecay::PostStepGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength(), G4PolarizedCompton::PostStepGetPhysicalInteractionLength(), G4VEmProcess::PostStepGetPhysicalInteractionLength(), G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength(), G4LowECapture::PostStepGetPhysicalInteractionLength(), and G4VProcess::PostStepGPIL().

◆ diag_step() [1/2]

void diag_step ( G4ErrorSymMatrix t,
G4ErrorMatrix u,
G4int  begin,
G4int  end 
)

◆ diag_step() [2/2]

void diag_step ( G4ErrorSymMatrix t,
G4int  begin,
G4int  end 
)

◆ diagonalize()

G4ErrorMatrix diagonalize ( G4ErrorSymMatrix s)

◆ dsum()

G4ErrorSymMatrix dsum ( const G4ErrorSymMatrix s1,
const G4ErrorSymMatrix s2 
)

Definition at line 182 of file G4ErrorSymMatrix.cc.

184{
185 G4ErrorSymMatrix mret(mat1.num_row() + mat2.num_row(), 0);
186 mret.sub(1,mat1);
187 mret.sub(mat1.num_row()+1,mat2);
188 return mret;
189}

◆ house_with_update2()

void house_with_update2 ( G4ErrorSymMatrix a,
G4ErrorMatrix v,
G4int  row = 1,
G4int  col = 1 
)

◆ operator*() [1/5]

G4ErrorMatrix operator* ( const G4ErrorMatrix m1,
const G4ErrorSymMatrix m2 
)

Definition at line 286 of file G4ErrorSymMatrix.cc.

287{
288 G4ErrorMatrix mret(mat1.num_row(),mat2.num_col());
289 CHK_DIM_1(mat1.num_col(),mat2.num_row(),*);
290 G4ErrorMatrixConstIter mit1, mit2, sp,snp; //mit2=0
291 G4double temp;
292 G4ErrorMatrixIter mir=mret.m.begin();
293 for(mit1=mat1.m.begin();
294 mit1<mat1.m.begin()+mat1.num_row()*mat1.num_col();
295 mit1 = mit2)
296 {
297 snp=mat2.m.begin();
298 for(int step=1;step<=mat2.num_row();++step)
299 {
300 mit2=mit1;
301 sp=snp;
302 snp+=step;
303 temp=0;
304 while(sp<snp) // Loop checking, 06.08.2015, G.Cosmo
305 { temp+=*(sp++)*(*(mit2++)); }
306 if( step<mat2.num_row() ) { // only if we aren't on the last row
307 sp+=step-1;
308 for(int stept=step+1;stept<=mat2.num_row();stept++)
309 {
310 temp+=*sp*(*(mit2++));
311 if(stept<mat2.num_row()) sp+=stept;
312 }
313 } // if(step
314 *(mir++)=temp;
315 } // for(step
316 } // for(mit1
317 return mret;
318}
std::vector< G4double >::iterator G4ErrorMatrixIter
std::vector< G4double >::const_iterator G4ErrorMatrixConstIter
#define CHK_DIM_1(c1, r2, fun)
double G4double
Definition: G4Types.hh:83

◆ operator*() [2/5]

G4ErrorMatrix operator* ( const G4ErrorSymMatrix m1,
const G4ErrorMatrix m2 
)

Definition at line 320 of file G4ErrorSymMatrix.cc.

321{
322 G4ErrorMatrix mret(mat1.num_row(),mat2.num_col());
323 CHK_DIM_1(mat1.num_col(),mat2.num_row(),*);
324 G4int step,stept;
325 G4ErrorMatrixConstIter mit1,mit2,sp,snp;
326 G4double temp;
327 G4ErrorMatrixIter mir=mret.m.begin();
328 for(step=1,snp=mat1.m.begin();step<=mat1.num_row();snp+=step++)
329 {
330 for(mit1=mat2.m.begin();mit1<mat2.m.begin()+mat2.num_col();mit1++)
331 {
332 mit2=mit1;
333 sp=snp;
334 temp=0;
335 while(sp<snp+step) // Loop checking, 06.08.2015, G.Cosmo
336 {
337 temp+=*mit2*(*(sp++));
338 mit2+=mat2.num_col();
339 }
340 sp+=step-1;
341 for(stept=step+1;stept<=mat1.num_row();stept++)
342 {
343 temp+=*mit2*(*sp);
344 mit2+=mat2.num_col();
345 sp+=stept;
346 }
347 *(mir++)=temp;
348 }
349 }
350 return mret;
351}
int G4int
Definition: G4Types.hh:85

◆ operator*() [3/5]

G4ErrorMatrix operator* ( const G4ErrorSymMatrix m1,
const G4ErrorSymMatrix m2 
)

Definition at line 353 of file G4ErrorSymMatrix.cc.

354{
355 G4ErrorMatrix mret(mat1.num_row(),mat1.num_row());
356 CHK_DIM_1(mat1.num_col(),mat2.num_row(),*);
357 G4int step1,stept1,step2,stept2;
358 G4ErrorMatrixConstIter snp1,sp1,snp2,sp2;
359 G4double temp;
360 G4ErrorMatrixIter mr = mret.m.begin();
361 for(step1=1,snp1=mat1.m.begin();step1<=mat1.num_row();snp1+=step1++)
362 {
363 for(step2=1,snp2=mat2.m.begin();step2<=mat2.num_row();)
364 {
365 sp1=snp1;
366 sp2=snp2;
367 snp2+=step2;
368 temp=0;
369 if(step1<step2)
370 {
371 while(sp1<snp1+step1) // Loop checking, 06.08.2015, G.Cosmo
372 { temp+=(*(sp1++))*(*(sp2++)); }
373 sp1+=step1-1;
374 for(stept1=step1+1;stept1!=step2+1;sp1+=stept1++)
375 { temp+=(*sp1)*(*(sp2++)); }
376 sp2+=step2-1;
377 for(stept2=++step2;stept2<=mat2.num_row();sp1+=stept1++,sp2+=stept2++)
378 { temp+=(*sp1)*(*sp2); }
379 }
380 else
381 {
382 while(sp2<snp2) // Loop checking, 06.08.2015, G.Cosmo
383 { temp+=(*(sp1++))*(*(sp2++)); }
384 sp2+=step2-1;
385 for(stept2=++step2;stept2!=step1+1;sp2+=stept2++)
386 { temp+=(*(sp1++))*(*sp2); }
387 sp1+=step1-1;
388 for(stept1=step1+1;stept1<=mat1.num_row();sp1+=stept1++,sp2+=stept2++)
389 { temp+=(*sp1)*(*sp2); }
390 }
391 *(mr++)=temp;
392 }
393 }
394 return mret;
395}

◆ operator*() [4/5]

G4ErrorSymMatrix operator* ( const G4ErrorSymMatrix s1,
G4double  t 
)

Definition at line 272 of file G4ErrorSymMatrix.cc.

273{
274 G4ErrorSymMatrix mret(mat1);
275 mret *= t;
276 return mret;
277}

◆ operator*() [5/5]

G4ErrorSymMatrix operator* ( G4double  t,
const G4ErrorSymMatrix s1 
)

Definition at line 279 of file G4ErrorSymMatrix.cc.

280{
281 G4ErrorSymMatrix mret(mat1);
282 mret *= t;
283 return mret;
284}

◆ operator+() [1/3]

G4ErrorMatrix operator+ ( const G4ErrorMatrix m1,
const G4ErrorSymMatrix s2 
)

Definition at line 206 of file G4ErrorSymMatrix.cc.

207{
208 G4ErrorMatrix mret(mat1);
209 CHK_DIM_2(mat1.num_row(),mat2.num_row(), mat1.num_col(),mat2.num_col(),+);
210 mret += mat2;
211 return mret;
212}
#define CHK_DIM_2(r1, r2, c1, c2, fun)

◆ operator+() [2/3]

G4ErrorMatrix operator+ ( const G4ErrorSymMatrix s1,
const G4ErrorMatrix m2 
)

Definition at line 214 of file G4ErrorSymMatrix.cc.

215{
216 G4ErrorMatrix mret(mat2);
217 CHK_DIM_2(mat1.num_row(),mat2.num_row(),mat1.num_col(),mat2.num_col(),+);
218 mret += mat1;
219 return mret;
220}

◆ operator+() [3/3]

G4ErrorSymMatrix operator+ ( const G4ErrorSymMatrix s1,
const G4ErrorSymMatrix s2 
)

Definition at line 222 of file G4ErrorSymMatrix.cc.

224{
225 G4ErrorSymMatrix mret(mat1.nrow);
226 CHK_DIM_1(mat1.nrow, mat2.nrow,+);
227 SIMPLE_TOP(+)
228 return mret;
229}
#define SIMPLE_TOP(OPER)

◆ operator-() [1/3]

G4ErrorMatrix operator- ( const G4ErrorMatrix m1,
const G4ErrorSymMatrix s2 
)

Definition at line 235 of file G4ErrorSymMatrix.cc.

236{
237 G4ErrorMatrix mret(mat1);
238 CHK_DIM_2(mat1.num_row(),mat2.num_row(),mat1.num_col(),mat2.num_col(),-);
239 mret -= mat2;
240 return mret;
241}

◆ operator-() [2/3]

G4ErrorMatrix operator- ( const G4ErrorSymMatrix m1,
const G4ErrorMatrix m2 
)

Definition at line 243 of file G4ErrorSymMatrix.cc.

244{
245 G4ErrorMatrix mret(mat1);
246 CHK_DIM_2(mat1.num_row(),mat2.num_row(),mat1.num_col(),mat2.num_col(),-);
247 mret -= mat2;
248 return mret;
249}

◆ operator-() [3/3]

G4ErrorSymMatrix operator- ( const G4ErrorSymMatrix s1,
const G4ErrorSymMatrix s2 
)

Definition at line 251 of file G4ErrorSymMatrix.cc.

253{
254 G4ErrorSymMatrix mret(mat1.num_row());
255 CHK_DIM_1(mat1.num_row(),mat2.num_row(),-);
256 SIMPLE_TOP(-)
257 return mret;
258}

◆ operator/()

G4ErrorSymMatrix operator/ ( const G4ErrorSymMatrix m1,
G4double  t 
)

Definition at line 265 of file G4ErrorSymMatrix.cc.

266{
267 G4ErrorSymMatrix mret(mat1);
268 mret /= t;
269 return mret;
270}

◆ operator<<()

std::ostream & operator<< ( std::ostream &  s,
const G4ErrorSymMatrix q 
)

Definition at line 523 of file G4ErrorSymMatrix.cc.

524{
525 os << G4endl;
526
527 // Fixed format needs 3 extra characters for field,
528 // while scientific needs 7
529
530 G4int width;
531 if(os.flags() & std::ios::fixed)
532 {
533 width = os.precision()+3;
534 }
535 else
536 {
537 width = os.precision()+7;
538 }
539 for(G4int irow = 1; irow<= q.num_row(); irow++)
540 {
541 for(G4int icol = 1; icol <= q.num_col(); icol++)
542 {
543 os.width(width);
544 os << q(irow,icol) << " ";
545 }
546 os << G4endl;
547 }
548 return os;
549}
#define G4endl
Definition: G4ios.hh:57
G4int num_row() const
G4int num_col() const

◆ tridiagonal() [1/2]

G4ErrorMatrix tridiagonal ( G4ErrorSymMatrix a)

◆ tridiagonal() [2/2]

void tridiagonal ( G4ErrorSymMatrix a,
G4ErrorMatrix hsm 
)