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
def5326d
Commit
def5326d
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
- check_?_axis
parent
fea4d381
No related branches found
No related tags found
1 merge request
!931
start cleanup of IHistogram internals
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Device/Histo/IHistogram.cpp
+6
-30
6 additions, 30 deletions
Device/Histo/IHistogram.cpp
Device/Histo/IHistogram.h
+0
-2
0 additions, 2 deletions
Device/Histo/IHistogram.h
with
6 additions
and
32 deletions
Device/Histo/IHistogram.cpp
+
6
−
30
View file @
def5326d
...
...
@@ -54,14 +54,12 @@ size_t IHistogram::getTotalNumberOfBins() const
const
IAxis
&
IHistogram
::
xAxis
()
const
{
check_x_axis
();
return
m_data
->
axis
(
0
);
return
m_frame
->
axis
(
0
);
}
const
IAxis
&
IHistogram
::
yAxis
()
const
{
check_y_axis
();
return
m_data
->
axis
(
1
);
return
m_frame
->
axis
(
1
);
}
double
IHistogram
::
xMin
()
const
...
...
@@ -114,24 +112,22 @@ size_t IHistogram::findGlobalBin(double x, double y) const
size_t
IHistogram
::
xAxisIndex
(
size_t
i
)
const
{
return
m_
data
->
projectedIndex
(
i
,
0
);
return
m_
frame
->
projectedIndex
(
i
,
0
);
}
size_t
IHistogram
::
yAxisIndex
(
size_t
i
)
const
{
return
m_
data
->
projectedIndex
(
i
,
1
);
return
m_
frame
->
projectedIndex
(
i
,
1
);
}
double
IHistogram
::
xAxisValue
(
size_t
i
)
{
check_x_axis
();
return
m_data
->
projectedCoord
(
i
,
0
);
return
m_frame
->
projectedCoord
(
i
,
0
);
}
double
IHistogram
::
yAxisValue
(
size_t
i
)
{
check_y_axis
();
return
m_data
->
projectedCoord
(
i
,
1
);
return
m_frame
->
projectedCoord
(
i
,
1
);
}
double
IHistogram
::
binContent
(
size_t
i
)
const
...
...
@@ -242,26 +238,6 @@ std::vector<double> IHistogram::meanVector() const
return
result
;
}
void
IHistogram
::
check_x_axis
()
const
{
if
(
rank
()
<
1
)
{
std
::
ostringstream
message
;
message
<<
"IHistogram::check_x_axis() -> Error. X-xis does not exist. "
;
message
<<
"Rank of histogram "
<<
rank
()
<<
"."
<<
std
::
endl
;
throw
std
::
runtime_error
(
message
.
str
());
}
}
void
IHistogram
::
check_y_axis
()
const
{
if
(
rank
()
<
2
)
{
std
::
ostringstream
message
;
message
<<
"IHistogram::check_y_axis() -> Error. Y-axis does not exist. "
;
message
<<
"Rank of histogram "
<<
rank
()
<<
"."
<<
std
::
endl
;
throw
std
::
runtime_error
(
message
.
str
());
}
}
void
IHistogram
::
init_from_data
(
const
Powerfield
<
double
>&
source
)
{
if
(
rank
()
!=
source
.
rank
())
{
...
...
This diff is collapsed.
Click to expand it.
Device/Histo/IHistogram.h
+
0
−
2
View file @
def5326d
...
...
@@ -170,8 +170,6 @@ public:
std
::
vector
<
double
>
meanVector
()
const
;
protected
:
void
check_x_axis
()
const
;
void
check_y_axis
()
const
;
void
init_from_data
(
const
Powerfield
<
double
>&
source
);
double
binData
(
size_t
i
,
DataType
dataType
)
const
;
std
::
vector
<
double
>
getDataVector
(
DataType
dataType
)
const
;
...
...
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