Skip to content

Commit 55de58c

Browse files
author
Floyd Zweydinger
committed
added python sat prange
1 parent 92f86d1 commit 55de58c

File tree

4 files changed

+778
-1029
lines changed

4 files changed

+778
-1029
lines changed

decoding/matrix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __getitem__(self, tup):
2121
assert x < self.nrows and y < self.ncols
2222
return self.data[x][y]
2323

24-
def print(self, tranpose: bool = False):
24+
def print(self, transpose: bool = False):
2525
""" printing """
2626
print("nrows:", self.nrows, ", ncols:", self.ncols)
2727
for i in range(self.nrows):
@@ -101,7 +101,7 @@ def gauß(self, max_rank: Union[int, None] = None) -> int:
101101
if sel == -1:
102102
return row
103103

104-
self.__swap_rows(sel, row)
104+
self.swap_rows(sel, row)
105105

106106
# solve remaining coordinates
107107
for i in range(self.nrows):
@@ -172,7 +172,7 @@ def popcnt_col(self, col: int) -> int:
172172
t += self.data[j][col]
173173
return t
174174

175-
def __swap_rows(self, i: int, j: int) -> None:
175+
def swap_rows(self, i: int, j: int) -> None:
176176
""" swap the rows i and j """
177177
assert i < self.nrows and j < self.nrows
178178
if i == j: return
@@ -181,7 +181,7 @@ def __swap_rows(self, i: int, j: int) -> None:
181181
self.data[i][k] = self.data[j][k]
182182
self.data[j][k] = tmp
183183

184-
def __swap_cols(self, i: int, j: int) -> None:
184+
def swap_cols(self, i: int, j: int) -> None:
185185
""" swap the cols i and j """
186186
assert i < self.ncols and j < self.ncols
187187
if i == j: return

0 commit comments

Comments
 (0)