def branch_metric(self,expected,received):
     hard_coded = []
     for bit in received:
         if bit >= 0.5:
             new_bit = 1
         else:
             new_bit = 0
         hard_coded.append(new_bit)
     return PS3_tests.hamming(expected, hard_coded)
 def branch_metric(self, expected, received):
     hard_coded = []
     for bit in received:
         if bit >= 0.5:
             new_bit = 1
         else:
             new_bit = 0
         hard_coded.append(new_bit)
     return PS3_tests.hamming(expected, hard_coded)
Exemple #3
0
 def branch_metric(self, expected, received):
     #your code here
     r = len(received)
     digtized = []
     for i in range(r):
         if (received[i] - THR) > -0.000000001:
             digtized.append(1)
         else:
             digtized.append(0)
     return PS3_tests.hamming(expected, digtized)
Exemple #4
0
 def branch_metric(self, expected, received):
     # your code here
     r = len(received)
     digtized = []
     for i in range(r):
         if (received[i] - THR) > -0.000000001:
             digtized.append(1)
         else:
             digtized.append(0)
     return PS3_tests.hamming(expected, digtized)
Exemple #5
0
 def branch_metric(self,expected,received):
     return PS3_tests.hamming(expected, [int(round(voltage)) for voltage in received])