Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Adam P. Goucher
slmake
Commits
8113ea88
Commit
8113ea88
authored
Aug 21, 2020
by
Adam P. Goucher
Browse files
Address issue mentioned in Dave's comment
parent
dafdd533
Pipeline
#180336646
passed with stages
in 10 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
headers/slmake.h
headers/slmake.h
+6
-3
No files found.
headers/slmake.h
View file @
8113ea88
...
...
@@ -531,14 +531,17 @@ namespace apg {
pattern
altstell
=
remainder
+
xlt
.
shift
(
bbox
[
0
],
bbox
[
1
]);
double
altstelllength
=
stelllength
;
uint64_t
altbdiff
=
0
;
bool
oneblock_improvement
=
false
;
if
(
oneblock
)
{
int64_t
bbox2
[
4
]
=
{
0
};
xlt
.
shift
(
bbox
[
0
],
bbox
[
1
]).
getrect
(
bbox2
);
bbox2
[
0
]
-=
ideal
[
0
];
bbox2
[
1
]
-=
ideal
[
1
];
altbdiff
=
(
bbox2
[
0
]
*
bbox2
[
0
])
+
(
bbox2
[
1
]
*
bbox2
[
1
]);
trythis
=
(
altbdiff
==
0
);
trythis
=
trythis
||
(
std
::
sqrt
((
double
)
altbdiff
)
<=
std
::
sqrt
((
double
)
bdiff
)
-
25.0
)
;
oneblock_improvement
=
(
std
::
sqrt
((
double
)
altbdiff
)
<=
std
::
sqrt
((
double
)
bdiff
)
-
25.0
+
0.1
*
initbail
);
trythis
=
(
altbdiff
==
0
)
||
oneblock_improvement
;
}
else
if
(
lexrepr
==
"xs4_33"
)
{
if
(
trycount
==
deep_bailout
)
{
std
::
cout
<<
"Reached bailout for strategy 'deep'"
<<
std
::
endl
;
...
...
@@ -588,7 +591,7 @@ namespace apg {
if
(
altbdiff
==
0
)
{
std
::
cout
<<
"
\033
[32;1mInitial block correctly emplaced
\033
[0m"
<<
std
::
endl
;
return
newpat
;
}
else
if
(
std
::
sqrt
((
double
)
altbdiff
)
<=
std
::
sqrt
((
double
)
bdiff
)
-
25.0
)
{
}
else
if
(
oneblock_improvement
)
{
std
::
cout
<<
"
\033
[32;1mInitial block moved towards target
\033
[0m"
<<
std
::
endl
;
return
newpat
;
}
...
...
Adam P. Goucher
@apgoucher
mentioned in issue
#1
·
Aug 20, 2020
mentioned in issue
#1
mentioned in issue #1
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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