G4PointMatrix Class Reference

#include <G4OsloMatrix.hh>


Public Member Functions

 G4PointMatrix ()
 G4PointMatrix (G4int, G4int)
 G4PointMatrix (G4double[])
 ~G4PointMatrix ()
G4int GetRows () const
G4int GetCols () const
void put (G4int i, G4int j, G4double x)
G4double get (G4int i, G4int j) const


Detailed Description

Definition at line 80 of file G4OsloMatrix.hh.


Constructor & Destructor Documentation

G4PointMatrix::G4PointMatrix (  ) 

Definition at line 56 of file G4OsloMatrix.cc.

00057 {
00058   nr=nc=0;
00059   data=0;
00060 }

G4PointMatrix::G4PointMatrix ( G4int  ,
G4int   
)

Definition at line 63 of file G4OsloMatrix.cc.

00064 {
00065   nr=rows; nc=columns; 
00066   data = new G4double[nr*nc];
00067   for(G4int a =0; a<nr*nc;a++) 
00068     { data[a]=0; }
00069 }

G4PointMatrix::G4PointMatrix ( G4double  []  ) 

Definition at line 72 of file G4OsloMatrix.cc.

00073 {
00074   nr = nc = 4; 
00075   data = new G4double[nr*nc];
00076   for(G4int a=0;a<nr*nc;a++)
00077     { data[a]=vec[a]; }
00078 }

G4PointMatrix::~G4PointMatrix (  ) 

Definition at line 80 of file G4OsloMatrix.cc.

00081 {
00082   delete [] data;
00083 }


Member Function Documentation

G4double G4PointMatrix::get ( G4int  i,
G4int  j 
) const [inline]

Definition at line 104 of file G4OsloMatrix.icc.

Referenced by G4ToroidalSurface::MultiplyPointByMatrix(), and G4ToroidalSurface::MultiplyVectorByMatrix().

00105 {
00106   return data[i*nc+j];
00107 }

G4int G4PointMatrix::GetCols (  )  const [inline]

Definition at line 92 of file G4OsloMatrix.icc.

00093 {
00094   return nc;
00095 }

G4int G4PointMatrix::GetRows (  )  const [inline]

Definition at line 86 of file G4OsloMatrix.icc.

00087 {
00088   return nr;
00089 }

void G4PointMatrix::put ( G4int  i,
G4int  j,
G4double  x 
) [inline]

Definition at line 98 of file G4OsloMatrix.icc.

00099 {
00100   data[i*nc+j]=x;
00101 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:56 2013 for Geant4 by  doxygen 1.4.7