Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
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
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
dd72c6a6
Commit
dd72c6a6
authored
1 week ago
by
Philippe Hoch
Browse files
Options
Downloads
Patches
Plain Diff
Add Barth Jespersen Lim
parent
5a3117ae
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1976
failed
1 week ago
Stage: test
Stage: coverage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/LimitationTools.hpp
+42
-0
42 additions, 0 deletions
src/scheme/LimitationTools.hpp
with
42 additions
and
0 deletions
src/scheme/LimitationTools.hpp
0 → 100644
+
42
−
0
View file @
dd72c6a6
#ifndef LIMITATION_TOOLS_HPP
#define LIMITATION_TOOLS_HPP
namespace
toolsLimitation
{
inline
double
computeCoefLimitationBarthJespersen
(
const
double
State
,
const
double
minval
,
const
double
maxval
,
const
double
minvalvois
,
const
double
maxvalvois
,
bool
enableWeakBoundPositivityOnly
=
false
)
{
static
constexpr
double
epsZer0
=
1e-14
;
// on applique le traitement idem de l'ordre 2..
double
coef1
=
0
,
coef2
=
0
;
if
(
enableWeakBoundPositivityOnly
)
{
coef1
=
1
;
const
double
minGlobal
=
1e-12
;
if
(
std
::
fabs
(
minval
-
State
)
<=
epsZer0
)
// epsIsEqualAbs())
coef2
=
1.
;
else
coef2
=
(
minGlobal
-
State
)
/
((
minval
-
State
));
}
else
{
if
(
std
::
fabs
(
maxval
-
State
)
<=
epsZer0
)
// epsIsEqualAbs())
coef1
=
1.
;
else
coef1
=
(
maxvalvois
-
State
)
/
((
maxval
-
State
));
if
(
std
::
fabs
(
minval
-
State
)
<=
epsZer0
)
// epsIsEqualAbs())
coef2
=
1.
;
else
coef2
=
(
minvalvois
-
State
)
/
((
minval
-
State
));
}
// return alfa =
return
std
::
max
(
0.
,
std
::
min
(
1.
,
std
::
min
(
coef1
,
coef2
)));
// return alfa;
}
}
// namespace toolsLimitation
#endif
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