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
f030b377
Commit
f030b377
authored
6 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Unused method removed
parent
a66bcc2e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/Instrument/ISquaredFunction.cpp
+0
-40
0 additions, 40 deletions
Core/Instrument/ISquaredFunction.cpp
Core/Instrument/ISquaredFunction.h
+0
-7
0 additions, 7 deletions
Core/Instrument/ISquaredFunction.h
with
0 additions
and
47 deletions
Core/Instrument/ISquaredFunction.cpp
+
0
−
40
View file @
f030b377
...
@@ -22,15 +22,6 @@ SquaredFunctionDefault* SquaredFunctionDefault::clone() const
...
@@ -22,15 +22,6 @@ SquaredFunctionDefault* SquaredFunctionDefault::clone() const
return
new
SquaredFunctionDefault
();
return
new
SquaredFunctionDefault
();
}
}
double
SquaredFunctionDefault
::
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
{
if
(
Numeric
::
areAlmostEqual
(
real_value
,
simulated_value
))
return
0.
;
double
diff_squared
=
(
simulated_value
-
real_value
)
*
(
simulated_value
-
real_value
);
double
normalization
=
calculateSquaredError
(
real_value
);
return
diff_squared
/
normalization
;
}
double
SquaredFunctionDefault
::
calculateSquaredError
(
double
SquaredFunctionDefault
::
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
double
real_value
,
double
simulated_value
)
const
...
@@ -46,15 +37,6 @@ SquaredFunctionSimError* SquaredFunctionSimError::clone() const
...
@@ -46,15 +37,6 @@ SquaredFunctionSimError* SquaredFunctionSimError::clone() const
return
new
SquaredFunctionSimError
();
return
new
SquaredFunctionSimError
();
}
}
double
SquaredFunctionSimError
::
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
{
if
(
Numeric
::
areAlmostEqual
(
real_value
,
simulated_value
))
return
0.0
;
double
diff_squared
=
(
simulated_value
-
real_value
)
*
(
simulated_value
-
real_value
);
double
normalization
=
calculateSquaredError
(
real_value
,
simulated_value
);
return
diff_squared
/
normalization
;
}
double
SquaredFunctionSimError
::
calculateSquaredError
(
double
,
double
simulated_value
)
const
double
SquaredFunctionSimError
::
calculateSquaredError
(
double
,
double
simulated_value
)
const
{
{
...
@@ -68,14 +50,6 @@ SquaredFunctionMeanSquaredError* SquaredFunctionMeanSquaredError::clone() const
...
@@ -68,14 +50,6 @@ SquaredFunctionMeanSquaredError* SquaredFunctionMeanSquaredError::clone() const
return
new
SquaredFunctionMeanSquaredError
();
return
new
SquaredFunctionMeanSquaredError
();
}
}
double
SquaredFunctionMeanSquaredError
::
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
{
if
(
Numeric
::
areAlmostEqual
(
real_value
,
simulated_value
))
return
0.0
;
double
diff_squared
=
(
simulated_value
-
real_value
)
*
(
simulated_value
-
real_value
);
double
normalization
=
calculateSquaredError
(
real_value
,
simulated_value
);
return
diff_squared
/
normalization
;
}
double
SquaredFunctionMeanSquaredError
::
calculateSquaredError
(
double
SquaredFunctionMeanSquaredError
::
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
double
real_value
,
double
simulated_value
)
const
...
@@ -93,13 +67,6 @@ SquaredFunctionSystematicError* SquaredFunctionSystematicError::clone() const
...
@@ -93,13 +67,6 @@ SquaredFunctionSystematicError* SquaredFunctionSystematicError::clone() const
return
new
SquaredFunctionSystematicError
(
m_epsilon
);
return
new
SquaredFunctionSystematicError
(
m_epsilon
);
}
}
double
SquaredFunctionSystematicError
::
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
{
double
diff_squared
=
(
simulated_value
-
real_value
)
*
(
simulated_value
-
real_value
);
double
normalization
=
calculateSquaredError
(
real_value
,
simulated_value
);
return
diff_squared
/
normalization
;
}
double
SquaredFunctionSystematicError
::
calculateSquaredError
(
double
real_value
,
double
)
const
double
SquaredFunctionSystematicError
::
calculateSquaredError
(
double
real_value
,
double
)
const
{
{
...
@@ -113,13 +80,6 @@ SquaredFunctionGaussianError*SquaredFunctionGaussianError::clone() const
...
@@ -113,13 +80,6 @@ SquaredFunctionGaussianError*SquaredFunctionGaussianError::clone() const
return
new
SquaredFunctionGaussianError
(
m_sigma
);
return
new
SquaredFunctionGaussianError
(
m_sigma
);
}
}
double
SquaredFunctionGaussianError
::
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
{
double
diff_squared
=
(
simulated_value
-
real_value
)
*
(
simulated_value
-
real_value
);
double
sigma_squared
=
m_sigma
*
m_sigma
;
return
diff_squared
/
sigma_squared
;
}
double
SquaredFunctionGaussianError
::
calculateSquaredError
(
double
,
double
)
const
double
SquaredFunctionGaussianError
::
calculateSquaredError
(
double
,
double
)
const
{
{
...
...
This diff is collapsed.
Click to expand it.
Core/Instrument/ISquaredFunction.h
+
0
−
7
View file @
f030b377
...
@@ -27,8 +27,6 @@ public:
...
@@ -27,8 +27,6 @@ public:
ISquaredFunction
()
{}
ISquaredFunction
()
{}
virtual
~
ISquaredFunction
()
{}
virtual
~
ISquaredFunction
()
{}
virtual
ISquaredFunction
*
clone
()
const
=
0
;
virtual
ISquaredFunction
*
clone
()
const
=
0
;
virtual
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
=
0
;
virtual
double
calculateSquaredError
(
virtual
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
=
0.0
)
const
=
0
;
double
real_value
,
double
simulated_value
=
0.0
)
const
=
0
;
...
@@ -47,7 +45,6 @@ public:
...
@@ -47,7 +45,6 @@ public:
SquaredFunctionDefault
()
{}
SquaredFunctionDefault
()
{}
~
SquaredFunctionDefault
()
{}
~
SquaredFunctionDefault
()
{}
SquaredFunctionDefault
*
clone
()
const
override
;
SquaredFunctionDefault
*
clone
()
const
override
;
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
=
0
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
=
0
)
const
override
;
};
};
...
@@ -62,7 +59,6 @@ public:
...
@@ -62,7 +59,6 @@ public:
SquaredFunctionSimError
()
{}
SquaredFunctionSimError
()
{}
~
SquaredFunctionSimError
()
{}
~
SquaredFunctionSimError
()
{}
SquaredFunctionSimError
*
clone
()
const
override
;
SquaredFunctionSimError
*
clone
()
const
override
;
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
};
};
...
@@ -78,7 +74,6 @@ public:
...
@@ -78,7 +74,6 @@ public:
SquaredFunctionMeanSquaredError
()
{}
SquaredFunctionMeanSquaredError
()
{}
~
SquaredFunctionMeanSquaredError
()
{}
~
SquaredFunctionMeanSquaredError
()
{}
SquaredFunctionMeanSquaredError
*
clone
()
const
override
;
SquaredFunctionMeanSquaredError
*
clone
()
const
override
;
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
};
};
...
@@ -93,7 +88,6 @@ public:
...
@@ -93,7 +88,6 @@ public:
SquaredFunctionSystematicError
(
double
epsilon
=
0.08
)
:
m_epsilon
(
epsilon
){}
SquaredFunctionSystematicError
(
double
epsilon
=
0.08
)
:
m_epsilon
(
epsilon
){}
~
SquaredFunctionSystematicError
()
{}
~
SquaredFunctionSystematicError
()
{}
SquaredFunctionSystematicError
*
clone
()
const
override
;
SquaredFunctionSystematicError
*
clone
()
const
override
;
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
private
:
private
:
double
m_epsilon
;
double
m_epsilon
;
...
@@ -110,7 +104,6 @@ public:
...
@@ -110,7 +104,6 @@ public:
SquaredFunctionGaussianError
(
double
sigma
=
0.01
)
:
m_sigma
(
sigma
){}
SquaredFunctionGaussianError
(
double
sigma
=
0.01
)
:
m_sigma
(
sigma
){}
~
SquaredFunctionGaussianError
()
{}
~
SquaredFunctionGaussianError
()
{}
SquaredFunctionGaussianError
*
clone
()
const
override
;
SquaredFunctionGaussianError
*
clone
()
const
override
;
double
calculateSquaredDifference
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
double
calculateSquaredError
(
double
real_value
,
double
simulated_value
)
const
override
;
private
:
private
:
double
m_sigma
;
double
m_sigma
;
...
...
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