more tuning
This commit is contained in:
parent
3a10724919
commit
980072b6b4
|
@ -498,11 +498,11 @@ class PredictionMode(object):
|
|||
def getConflictingAltSubsets(cls, configs):
|
||||
configToAlts = dict()
|
||||
for c in configs:
|
||||
s = str(c.state.stateNumber) + "/" + str(c.context)
|
||||
alts = configToAlts.get(s, None)
|
||||
h = hash((c.state.stateNumber, c.context))
|
||||
alts = configToAlts.get(h, None)
|
||||
if alts is None:
|
||||
alts = set()
|
||||
configToAlts[s] = alts
|
||||
configToAlts[h] = alts
|
||||
alts.add(c.alt)
|
||||
return configToAlts.values()
|
||||
|
||||
|
|
|
@ -501,11 +501,11 @@ class PredictionMode(Enum):
|
|||
def getConflictingAltSubsets(cls, configs:ATNConfigSet):
|
||||
configToAlts = dict()
|
||||
for c in configs:
|
||||
s = str(c.state.stateNumber) + "/" + str(c.context)
|
||||
alts = configToAlts.get(s, None)
|
||||
h = hash((c.state.stateNumber, c.context))
|
||||
alts = configToAlts.get(h, None)
|
||||
if alts is None:
|
||||
alts = set()
|
||||
configToAlts[s] = alts
|
||||
configToAlts[h] = alts
|
||||
alts.add(c.alt)
|
||||
return configToAlts.values()
|
||||
|
||||
|
|
Loading…
Reference in New Issue