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
Sign in
Toggle navigation
Open sidebar
Michele Volpato
Alnos
Commits
2f1c022e
Commit
2f1c022e
authored
Nov 05, 2015
by
Michele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug with table closedness
parent
f2f226bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
learning/observationtable.py
learning/observationtable.py
+3
-4
No files found.
learning/observationtable.py
View file @
2f1c022e
...
...
@@ -146,6 +146,7 @@ class Table:
rows
.
add
(
row
)
continue
found
=
False
# search in S for Hminus
for
rowInS
in
self
.
_rowsInS
:
if
self
.
_moreSpecificRow
(
rowInS
,
row
,
False
):
...
...
@@ -417,15 +418,14 @@ class Table:
labels
=
inputs
.
union
(
outputs
)
for
label
in
labels
:
rowExt1
=
row1
+
(
label
,)
rowExt2
=
row
2
+
(
label
,
)
rowExt1
=
th
.
flatten
(
row1
+
(
label
,)
,
self
.
_quiescence
)
rowExt2
=
row
Ext1
=
th
.
flatten
(
row2
+
(
label
,),
self
.
_quiescence
)
# rowExt1 must be in Rows, because label is either an
# enabled input after row, or an observed output.
if
rowExt1
not
in
self
.
_rows
:
self
.
_logger
.
error
(
"Error while checking consistency: the prefix "
+
str
(
rowExt1
)
+
" should be a row, but it is not."
)
self
.
printTable
(
prefix
=
"_error"
)
self
.
_logger
.
error
(
"Table printed in ./tables/_error_table.csv"
)
self
.
_logger
.
error
(
error
)
raise
if
not
rowExt2
in
self
.
_rows
:
# rowExt2 is not in rows. If label is an input then
...
...
@@ -435,7 +435,6 @@ class Table:
self
.
_logger
.
error
(
"Error while checking consistency: the prefix "
+
str
(
rowExt2
)
+
" should be a row, but it is not."
)
self
.
printTable
(
prefix
=
"_error"
)
self
.
_logger
.
error
(
"Table printed in ./tables/_error_table.csv"
)
self
.
_logger
.
error
(
error
)
raise
# If label is an output, then ok (being less specific,
# this is allowed)
...
...
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