ROOT
master
Reference Guide
Loading...
Searching...
No Matches
SimplexParameters.cxx
Go to the documentation of this file.
1
// @(#)root/minuit2:$Id$
2
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7
* *
8
**********************************************************************/
9
10
#include "
Minuit2/SimplexParameters.h
"
11
12
namespace
ROOT
{
13
14
namespace
Minuit2 {
15
16
void
SimplexParameters::Update
(
double
y
,
const
MnAlgebraicVector
&
p
)
17
{
18
// update the SimplexParameter object with a new value y = FCN(p)
19
fSimplexParameters
[
Jh
()] = std::pair<double, MnAlgebraicVector>(
y
,
p
);
20
if
(
y
<
fSimplexParameters
[
Jl
()].first)
21
fJLow
=
Jh
();
22
23
unsigned
int
jh
= 0;
24
for
(
unsigned
int
i = 1; i <
fSimplexParameters
.size(); i++) {
25
if
(
fSimplexParameters
[i].first >
fSimplexParameters
[
jh
].first)
26
jh
= i;
27
}
28
fJHigh
=
jh
;
29
30
return
;
31
}
32
33
MnAlgebraicVector
SimplexParameters::Dirin
()
const
34
{
35
// find simplex direction (vector from big to smaller parameter points)
36
MnAlgebraicVector
dirin
(
fSimplexParameters
.size() - 1);
37
for
(
unsigned
int
i = 0; i <
fSimplexParameters
.size() - 1; i++) {
38
double
pbig
=
fSimplexParameters
[0].second(i),
plit
=
pbig
;
39
for
(
unsigned
int
j
= 0;
j
<
fSimplexParameters
.size();
j
++) {
40
if
(
fSimplexParameters
[
j
].second(i) <
plit
)
41
plit
=
fSimplexParameters
[
j
].second(i);
42
if
(
fSimplexParameters
[
j
].second(i) >
pbig
)
43
pbig
=
fSimplexParameters
[
j
].second(i);
44
}
45
dirin
(i) =
pbig
-
plit
;
46
}
47
48
return
dirin
;
49
}
50
51
}
// namespace Minuit2
52
53
}
// namespace ROOT
SimplexParameters.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
p
winID h TVirtualViewer3D TVirtualGLPainter p
Definition
TGWin32VirtualGLProxy.cxx:51
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Minuit2::LAVector
Definition
LAVector.h:32
ROOT::Minuit2::SimplexParameters::Dirin
MnAlgebraicVector Dirin() const
Definition
SimplexParameters.cxx:33
ROOT::Minuit2::SimplexParameters::fJHigh
unsigned int fJHigh
Definition
SimplexParameters.h:58
ROOT::Minuit2::SimplexParameters::Jh
unsigned int Jh() const
Definition
SimplexParameters.h:51
ROOT::Minuit2::SimplexParameters::Update
void Update(double, const MnAlgebraicVector &)
Definition
SimplexParameters.cxx:16
ROOT::Minuit2::SimplexParameters::fJLow
unsigned int fJLow
Definition
SimplexParameters.h:59
ROOT::Minuit2::SimplexParameters::Jl
unsigned int Jl() const
Definition
SimplexParameters.h:52
ROOT::Minuit2::SimplexParameters::fSimplexParameters
std::vector< std::pair< double, MnAlgebraicVector > > fSimplexParameters
Definition
SimplexParameters.h:57
y
Double_t y[n]
Definition
legend1.C:17
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition
EExecutionPolicy.hxx:4
math
minuit2
src
SimplexParameters.cxx
ROOT master - Reference Guide Generated on Mon Feb 17 2025 15:03:30 (GVA Time) using Doxygen 1.10.0