Commit eb40d8119ab16c7beb158dcce067824d0b8c032f

Authored by Anthex
1 parent 477d730d

suppress unused variable warning, remove useless toString function

Showing 2 changed files with 5 additions and 6 deletions   Show diff stats
@@ -9,7 +9,7 @@ testSample = testSamples[0] @@ -9,7 +9,7 @@ testSample = testSamples[0]
9 #cells Table initialization 9 #cells Table initialization
10 for i in range (0, 3): 10 for i in range (0, 3):
11 Tf.append([]) 11 Tf.append([])
12 - for k in range (0,3): 12 + for _ in range (0,3):
13 Tf[i].append([]) 13 Tf[i].append([])
14 14
15 #known fingerprints 15 #known fingerprints
@@ -79,10 +79,10 @@ class MarkovModel(): @@ -79,10 +79,10 @@ class MarkovModel():
79 self.previousCell = 0 79 self.previousCell = 0
80 for i in range (0, 11): 80 for i in range (0, 11):
81 self.MarkovValues.append([]) 81 self.MarkovValues.append([])
82 - for k in range (0, 10): 82 + for _ in range (0, 10):
83 self.MarkovValues[i].append(MarkovValue()) 83 self.MarkovValues[i].append(MarkovValue())
84 self.MarkovValues[10][0].nb = 1 #initial position sigma increment 84 self.MarkovValues[10][0].nb = 1 #initial position sigma increment
85 - 85 +
86 def moveToCellID(self, nextCell): 86 def moveToCellID(self, nextCell):
87 self.MarkovValues[nextCell][self.previousCell].nb += 1 87 self.MarkovValues[nextCell][self.previousCell].nb += 1
88 self.MarkovValues[10][nextCell].nb += 1 88 self.MarkovValues[10][nextCell].nb += 1
@@ -114,7 +114,7 @@ class MarkovModel(): @@ -114,7 +114,7 @@ class MarkovModel():
114 def printPercentages(self): 114 def printPercentages(self):
115 print("\t? \t1 \t2 \t3\t4 \t5 \t6 \t7 \t8 \t9") 115 print("\t? \t1 \t2 \t3\t4 \t5 \t6 \t7 \t8 \t9")
116 print("---------------------------------------------------------------------------------", end='') 116 print("---------------------------------------------------------------------------------", end='')
117 - 117 +
118 for i in range (1, 10): 118 for i in range (1, 10):
119 print("\r\n", end='') 119 print("\r\n", end='')
120 120
@@ -138,8 +138,7 @@ class MarkovModel(): @@ -138,8 +138,7 @@ class MarkovModel():
138 def path(self, locationIDs): 138 def path(self, locationIDs):
139 for loc in locationIDs: 139 for loc in locationIDs:
140 self.moveToCellID(loc) 140 self.moveToCellID(loc)
141 - def toString(self):  
142 - return "" 141 +
143 142
144 def newCell(n1, n2, n3, n4, l1, l2): 143 def newCell(n1, n2, n3, n4, l1, l2):
145 return Cell(RSSVector(n1,n2,n3,n4), Location(l1,l2)) 144 return Cell(RSSVector(n1,n2,n3,n4), Location(l1,l2))