Changeset 2808 in Sophya for trunk/SophyaLib/NTools/simplex.h
- Timestamp:
- Jun 14, 2005, 1:25:05 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/simplex.h
r2650 r2808 28 28 namespace SOPHYA { 29 29 30 //! Interface definition for multivar uable function (used by SimplexMinmizer)30 //! Interface definition for multivariable function (used by SimplexMinmizer) 31 31 class MinZFunction { 32 32 public: … … 42 42 }; 43 43 44 //! Classeimplementing MinZFunction for a GeneralXi2 associated with a GeneralFitData44 //! Wrapper class implementing MinZFunction for a GeneralXi2 associated with a GeneralFitData 45 45 class MinZFuncXi2 : public MinZFunction { 46 46 public: … … 61 61 virtual ~MinZSimplex(); 62 62 63 //! Return the parameter space dimension 63 64 inline int NDim() { return mZF->NVar(); } 64 65 // Simplex initial 66 //! Defines the initial point (center of simplex figure) 65 67 inline void SetInitialPoint(Vector& point) { mPoint0 = point; } 68 //! Defines the step along each dimension to construct the simplex from initial point 66 69 inline void SetInitialStep(Vector& step) { mStep0 = step; } 67 70 71 //! Set the info/debug print level 68 72 inline void SetPrtLevel(int lev=0) { mPrt = lev; } 73 //! Return the current print level 69 74 inline int PrtLevel() { return mPrt; } 70 75 76 //! Set the maximum number of iteration 71 77 inline void SetMaxIter(int max = 100000) { mMaxIter = max; } 78 //! Return the current max iter 72 79 inline int MaxIter() { return mMaxIter; } 80 //! Return the number of iterations performed 73 81 inline int NbIter() { return mIter; } 82 //! Return the stop reason 74 83 inline int StopReason() { return mStop; } 84 //! Return the stop reason and a description string (\b s) 75 85 int StopReason(string& s); 76 86 … … 86 96 // [Delta f/f]simplex < mTol1 mRep1 fois de suite OU 87 97 // [Delta f_max/f_max]iter < mTol2 mRep2 fois de suite 88 // 98 99 //! Define the tolerances for the various convergence tests 89 100 inline void SetStopTolerance(double tol0=1.e-39, double tol1 = 1.e-3, int rep1=5, 90 101 double tol2=1.e-4, int rep2=5) … … 97 108 // Beta2 = Facteur d'homothetie pour la contraction vers le sommet bas f_min (ContractLow) 98 109 // Gamma2 = Facteur d'homothetie pour la l'extension pour le sommet haut ExpandHigh 110 111 //! Define the similarity (homothetic) factors for the different simplex transformations 99 112 inline void SetControls(double alpha=1., double beta=0.5, double beta2=0.5, 100 113 double gamma=2.0, double gamma2=2.0) 101 114 { mAlpha = alpha; mBeta = beta; mBeta2 = beta2; mGamma = gamma; mGamma2 = gamma2;} 102 115 116 //! Return the the homothetic factor for Reflection 103 117 inline double Alpha() { return mAlpha; } 118 //! Return the the homothetic factor for ContractHigh (contraction away from high point) 104 119 inline double Beta() { return mBeta; } 120 //! Return the the homothetic factor for ContractLow (contraction toward the low point) 105 121 inline double Beta2() { return mBeta2; } 122 //! Return the the homothetic factor for ReflecExpand (reflection+expansion) 106 123 inline double Gamma() { return mGamma; } 124 //! Return the the homothetic factor for ExpandHigh (expansion along high point) 107 125 inline double Gamma2() { return mGamma2; } 108 126
Note:
See TracChangeset
for help on using the changeset viewer.