[831] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // $Id: G4OsloMatrix.hh,v 1.6 2006/06/29 18:39:49 gunter Exp $ |
---|
[1228] | 28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[831] | 29 | // |
---|
| 30 | // ---------------------------------------------------------------------- |
---|
| 31 | // Class G4OsloMatrix |
---|
| 32 | // |
---|
| 33 | // Class description: |
---|
| 34 | // |
---|
| 35 | // Utility class for the definition of a matrix of knots. |
---|
| 36 | |
---|
| 37 | // Authors: J.Sulkimo, P.Urban. |
---|
| 38 | // Revisions by: L.Broglia, G.Cosmo. |
---|
| 39 | // ---------------------------------------------------------------------- |
---|
| 40 | #ifndef __G4OsloMatrix_h |
---|
| 41 | #define __G4OsloMatrix_h 1 |
---|
| 42 | |
---|
| 43 | #include "G4KnotVector.hh" |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | class G4OsloMatrix |
---|
| 47 | { |
---|
| 48 | |
---|
| 49 | public: // with description |
---|
| 50 | |
---|
| 51 | G4OsloMatrix(); |
---|
| 52 | G4OsloMatrix(G4int vec_size, G4int offsetparam, G4int osizeparam); |
---|
| 53 | ~G4OsloMatrix(); |
---|
| 54 | // Constructors & destructor |
---|
| 55 | |
---|
| 56 | inline G4int GetOffset() const; |
---|
| 57 | inline G4int GetSize() const; |
---|
| 58 | inline G4OsloMatrix* GetNextNode(); |
---|
| 59 | inline G4KnotVector* GetKnotVector(); |
---|
| 60 | inline void SetOffset(G4int); |
---|
| 61 | inline void SetSize(G4int); |
---|
| 62 | inline void SetNextNode(G4OsloMatrix*); |
---|
| 63 | inline void SetKnotVector(G4KnotVector*); |
---|
| 64 | // Accessors |
---|
| 65 | |
---|
| 66 | private: |
---|
| 67 | |
---|
| 68 | G4OsloMatrix(const G4OsloMatrix&); |
---|
| 69 | G4OsloMatrix& operator=(const G4OsloMatrix&); |
---|
| 70 | // Private copy constructor and assignment operator. |
---|
| 71 | |
---|
| 72 | private: |
---|
| 73 | |
---|
| 74 | G4OsloMatrix* next; |
---|
| 75 | G4int offset; |
---|
| 76 | G4int osize; |
---|
| 77 | G4KnotVector* o_vec; |
---|
| 78 | }; |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | class G4PointMatrix |
---|
| 82 | { |
---|
| 83 | public: |
---|
| 84 | |
---|
| 85 | G4PointMatrix(); |
---|
| 86 | G4PointMatrix(G4int, G4int); |
---|
| 87 | G4PointMatrix(G4double[]); |
---|
| 88 | // Constructors |
---|
| 89 | |
---|
| 90 | ~G4PointMatrix(); |
---|
| 91 | // Destructor |
---|
| 92 | |
---|
| 93 | inline G4int GetRows() const; |
---|
| 94 | inline G4int GetCols() const; |
---|
| 95 | |
---|
| 96 | inline void put(G4int i, G4int j, G4double x); |
---|
| 97 | // Puts control point into matrix location (i,j) |
---|
| 98 | |
---|
| 99 | inline G4double get(G4int i, G4int j) const; |
---|
| 100 | // Retrieves control point from matrix location (i,j) |
---|
| 101 | |
---|
| 102 | private: |
---|
| 103 | |
---|
| 104 | G4PointMatrix(const G4PointMatrix&); |
---|
| 105 | G4PointMatrix& operator=(const G4PointMatrix&); |
---|
| 106 | // Private copy constructor and assignment operator. |
---|
| 107 | |
---|
| 108 | private: |
---|
| 109 | |
---|
| 110 | G4double* data; |
---|
| 111 | G4int nr, nc; |
---|
| 112 | }; |
---|
| 113 | |
---|
| 114 | #include "G4OsloMatrix.icc" |
---|
| 115 | |
---|
| 116 | #endif |
---|