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
e9bf5d6c
Commit
e9bf5d6c
authored
1 year ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
express newX fct by X
parent
7318029c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Base/Axis/MakeScale.cpp
+5
-7
5 additions, 7 deletions
Base/Axis/MakeScale.cpp
with
5 additions
and
7 deletions
Base/Axis/MakeScale.cpp
+
5
−
7
View file @
e9bf5d6c
...
@@ -55,6 +55,7 @@ Scale* newGenericScale(const std::string& name, const std::vector<double>& limit
...
@@ -55,6 +55,7 @@ Scale* newGenericScale(const std::string& name, const std::vector<double>& limit
return
new
Scale
(
name
,
limits2bins
(
limits
));
return
new
Scale
(
name
,
limits2bins
(
limits
));
}
}
Scale
ListScan
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
Scale
ListScan
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
{
{
return
Scale
(
name
,
centers2bins
(
points
));
return
Scale
(
name
,
centers2bins
(
points
));
...
@@ -62,7 +63,7 @@ Scale ListScan(const std::string& name, const std::vector<double>& points)
...
@@ -62,7 +63,7 @@ Scale ListScan(const std::string& name, const std::vector<double>& points)
Scale
*
newListScan
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
Scale
*
newListScan
(
const
std
::
string
&
name
,
const
std
::
vector
<
double
>&
points
)
{
{
return
new
Scale
(
name
,
centers2bins
(
points
));
return
new
Scale
(
ListScan
(
name
,
points
));
}
}
...
@@ -73,7 +74,7 @@ Scale EquiDivision(const std::string& name, size_t nbins, double start, double e
...
@@ -73,7 +74,7 @@ Scale EquiDivision(const std::string& name, size_t nbins, double start, double e
Scale
*
newEquiDivision
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
Scale
*
newEquiDivision
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
{
{
return
new
Scale
(
name
,
bounds2d
ivision
(
nbins
,
start
,
end
));
return
new
Scale
(
EquiD
ivision
(
name
,
nbins
,
start
,
end
));
}
}
std
::
shared_ptr
<
Scale
>
sharedEquiDivision
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
std
::
shared_ptr
<
Scale
>
sharedEquiDivision
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
...
@@ -92,17 +93,14 @@ std::unique_ptr<Scale> uniqueEquiDivision(const std::string& name, size_t nbins,
...
@@ -92,17 +93,14 @@ std::unique_ptr<Scale> uniqueEquiDivision(const std::string& name, size_t nbins,
Scale
EquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
Scale
EquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
{
{
if
(
nbins
<
2
)
if
(
nbins
<
2
)
throw
std
::
runtime_error
(
"Cannot
create
scan axis with less than two points"
);
throw
std
::
runtime_error
(
"Cannot scan axis with less than two points"
);
const
double
delta
=
(
end
-
start
)
/
(
nbins
-
1
);
const
double
delta
=
(
end
-
start
)
/
(
nbins
-
1
);
return
EquiDivision
(
name
,
nbins
,
start
-
delta
/
2
,
end
+
delta
/
2
);
return
EquiDivision
(
name
,
nbins
,
start
-
delta
/
2
,
end
+
delta
/
2
);
}
}
Scale
*
newEquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
Scale
*
newEquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
double
end
)
{
{
if
(
nbins
<
2
)
return
new
Scale
(
EquiScan
(
name
,
nbins
,
start
,
end
));
throw
std
::
runtime_error
(
"Cannot create scan axis with less than two points"
);
const
double
delta
=
(
end
-
start
)
/
(
nbins
-
1
);
return
newEquiDivision
(
name
,
nbins
,
start
-
delta
/
2
,
end
+
delta
/
2
);
}
}
std
::
shared_ptr
<
Scale
>
sharedEquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
std
::
shared_ptr
<
Scale
>
sharedEquiScan
(
const
std
::
string
&
name
,
size_t
nbins
,
double
start
,
...
...
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