Skip to content

Commit

Permalink
docs(frontend): making an Alphabet class
Browse files Browse the repository at this point in the history
  • Loading branch information
bcm-at-zama committed Jul 5, 2024
1 parent dc14040 commit 88e579e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def compile_module(self, args):
min_max_strategy_preference=fhe.MinMaxStrategy.ONE_TLU_PROMOTED,
)

def check_string_is_in_alphabet(string):
def check_string_is_in_alphabet(self, string):
"""Check a string is a valid string of an alphabet."""
assert len(self.mapping_to_int) > 0, "Mapping not defined"

Expand Down Expand Up @@ -341,7 +341,7 @@ def main():
# Do what the user requested
if args.autotest:
myalphabet = Alphabet()
myalphabet.set_alphabet(alphabet)
myalphabet.set_alphabet(args.alphabet)

myalphabet.compile_module(args)
list_patterns = myalphabet.prepare_random_patterns(0, args.max_string_length, 1)
Expand Down Expand Up @@ -376,7 +376,7 @@ def main():
)

myalphabet = Alphabet()
myalphabet.set_alphabet(alphabet, verbose=False)
myalphabet.set_alphabet(args.alphabet, verbose=False)

myalphabet.compile_module(args)
myalphabet.check_string_is_in_alphabet(args.distance[0])
Expand Down

0 comments on commit 88e579e

Please sign in to comment.