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
9d1962a1
Commit
9d1962a1
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
DiscreteAxis rm unused
parent
e84d7225
No related branches found
No related tags found
1 merge request
!1621
Scale (IAxis) now without children
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Base/Axis/DiscreteAxis.cpp
+0
-12
0 additions, 12 deletions
Base/Axis/DiscreteAxis.cpp
Base/Axis/DiscreteAxis.h
+0
-5
0 additions, 5 deletions
Base/Axis/DiscreteAxis.h
with
0 additions
and
17 deletions
Base/Axis/DiscreteAxis.cpp
+
0
−
12
View file @
9d1962a1
...
@@ -35,10 +35,8 @@ std::vector<Bin1D> centers2bins(const std::vector<double>& centers)
...
@@ -35,10 +35,8 @@ std::vector<Bin1D> centers2bins(const std::vector<double>& centers)
DiscreteAxis
::
DiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
DiscreteAxis
::
DiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
:
IAxis
(
name
,
centers2bins
(
points
))
:
IAxis
(
name
,
centers2bins
(
points
))
,
m_coordinates
(
points
)
{
{
ASSERT
(
size
()
==
points
.
size
());
ASSERT
(
size
()
==
points
.
size
());
ASSERT
(
size
()
==
m_coordinates
.
size
());
}
}
DiscreteAxis
::
DiscreteAxis
(
const
std
::
string
&
name
,
size_t
n
,
double
first
,
double
last
)
DiscreteAxis
::
DiscreteAxis
(
const
std
::
string
&
name
,
size_t
n
,
double
first
,
double
last
)
...
@@ -46,16 +44,6 @@ DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, doub
...
@@ -46,16 +44,6 @@ DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, doub
{
{
}
}
void
DiscreteAxis
::
checkIndex
(
size_t
index
)
const
{
if
(
m_coordinates
.
size
()
>
index
)
return
;
std
::
string
message
=
"Error in DiscreteAxis::binCenter: passed index "
;
message
+=
std
::
to_string
(
index
)
+
" exceeds the size "
;
message
+=
std
::
to_string
(
m_coordinates
.
size
())
+
" of the axis"
;
throw
std
::
runtime_error
(
message
);
}
IAxis
*
newDiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
IAxis
*
newDiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
{
{
return
new
IAxis
(
name
,
centers2bins
(
points
));
return
new
IAxis
(
name
,
centers2bins
(
points
));
...
...
This diff is collapsed.
Click to expand it.
Base/Axis/DiscreteAxis.h
+
0
−
5
View file @
9d1962a1
...
@@ -23,11 +23,6 @@ class DiscreteAxis : public IAxis {
...
@@ -23,11 +23,6 @@ class DiscreteAxis : public IAxis {
public:
public:
DiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
);
DiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
);
DiscreteAxis
(
const
std
::
string
&
name
,
size_t
n
,
double
first
,
double
last
);
DiscreteAxis
(
const
std
::
string
&
name
,
size_t
n
,
double
first
,
double
last
);
private:
void
checkIndex
(
size_t
index
)
const
;
std
::
vector
<
double
>
m_coordinates
;
};
};
IAxis
*
newDiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
);
IAxis
*
newDiscreteAxis
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
);
...
...
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