#10: Adding missing method docs
This commit is contained in:
@@ -5,7 +5,15 @@ INIT_STATE = [0, 1, 1, 0]
|
||||
COEFFICIENTS = [1, 1, 1, 0]
|
||||
|
||||
|
||||
def create_shift_register(init_state: list, coefficients: list):
|
||||
def create_shift_register(init_state: [int], coefficients: [int]) -> [int]:
|
||||
"""
|
||||
Creates and returns the maximum bit stream for the given input state via a linear shift register.
|
||||
Especially the coefficients are important as choosing the correct ones for any given shift register length
|
||||
will provide the maximum amount of bits before they repeat
|
||||
:param init_state: The initial bits in the shift register
|
||||
:param coefficients: The coefficients of every field in the shift register
|
||||
:return: The maximum length bit stream generated by the linear shift register
|
||||
"""
|
||||
return_list = []
|
||||
current_state = init_state.copy()
|
||||
current_state_list = [current_state.copy()]
|
||||
|
||||
Reference in New Issue
Block a user