Skip to content

Commit

Permalink
Update RegularLDPC.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamchandak94 authored Sep 5, 2020
1 parent 80d9a2b commit c5d6e4a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions LDPC-library/libs/RegularLDPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ def __init__(self, args, construction, verbose=False):
self.n = int(self.args[0])
self.c = int(self.args[2])
self.r = int((self.width / self.height) * self.c)
print("INFO: Regular code: inferred average ones per row as", self.r)
if self.height*self.r!= self.width*self.c:
print("WARNING: Code parameters don't allow a perfectly regular code. " + \
"The row or column weights will be variable depending on the construction method.")
if verbose:
print("INFO: Regular code: inferred average ones per row as", self.r)
if self.height*self.r!= self.width*self.c:
print("WARNING: Code parameters don't allow a perfectly regular code. " + \
"The row or column weights will be variable depending on the construction method.")
else:
raise RuntimeError("invalid input provided")

Expand Down

0 comments on commit c5d6e4a

Please sign in to comment.