Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
eb012e7a
Commit
eb012e7a
authored
Nov 22, 2019
by
HEMERY Mathieu
Browse files
Rewrite print_show_option
parent
ff0b45ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
hybrid.pl
View file @
eb012e7a
...
...
@@ -761,6 +761,8 @@ print_hybrid_species_constraint([Constraints|Tail], Counter, Stream) :-
print_hybrid_species_constraint
(
Tail
,
Counterp
,
Stream
).
concat_species
([],
''
).
concat_species
([
Sp
|
Sp_tail
],
Result
)
:-
species_to_total
(
Sp
,
Sp_tot
),
foldl
(
concat_species_sr
,
Sp_tail
,
Sp_tot
,
Result
).
...
...
@@ -769,18 +771,10 @@ concat_species_sr(Sp, Acc, Accn) :-
species_to_total
(
Sp
,
Sp_tot
),
atomic_list_concat
([
Acc
,
', '
,
Sp_tot
],
Accn
).
print_show_option
(
Hybrid_original_list
,
Stream
)
:-
(
Hybrid_original_list
=
[]
->
write
(
Stream
,
'%option(show: {}).'
),
nl
(
Stream
)
;
concat_species
(
Hybrid_original_list
,
SpeciesList
),
write
(
Stream
,
'option(show: {'
),
write
(
Stream
,
SpeciesList
),
write
(
Stream
,
'}). % Choose here the species to plot'
),
nl
(
Stream
)
).
print_show_option
(
Hybrid_original_list
,
Stream
)
:-
concat_species
(
Hybrid_original_list
,
Sp_list
),
format
(
Stream
,
'option(show: {~w}). % Choose here the species to plot~n'
,
Sp_list
).
/*
**********************
*/
...
...
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