Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
63643f90
Commit
63643f90
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
MinimizerSettingsWidget: createMinuitEdits done
parent
a0afdd3e
No related branches found
No related tags found
1 merge request
!996
GUI: remove Descriptors from MinimizerItems
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Job/MinimizerItem.cpp
+3
-6
3 additions, 6 deletions
GUI/Model/Job/MinimizerItem.cpp
GUI/View/Fit/MinimizerSettingsWidget.cpp
+42
-28
42 additions, 28 deletions
GUI/View/Fit/MinimizerSettingsWidget.cpp
GUI/View/Fit/MinimizerSettingsWidget.h
+1
-0
1 addition, 0 deletions
GUI/View/Fit/MinimizerSettingsWidget.h
with
46 additions
and
34 deletions
GUI/Model/Job/MinimizerItem.cpp
+
3
−
6
View file @
63643f90
...
@@ -174,14 +174,11 @@ MinuitMinimizerItem::MinuitMinimizerItem()
...
@@ -174,14 +174,11 @@ MinuitMinimizerItem::MinuitMinimizerItem()
addProperty
(
P_ERRORDEF
,
double
(
1.0
));
addProperty
(
P_ERRORDEF
,
double
(
1.0
));
addProperty
(
P_TOLERANCE
,
double
(
0.01
))
->
setToolTip
(
"Tolerance on the function value at the minimum"
);
addProperty
(
P_TOLERANCE
,
double
(
0.01
));
addProperty
(
P_PRECISION
,
double
(
-
1.0
))
->
setToolTip
(
"Relative floating point arithmetic precision"
);
// Minimizer internal print level is working to std::cout and is not intercepted by GUI
addProperty
(
P_PRECISION
,
double
(
-
1.0
));
// addProperty(P_PRINTLEVEL, 0)->setToolTip("Minimizer internal print level");
addProperty
(
P_MAXFUNCTIONCALLS
,
0
)
->
setToolTip
(
"Maximum number of function calls"
);
addProperty
(
P_MAXFUNCTIONCALLS
,
int
(
0
)
);
}
}
QString
MinuitMinimizerItem
::
currentAlgorithm
()
const
QString
MinuitMinimizerItem
::
currentAlgorithm
()
const
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Fit/MinimizerSettingsWidget.cpp
+
42
−
28
View file @
63643f90
...
@@ -85,34 +85,9 @@ void MinimizerSettingsWidget::createMimimizerEdits()
...
@@ -85,34 +85,9 @@ void MinimizerSettingsWidget::createMimimizerEdits()
GUI
::
Util
::
Layout
::
clearLayout
(
m_minimizerLayout
);
GUI
::
Util
::
Layout
::
clearLayout
(
m_minimizerLayout
);
#ifdef SIMPLE_MINIMIZER
#ifdef SIMPLE_MINIMIZER
// Minuit2
// Minuit2
if
(
m_currentItem
->
currentMinimizerM_TYPE
()
==
MinuitMinimizerItem
::
M_TYPE
)
if
(
m_currentItem
->
currentMinimizerM_TYPE
()
==
MinuitMinimizerItem
::
M_TYPE
)
{
createMinuitEdits
();
else
MinuitMinimizerItem
*
minItem
=
m_currentItem
->
minimizerItemMinuit
();
m_minimizerLayout
->
addRow
(
"Algorithm:"
,
GUI
::
Util
::
createComboBox
(
[
=
]
{
return
minItem
->
algorithmCombo
();
},
[
=
](
const
QString
&
t
)
{
minItem
->
setCurrentAlgorithm
(
t
);
},
&
m_updaters
,
"Minimization algorithm"
));
m_minimizerLayout
->
addRow
(
"Strategy:"
,
GUI
::
Util
::
createIntSpinbox
(
[
=
]
{
return
minItem
->
strategy
();
},
[
=
](
int
v
)
{
minItem
->
setStrategy
(
v
);
},
&
m_updaters
,
"Minimization strategy (0-low, 1-medium, 2-high quality)"
,
RealLimits
::
limited
(
0
,
2
)));
m_minimizerLayout
->
addRow
(
"ErrorDef factor:"
,
GUI
::
Util
::
createDoubleSpinbox
(
[
=
]
{
return
minItem
->
errorDefinition
();
},
[
=
](
double
v
)
{
minItem
->
setErrorDefinition
(
v
);
},
&
m_updaters
,
"Error definition factor for parameter error calculation"
,
RealLimits
::
positive
()));
m_minimizerLayout
->
addRow
(
"Tolerance:"
,
GUI
::
Util
::
createDoubleSpinbox
(
[
=
]
{
return
minItem
->
tolerance
();
},
[
=
](
double
v
)
{
minItem
->
setTolerance
(
v
);
},
&
m_updaters
,
"Tolerance on the function value at the minimum"
,
RealLimits
::
positive
()));
}
else
// GSL MultiMin
// GSL MultiMin
if
(
m_currentItem
->
currentMinimizerM_TYPE
()
==
GSLMultiMinimizerItem
::
M_TYPE
)
{
if
(
m_currentItem
->
currentMinimizerM_TYPE
()
==
GSLMultiMinimizerItem
::
M_TYPE
)
{
...
@@ -149,6 +124,45 @@ void MinimizerSettingsWidget::createMimimizerEdits()
...
@@ -149,6 +124,45 @@ void MinimizerSettingsWidget::createMimimizerEdits()
#endif
#endif
}
}
void
MinimizerSettingsWidget
::
createMinuitEdits
()
{
MinuitMinimizerItem
*
minItem
=
m_currentItem
->
minimizerItemMinuit
();
m_minimizerLayout
->
addRow
(
"Algorithm:"
,
GUI
::
Util
::
createComboBox
(
[
=
]
{
return
minItem
->
algorithmCombo
();
},
[
=
](
const
QString
&
t
)
{
minItem
->
setCurrentAlgorithm
(
t
);
},
&
m_updaters
,
"Minimization algorithm"
));
m_minimizerLayout
->
addRow
(
"Strategy:"
,
GUI
::
Util
::
createIntSpinbox
(
[
=
]
{
return
minItem
->
strategy
();
},
[
=
](
int
v
)
{
minItem
->
setStrategy
(
v
);
},
&
m_updaters
,
"Minimization strategy (0-low, 1-medium, 2-high quality)"
,
RealLimits
::
limited
(
0
,
2
)));
m_minimizerLayout
->
addRow
(
"ErrorDef factor:"
,
GUI
::
Util
::
createDoubleSpinbox
(
[
=
]
{
return
minItem
->
errorDefinition
();
},
[
=
](
double
v
)
{
minItem
->
setErrorDefinition
(
v
);
},
&
m_updaters
,
"Error definition factor for parameter error calculation"
,
RealLimits
::
positive
()));
m_minimizerLayout
->
addRow
(
"Tolerance:"
,
GUI
::
Util
::
createDoubleSpinbox
(
[
=
]
{
return
minItem
->
tolerance
();
},
[
=
](
double
v
)
{
minItem
->
setTolerance
(
v
);
},
&
m_updaters
,
"Tolerance on the function value at the minimum"
,
RealLimits
::
positive
()));
m_minimizerLayout
->
addRow
(
"Precision:"
,
GUI
::
Util
::
createDoubleSpinbox
(
[
=
]
{
return
minItem
->
precision
();
},
[
=
](
double
v
)
{
minItem
->
setPrecision
(
v
);
},
&
m_updaters
,
"Relative floating point arithmetic precision"
,
RealLimits
::
positive
()));
m_minimizerLayout
->
addRow
(
"Max func calls:"
,
GUI
::
Util
::
createIntSpinbox
(
[
=
]
{
return
minItem
->
maxFuncCalls
();
},
[
=
](
int
v
)
{
minItem
->
setMaxFuncCalls
(
v
);
},
&
m_updaters
,
"Maximum number of function calls"
,
RealLimits
::
nonnegative
()));
}
void
MinimizerSettingsWidget
::
updateUIValues
()
void
MinimizerSettingsWidget
::
updateUIValues
()
{
{
for
(
const
auto
&
updater
:
m_updaters
)
for
(
const
auto
&
updater
:
m_updaters
)
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Fit/MinimizerSettingsWidget.h
+
1
−
0
View file @
63643f90
...
@@ -39,6 +39,7 @@ public slots:
...
@@ -39,6 +39,7 @@ public slots:
private:
private:
void
createMimimizerEdits
();
void
createMimimizerEdits
();
void
createMinuitEdits
();
void
updateUIValues
();
void
updateUIValues
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment