File indexing completed on 2025-09-15 09:11:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_SimplexParameters
0011 #define ROOT_Minuit2_SimplexParameters
0012
0013 #include <cassert>
0014
0015 #include "Minuit2/MnMatrix.h"
0016
0017 #include <ROOT/RSpan.hxx>
0018
0019 #include <vector>
0020 #include <utility>
0021
0022 namespace ROOT {
0023
0024 namespace Minuit2 {
0025
0026
0027
0028
0029
0030
0031 class SimplexParameters {
0032
0033 public:
0034 SimplexParameters(std::span<const std::pair<double, MnAlgebraicVector>> simpl, unsigned int jh, unsigned int jl)
0035 : fSimplexParameters(simpl.begin(), simpl.end()), fJHigh(jh), fJLow(jl)
0036 {
0037 }
0038
0039 void Update(double, const MnAlgebraicVector &);
0040
0041 const std::vector<std::pair<double, MnAlgebraicVector>> &Simplex() const { return fSimplexParameters; }
0042
0043 const std::pair<double, MnAlgebraicVector> &operator()(unsigned int i) const
0044 {
0045 assert(i < fSimplexParameters.size());
0046 return fSimplexParameters[i];
0047 }
0048
0049 unsigned int Jh() const { return fJHigh; }
0050 unsigned int Jl() const { return fJLow; }
0051 double Edm() const { return fSimplexParameters[Jh()].first - fSimplexParameters[Jl()].first; }
0052 MnAlgebraicVector Dirin() const;
0053
0054 private:
0055 std::vector<std::pair<double, MnAlgebraicVector>> fSimplexParameters;
0056 unsigned int fJHigh;
0057 unsigned int fJLow;
0058 };
0059
0060 }
0061
0062 }
0063
0064 #endif