Fixed scrambled code

This commit is contained in:
Robert Smallshire
2014-09-02 11:02:17 +02:00
parent dcac37022d
commit b4800551fd
+1 -3
View File
@@ -96,6 +96,7 @@ class CatalogBuilder:
is_rm, diff = self._is_row_major(i_min, j_min, j_max)
if is_rm:
return RowMajorCatalog(i_min, i_max, j_min, j_max, diff)
return DictionaryCatalog(self._catalog)
def _is_row_major(self, i_min, j_min, j_max):
"""Does row major ordering predict values from keys?
@@ -110,7 +111,6 @@ class CatalogBuilder:
be predicted from the keys by assuming a row-major ordering,
otherwise False. If True, the second element will be a constant
offset, otherwise it can be ignored.
ordering
"""
diff = None
for (i, j), actual_value in self._catalog:
@@ -122,8 +122,6 @@ class CatalogBuilder:
return False, None
return True, diff
return DictionaryCatalog(self._catalog)
class RowMajorCatalog(Mapping):
"""A mapping which assumes a row-major ordering of a two-dimensional matrix.