Geant4-11
Data Structures | Functions
G4ErrorSymMatrix.hh File Reference
#include <vector>
#include "globals.hh"
#include "G4ErrorSymMatrix.icc"

Go to the source code of this file.

Data Structures

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

Functions

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

Function Documentation

◆ condition()

G4double condition ( const G4ErrorSymMatrix m)

Referenced by G4FTFModel::AdjustNucleonsAlgorithm_Sampling(), G4BiasingProcessInterface::AtRestGetPhysicalInteractionLength(), G4MuonicAtomDecay::AtRestGetPhysicalInteractionLength(), G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(), G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::AtRestGetPhysicalInteractionLength(), G4ScoreSplittingProcess::AtRestGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4VITRestProcess::AtRestGetPhysicalInteractionLength(), G4RadioactiveDecay::AtRestGetPhysicalInteractionLength(), G4HadronStoppingProcess::AtRestGetPhysicalInteractionLength(), G4MuonMinusAtomicCapture::AtRestGetPhysicalInteractionLength(), G4VRestProcess::AtRestGetPhysicalInteractionLength(), G4WrapperProcess::AtRestGetPhysicalInteractionLength(), G4Decay::AtRestGetPhysicalInteractionLength(), G4AdjointProcessEquivalentToDirectProcess::AtRestGetPhysicalInteractionLength(), G4DNAMolecularDissociation::AtRestGetPhysicalInteractionLength(), G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(), G4VProcess::AtRestGPIL(), G4eBremsstrahlungRelModel::ComputeLPMfunctions(), G4PairProductionRelModel::ComputeLPMfunctions(), G4MuonicAtomDecay::DecayIt(), 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(), G4GammaGeneralProcess::GetMeanFreePath(), G4VAdjointReverseReaction::GetMeanFreePath(), G4PolarizedAnnihilation::GetMeanFreePath(), G4VEmProcess::GetMeanFreePath(), G4VEnergyLossProcess::GetMeanFreePath(), G4SynchrotronRadiation::GetMeanFreePath(), G4SynchrotronRadiationInMat::GetMeanFreePath(), G4VMultipleScattering::GetMeanFreePath(), G4VTransitionRadiation::GetMeanFreePath(), G4Scintillation::GetMeanLifeTime(), G4BiasingProcessInterface::InvokeWrappedProcessPostStepGPIL(), 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(), 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(), G4AdjointForcedInteractionForGamma::PostStepGetPhysicalInteractionLength(), G4AdjointProcessEquivalentToDirectProcess::PostStepGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4PolarizedAnnihilation::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 195 of file G4ErrorSymMatrix.cc.

197{
198 G4ErrorSymMatrix mret(mat1.num_row() + mat2.num_row(), 0);
199 mret.sub(1, mat1);
200 mret.sub(mat1.num_row() + 1, mat2);
201 return mret;
202}

References G4ErrorSymMatrix::num_row(), and G4ErrorSymMatrix::sub().

◆ 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 302 of file G4ErrorSymMatrix.cc.

303{
304 G4ErrorMatrix mret(mat1.num_row(), mat2.num_col());
305 CHK_DIM_1(mat1.num_col(), mat2.num_row(), *);
306 G4ErrorMatrixConstIter mit1, mit2, sp, snp; // mit2=0
307 G4double temp;
308 G4ErrorMatrixIter mir = mret.m.begin();
309 for(mit1 = mat1.m.begin();
310 mit1 < mat1.m.begin() + mat1.num_row() * mat1.num_col(); mit1 = mit2)
311 {
312 snp = mat2.m.begin();
313 for(int step = 1; step <= mat2.num_row(); ++step)
314 {
315 mit2 = mit1;
316 sp = snp;
317 snp += step;
318 temp = 0;
319 while(sp < snp) // Loop checking, 06.08.2015, G.Cosmo
320 {
321 temp += *(sp++) * (*(mit2++));
322 }
323 if(step < mat2.num_row())
324 { // only if we aren't on the last row
325 sp += step - 1;
326 for(int stept = step + 1; stept <= mat2.num_row(); stept++)
327 {
328 temp += *sp * (*(mit2++));
329 if(stept < mat2.num_row())
330 sp += stept;
331 }
332 } // if(step
333 *(mir++) = temp;
334 } // for(step
335 } // for(mit1
336 return mret;
337}
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 339 of file G4ErrorSymMatrix.cc.

340{
341 G4ErrorMatrix mret(mat1.num_row(), mat2.num_col());
342 CHK_DIM_1(mat1.num_col(), mat2.num_row(), *);
343 G4int step, stept;
344 G4ErrorMatrixConstIter mit1, mit2, sp, snp;
345 G4double temp;
346 G4ErrorMatrixIter mir = mret.m.begin();
347 for(step = 1, snp = mat1.m.begin(); step <= mat1.num_row(); snp += step++)
348 {
349 for(mit1 = mat2.m.begin(); mit1 < mat2.m.begin() + mat2.num_col(); mit1++)
350 {
351 mit2 = mit1;
352 sp = snp;
353 temp = 0;
354 while(sp < snp + step) // Loop checking, 06.08.2015, G.Cosmo
355 {
356 temp += *mit2 * (*(sp++));
357 mit2 += mat2.num_col();
358 }
359 sp += step - 1;
360 for(stept = step + 1; stept <= mat1.num_row(); stept++)
361 {
362 temp += *mit2 * (*sp);
363 mit2 += mat2.num_col();
364 sp += stept;
365 }
366 *(mir++) = temp;
367 }
368 }
369 return mret;
370}
int G4int
Definition: G4Types.hh:85

◆ operator*() [3/5]

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

Definition at line 372 of file G4ErrorSymMatrix.cc.

374{
375 G4ErrorMatrix mret(mat1.num_row(), mat1.num_row());
376 CHK_DIM_1(mat1.num_col(), mat2.num_row(), *);
377 G4int step1, stept1, step2, stept2;
378 G4ErrorMatrixConstIter snp1, sp1, snp2, sp2;
379 G4double temp;
380 G4ErrorMatrixIter mr = mret.m.begin();
381 for(step1 = 1, snp1 = mat1.m.begin(); step1 <= mat1.num_row();
382 snp1 += step1++)
383 {
384 for(step2 = 1, snp2 = mat2.m.begin(); step2 <= mat2.num_row();)
385 {
386 sp1 = snp1;
387 sp2 = snp2;
388 snp2 += step2;
389 temp = 0;
390 if(step1 < step2)
391 {
392 while(sp1 < snp1 + step1) // Loop checking, 06.08.2015, G.Cosmo
393 {
394 temp += (*(sp1++)) * (*(sp2++));
395 }
396 sp1 += step1 - 1;
397 for(stept1 = step1 + 1; stept1 != step2 + 1; sp1 += stept1++)
398 {
399 temp += (*sp1) * (*(sp2++));
400 }
401 sp2 += step2 - 1;
402 for(stept2 = ++step2; stept2 <= mat2.num_row();
403 sp1 += stept1++, sp2 += stept2++)
404 {
405 temp += (*sp1) * (*sp2);
406 }
407 }
408 else
409 {
410 while(sp2 < snp2) // Loop checking, 06.08.2015, G.Cosmo
411 {
412 temp += (*(sp1++)) * (*(sp2++));
413 }
414 sp2 += step2 - 1;
415 for(stept2 = ++step2; stept2 != step1 + 1; sp2 += stept2++)
416 {
417 temp += (*(sp1++)) * (*sp2);
418 }
419 sp1 += step1 - 1;
420 for(stept1 = step1 + 1; stept1 <= mat1.num_row();
421 sp1 += stept1++, sp2 += stept2++)
422 {
423 temp += (*sp1) * (*sp2);
424 }
425 }
426 *(mr++) = temp;
427 }
428 }
429 return mret;
430}

◆ operator*() [4/5]

G4ErrorSymMatrix operator* ( const G4ErrorSymMatrix s1,
G4double  t 
)

Definition at line 288 of file G4ErrorSymMatrix.cc.

289{
290 G4ErrorSymMatrix mret(mat1);
291 mret *= t;
292 return mret;
293}

◆ operator*() [5/5]

G4ErrorSymMatrix operator* ( G4double  t,
const G4ErrorSymMatrix s1 
)

Definition at line 295 of file G4ErrorSymMatrix.cc.

296{
297 G4ErrorSymMatrix mret(mat1);
298 mret *= t;
299 return mret;
300}

◆ operator+() [1/3]

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

Definition at line 222 of file G4ErrorSymMatrix.cc.

223{
224 G4ErrorMatrix mret(mat1);
225 CHK_DIM_2(mat1.num_row(), mat2.num_row(), mat1.num_col(), mat2.num_col(), +);
226 mret += mat2;
227 return mret;
228}
#define CHK_DIM_2(r1, r2, c1, c2, fun)

References CHK_DIM_2, G4ErrorMatrix::num_col(), G4ErrorSymMatrix::num_col(), G4ErrorMatrix::num_row(), and G4ErrorSymMatrix::num_row().

◆ operator+() [2/3]

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

Definition at line 230 of file G4ErrorSymMatrix.cc.

231{
232 G4ErrorMatrix mret(mat2);
233 CHK_DIM_2(mat1.num_row(), mat2.num_row(), mat1.num_col(), mat2.num_col(), +);
234 mret += mat1;
235 return mret;
236}

References CHK_DIM_2, G4ErrorMatrix::num_col(), G4ErrorSymMatrix::num_col(), G4ErrorMatrix::num_row(), and G4ErrorSymMatrix::num_row().

◆ operator+() [3/3]

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

Definition at line 238 of file G4ErrorSymMatrix.cc.

240{
241 G4ErrorSymMatrix mret(mat1.nrow);
242 CHK_DIM_1(mat1.nrow, mat2.nrow, +);
243 SIMPLE_TOP(+)
244 return mret;
245}
#define SIMPLE_TOP(OPER)

◆ operator-() [1/3]

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

Definition at line 251 of file G4ErrorSymMatrix.cc.

252{
253 G4ErrorMatrix mret(mat1);
254 CHK_DIM_2(mat1.num_row(), mat2.num_row(), mat1.num_col(), mat2.num_col(), -);
255 mret -= mat2;
256 return mret;
257}

References CHK_DIM_2, G4ErrorMatrix::num_col(), G4ErrorSymMatrix::num_col(), G4ErrorMatrix::num_row(), and G4ErrorSymMatrix::num_row().

◆ operator-() [2/3]

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

Definition at line 259 of file G4ErrorSymMatrix.cc.

260{
261 G4ErrorMatrix mret(mat1);
262 CHK_DIM_2(mat1.num_row(), mat2.num_row(), mat1.num_col(), mat2.num_col(), -);
263 mret -= mat2;
264 return mret;
265}

References CHK_DIM_2, G4ErrorMatrix::num_col(), G4ErrorSymMatrix::num_col(), G4ErrorMatrix::num_row(), and G4ErrorSymMatrix::num_row().

◆ operator-() [3/3]

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

Definition at line 267 of file G4ErrorSymMatrix.cc.

269{
270 G4ErrorSymMatrix mret(mat1.num_row());
271 CHK_DIM_1(mat1.num_row(), mat2.num_row(), -);
272 SIMPLE_TOP(-)
273 return mret;
274}

◆ operator/()

G4ErrorSymMatrix operator/ ( const G4ErrorSymMatrix m1,
G4double  t 
)

Definition at line 281 of file G4ErrorSymMatrix.cc.

282{
283 G4ErrorSymMatrix mret(mat1);
284 mret /= t;
285 return mret;
286}

◆ operator<<()

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

Definition at line 564 of file G4ErrorSymMatrix.cc.

565{
566 os << G4endl;
567
568 // Fixed format needs 3 extra characters for field,
569 // while scientific needs 7
570
571 G4int width;
572 if(os.flags() & std::ios::fixed)
573 {
574 width = os.precision() + 3;
575 }
576 else
577 {
578 width = os.precision() + 7;
579 }
580 for(G4int irow = 1; irow <= q.num_row(); irow++)
581 {
582 for(G4int icol = 1; icol <= q.num_col(); icol++)
583 {
584 os.width(width);
585 os << q(irow, icol) << " ";
586 }
587 os << G4endl;
588 }
589 return os;
590}
#define G4endl
Definition: G4ios.hh:57
G4int num_row() const
G4int num_col() const

References G4endl, G4ErrorSymMatrix::num_col(), and G4ErrorSymMatrix::num_row().

◆ tridiagonal() [1/2]

G4ErrorMatrix tridiagonal ( G4ErrorSymMatrix a)

◆ tridiagonal() [2/2]

void tridiagonal ( G4ErrorSymMatrix a,
G4ErrorMatrix hsm 
)