1 #ifndef PARAM_H 2 #define PARAM_H 3 4 #include "tntsupp.h" 5 #include "geese.h" 6 7 class Control{ 8 protected: 9 int _trace; 10 int _ajs; 11 int _j1s; 12 int _fij; 13 int _maxiter; 14 double _tol; 15 16 public: 17 Control(int trace, int ajs, int j1s, int fij, int maxiter, double tol); 18 Control(int *con, double tol); 19 Control(const Control &C); trace()20 int trace() const {return _trace;} ajs()21 int ajs() const {return _ajs;} j1s()22 int j1s() const {return _j1s;} fij()23 int fij() const {return _fij;} maxiter()24 int maxiter() const {return _maxiter;} tol()25 double tol() const {return _tol;} set_maxiter(int mit)26 void set_maxiter(int mit) {_maxiter = mit;} 27 }; 28 29 class GeeParam{ 30 protected: 31 DVector _beta; 32 DVector _alpha; 33 DVector _gamma; 34 DMatrix _vbeta; 35 DMatrix _vbeta_naiv; 36 DMatrix _vbeta_ajs; 37 DMatrix _vbeta_j1s; 38 DMatrix _vbeta_fij; 39 DMatrix _valpha; 40 DMatrix _valpha_stab; 41 DMatrix _valpha_naiv; 42 DMatrix _valpha_ajs; 43 DMatrix _valpha_j1s; 44 DMatrix _valpha_fij; 45 DMatrix _vgamma; 46 DMatrix _vgamma_ajs; 47 DMatrix _vgamma_j1s; 48 DMatrix _vgamma_fij; 49 //int _ScaleFix; 50 int _err; 51 public: 52 GeeParam(DVector Beta, DVector Alpha, DVector Gamma); 53 GeeParam(DVector Beta, DVector Alpha, DVector Gamma, 54 DMatrix VBeta, DMatrix VBeta_naiv, 55 DMatrix VBeta_ajs, DMatrix VBeta_j1s, 56 DMatrix VBeta_fij, 57 DMatrix VAlpha, DMatrix VAlpha_stab, 58 DMatrix VAlpha_naiv, DMatrix VAlpha_ajs, 59 DMatrix VAlpha_j1s, DMatrix VAlpha_fij, 60 DMatrix VGamma, DMatrix VGamma_ajs, 61 DMatrix VGamma_j1s, DMatrix VGamma_fij); ~GeeParam()62 ~GeeParam() {} set_beta(const DVector & v)63 void set_beta(const DVector &v) {_beta = v;} set_alpha(const DVector & v)64 void set_alpha(const DVector &v) {_alpha = v;} set_vbeta(const DMatrix & m)65 void set_vbeta(const DMatrix &m) {_vbeta = m;} set_vbeta_naiv(const DMatrix & m)66 void set_vbeta_naiv(const DMatrix &m) {_vbeta_naiv = m;} set_vbeta_ajs(const DMatrix & m)67 void set_vbeta_ajs(const DMatrix &m) {_vbeta_ajs = m;} set_vbeta_j1s(const DMatrix & m)68 void set_vbeta_j1s(const DMatrix &m) {_vbeta_j1s = m;} set_vbeta_fij(const DMatrix & m)69 void set_vbeta_fij(const DMatrix &m) {_vbeta_fij = m;} set_valpha(const DMatrix & m)70 void set_valpha(const DMatrix &m) {_valpha = m;} set_valpha_stab(const DMatrix & m)71 void set_valpha_stab(const DMatrix &m) {_valpha_stab = m;} set_valpha_naiv(const DMatrix & m)72 void set_valpha_naiv(const DMatrix &m) {_valpha_naiv = m;} set_valpha_ajs(const DMatrix & m)73 void set_valpha_ajs(const DMatrix &m) {_valpha_ajs = m;} set_valpha_j1s(const DMatrix & m)74 void set_valpha_j1s(const DMatrix &m) {_valpha_j1s = m;} set_valpha_fij(const DMatrix & m)75 void set_valpha_fij(const DMatrix &m) {_valpha_fij = m;} set_gamma(const DVector & v)76 void set_gamma(const DVector &v) {_gamma = v;} set_vgamma(const DMatrix & m)77 void set_vgamma(const DMatrix &m) {_vgamma = m;} set_vgamma_ajs(const DMatrix & m)78 void set_vgamma_ajs(const DMatrix &m) {_vgamma_ajs = m;} set_vgamma_j1s(const DMatrix & m)79 void set_vgamma_j1s(const DMatrix &m) {_vgamma_j1s = m;} set_vgamma_fij(const DMatrix & m)80 void set_vgamma_fij(const DMatrix &m) {_vgamma_fij = m;} set_err(int e)81 void set_err(int e) {_err = e;} 82 beta()83 DVector beta() {return _beta;} alpha()84 DVector alpha() {return _alpha;} gamma()85 DVector gamma() {return _gamma;} vbeta()86 DMatrix vbeta() {return _vbeta;} valpha()87 DMatrix valpha() {return _valpha;} vbeta_naiv()88 DMatrix vbeta_naiv() {return _vbeta_naiv;} vbeta_ajs()89 DMatrix vbeta_ajs() {return _vbeta_ajs;} vbeta_j1s()90 DMatrix vbeta_j1s() {return _vbeta_j1s;} vbeta_fij()91 DMatrix vbeta_fij() {return _vbeta_fij;} valpha_stab()92 DMatrix valpha_stab() {return _valpha_stab;} valpha_naiv()93 DMatrix valpha_naiv() {return _valpha_naiv;} valpha_ajs()94 DMatrix valpha_ajs() {return _valpha_ajs;} valpha_j1s()95 DMatrix valpha_j1s() {return _valpha_j1s;} valpha_fij()96 DMatrix valpha_fij() {return _valpha_fij;} vgamma()97 DMatrix vgamma() {return _vgamma;} vgamma_ajs()98 DMatrix vgamma_ajs() {return _vgamma_ajs;} vgamma_j1s()99 DMatrix vgamma_j1s() {return _vgamma_j1s;} vgamma_fij()100 DMatrix vgamma_fij() {return _vgamma_fij;} 101 //int ScaleFix() {return _ScaleFix;} p()102 int p() {return _beta.dim();} r()103 int r() {return _gamma.dim();} q()104 int q() {return _alpha.dim();} err()105 int err() {return _err;} 106 }; 107 108 #endif //PARAM_H 109