mirror of
https://github.com/wassname/segpy.git
synced 2026-08-12 12:30:30 +08:00
Fixed scrambled code
This commit is contained in:
+1
-3
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user