Mercurial > hg > nsaunier > traffic-intelligence
comparison python/ubc_utils.py @ 61:a8c6d544f015
corrected bug loading Interactions
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 03 Nov 2010 22:51:38 -0400 |
| parents | b8b3768f8d54 |
| children | 290fceb125d2 |
comparison
equal
deleted
inserted
replaced
| 60:1d36a676c745 | 61:a8c6d544f015 |
|---|---|
| 141 interactions = [] | 141 interactions = [] |
| 142 interactionNum = 0 | 142 interactionNum = 0 |
| 143 lines = utils.getLines(file) | 143 lines = utils.getLines(file) |
| 144 while (lines != []) and ((nInteractions<0) or (interactionNum<nInteractions)): | 144 while (lines != []) and ((nInteractions<0) or (interactionNum<nInteractions)): |
| 145 parsedLine = [int(n) for n in lines[0].split(' ')] | 145 parsedLine = [int(n) for n in lines[0].split(' ')] |
| 146 inter = Interaction(interactionNum, TimeInterval(parsedLine[1],parsedLine[2]), parsedLine[3], parsedLine[4], parsedLine[5]) | 146 inter = Interaction(interactionNum, TimeInterval(parsedLine[1],parsedLine[2]), parsedLine[3], parsedLine[4], categoryNum = parsedLine[5]) |
| 147 | 147 |
| 148 indicatorFrameNums = [int(n) for n in lines[1].split(' ')] | 148 indicatorFrameNums = [int(n) for n in lines[1].split(' ')] |
| 149 indicators = [] | 149 indicators = [] |
| 150 for indicatorNum,line in enumerate(lines[2:]): | 150 for indicatorNum,line in enumerate(lines[2:]): |
| 151 values = {} | 151 values = {} |
