Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
9ab27660
Commit
9ab27660
authored
Jul 30, 2018
by
Lynch, Vickie
Browse files
Refs #22420 binary_search without sort fastest
parent
511fd283
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Crystal/src/PredictSatellitePeaks.cpp
View file @
9ab27660
...
...
@@ -241,11 +241,10 @@ void PredictSatellitePeaks::predictOffsets(
boost
::
math
::
iround
(
1000.0
*
satelliteHKL
[
1
]),
boost
::
math
::
iround
(
1000.0
*
satelliteHKL
[
2
])};
auto
it
=
f
in
d
(
AlreadyDonePeaks
.
begin
(),
AlreadyDonePeaks
.
end
(),
SavPk
);
if
(
it
==
AlreadyDonePeaks
.
end
()
)
{
bool
foundPeak
=
b
in
ary_search
(
AlreadyDonePeaks
.
begin
(),
AlreadyDonePeaks
.
end
(),
SavPk
);
if
(
!
foundPeak
)
{
AlreadyDonePeaks
.
push_back
(
SavPk
);
std
::
sort
(
AlreadyDonePeaks
.
begin
(),
AlreadyDonePeaks
.
end
());
}
else
{
continue
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment