Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FastVector< Type, N > Class Template Reference

#include <G4FastVector.hh>

Public Member Functions

 G4FastVector ()
 
 ~G4FastVector ()
 
Type * operator[] (G4int anIndex) const
 
void Initialize (G4int items)
 
void SetElement (G4int anIndex, Type *anElement)
 

Detailed Description

template<class Type, G4int N>
class G4FastVector< Type, N >

Definition at line 43 of file G4FastVector.hh.

Constructor & Destructor Documentation

◆ G4FastVector()

template<class Type , G4int N>
G4FastVector< Type, N >::G4FastVector ( )
inline

Definition at line 50 of file G4FastVector.hh.

50{ ptr = &theArray[0]; }

◆ ~G4FastVector()

template<class Type , G4int N>
G4FastVector< Type, N >::~G4FastVector ( )
inline

Definition at line 52 of file G4FastVector.hh.

53 {
54 if (ptr != &theArray[0]) delete [] ptr;
55 }

Member Function Documentation

◆ Initialize()

template<class Type , G4int N>
void G4FastVector< Type, N >::Initialize ( G4int  items)
inline

Definition at line 63 of file G4FastVector.hh.

67 {
68 if (ptr != &theArray[0])
69 delete [] ptr;
70 if (items > N)
71 ptr = new Type*[items];
72 else
73 ptr = &theArray[0];
74 }

Referenced by G4LEAlphaInelastic::ApplyYourself(), G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4ReactionDynamics::GenerateXandPt(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGTwoCluster::ReactionStage(), and G4ReactionDynamics::TwoCluster().

◆ operator[]()

template<class Type , G4int N>
Type * G4FastVector< Type, N >::operator[] ( G4int  anIndex) const
inline

Definition at line 57 of file G4FastVector.hh.

59 {
60 return ptr[anIndex];
61 }

◆ SetElement()


The documentation for this class was generated from the following file: