Commit 67724b6742786baaca99c81b95e2533393479b57

Authored by Anthex
1 parent eb40d811

add color output format for easier reading

Showing 2 changed files with 8 additions and 4 deletions   Show diff stats
... ... @@ -3,8 +3,7 @@ import sys
3 3  
4 4 Tf = [] #cells table
5 5  
6   -testSamples = [RSSVector(-26, -42, -13, -46), RSSVector(-26, -42, -13, -46), RSSVector(-26, -42, -13, -46)]
7   -testSample = testSamples[0]
  6 +testSample = RSSVector(-26, -42, -13, -46)
8 7  
9 8 #cells Table initialization
10 9 for i in range (0, 3):
... ... @@ -39,7 +38,7 @@ def main(args):
39 38  
40 39 #### Markov ####
41 40 MM = MarkovModel(Tf)
42   - MM.path([8,7,8,7,8,7,8,5,8,2,9,8,1,9,8,9,5,4,3,2,3,2,4,5,4,5,6,6,7,6,9,5,9,3])
  41 + MM.path([8,7,8,7,8,7,8,5,8,2,9,8,1,9,8,9,5,4,3,2,3,2,4,5,4,5,6,6,7,6,9,5,9,3,2,4,3,5,3,4,3,3,5,6,7,6,7,6,5,4,3,4,3,4])
43 42  
44 43 MM.printValues()
45 44 print("\r\nPERCENTAGES : \r\n")
... ...
structure.py
... ... @@ -120,7 +120,12 @@ class MarkovModel():
120 120  
121 121 print(i, end='\t')
122 122 for k in range (0,10):
123   - print(str(floor(self.MarkovValues[i][k].percentage * 100)), end='\t')
  123 + if not self.MarkovValues[i][k].percentage:
  124 + print("\033[0;31;40m", end='')
  125 + else:
  126 + print("\033[1;36;40m", end='')
  127 + print(str(floor(self.MarkovValues[i][k].percentage * 100)), end='%\t')
  128 + print("\033[1;37;40m", end='')
124 129 print("")
125 130  
126 131 def getMostLikely(self):
... ...