Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
biocham
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Lifeware
biocham
Commits
d6cd76d5
Commit
d6cd76d5
authored
Jul 26, 2016
by
Sylvain Soliman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add upper limit to the number of deleted rules
parent
8627c400
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
revision.pl
revision.pl
+3
-2
util.pl
util.pl
+11
-6
No files found.
revision.pl
View file @
d6cd76d5
...
...
@@ -345,8 +345,9 @@ rules_from_states(["FALSE" | S1], ["FALSE" | S2], [_ | Molecules], I, D, P, R) :
delete_rules
:-
findall
(
Item
,
item
([
kind
:
reaction
,
item
:
Item
]),
Reactions
),
sublist
(
ToBeDeleted
,
Reactions
),
ToBeDeleted
\
=
[],
% FIXME make the upper bound parameterizable, currently using 6 Chabrier
% style
extract_sublist
(
Reactions
,
ToBeDeleted
,
1
,
6
),
maplist
(
del_reaction_backtracking
,
ToBeDeleted
).
...
...
util.pl
View file @
d6cd76d5
...
...
@@ -29,7 +29,7 @@
clean
/
1
,
check_cleaned
/
1
,
join_op
/
3
,
sublist
/
2
,
extract_sublist
/
4
,
alphabetic_char
/
1
,
alphanumeric_char
/
1
,
numeric_char
/
1
,
...
...
@@ -428,13 +428,18 @@ join_op(Op, [I1, I2 | Items], Term) :-
join_op(Op, [I2 | Items], T).
sublist([], []).
extract_sublist([H | T], [H | TT], Min, Max) :-
Max > 0,
MMin is Min - 1,
MMax is Max - 1,
extract_sublist(T, TT, MMin, MMax).
sublist([H | T], [H | TT]
) :-
sublist(T, TT
).
extract_sublist([_ | T], TT, Min, Max
) :-
extract_sublist(T, TT, Min, Max
).
sublist(T, [_ | TT]) :-
sublist(T, TT).
extract_sublist([], [], Min, Max) :-
Min =< 0,
Max >= 0.
uppercase_char(Char) :-
...
...
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