ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
math
minuit2
src
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
17
void
SimplexParameters::Update
(
double
y
,
const
MnAlgebraicVector
& p) {
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)
fJLow
=
Jh
();
21
22
unsigned
int
jh = 0;
23
for
(
unsigned
int
i = 1; i <
fSimplexParameters
.size(); i++) {
24
if
(
fSimplexParameters
[i].
first
>
fSimplexParameters
[jh].
first
) jh = i;
25
}
26
fJHigh
= jh;
27
28
return
;
29
}
30
31
MnAlgebraicVector
SimplexParameters::Dirin
()
const
{
32
// find simplex direction (vector from big to smaller parameter points)
33
MnAlgebraicVector
dirin(
fSimplexParameters
.size() - 1);
34
for
(
unsigned
int
i = 0; i <
fSimplexParameters
.size() - 1; i++) {
35
double
pbig =
fSimplexParameters
[0].second(i), plit = pbig;
36
for
(
unsigned
int
j = 0; j <
fSimplexParameters
.size(); j++){
37
if
(
fSimplexParameters
[j].second(i) < plit) plit =
fSimplexParameters
[j].second(i);
38
if
(
fSimplexParameters
[j].second(i) > pbig) pbig =
fSimplexParameters
[j].second(i);
39
}
40
dirin(i) = pbig - plit;
41
}
42
43
return
dirin;
44
}
45
46
}
// namespace Minuit2
47
48
}
// namespace ROOT
ROOT::Minuit2::SimplexParameters::fJHigh
unsigned int fJHigh
Definition:
SimplexParameters.h:56
ROOT::Minuit2::LAVector
Definition:
LAVector.h:33
ROOT::Minuit2::SimplexParameters::Jh
unsigned int Jh() const
Definition:
SimplexParameters.h:48
ROOT::Minuit2::SimplexParameters::fSimplexParameters
std::vector< std::pair< double, MnAlgebraicVector > > fSimplexParameters
Definition:
SimplexParameters.h:55
ROOT::Minuit2::SimplexParameters::Update
void Update(double, const MnAlgebraicVector &)
Definition:
SimplexParameters.cxx:17
ROOT::Minuit2::SimplexParameters::Jl
unsigned int Jl() const
Definition:
SimplexParameters.h:49
first
bool first
Definition:
line3Dfit.C:48
ROOT::Minuit2::SimplexParameters::fJLow
unsigned int fJLow
Definition:
SimplexParameters.h:57
y
Double_t y[n]
Definition:
legend1.C:17
ROOT::Minuit2::SimplexParameters::Dirin
MnAlgebraicVector Dirin() const
Definition:
SimplexParameters.cxx:31
SimplexParameters.h