Mercurial > code > home > repos > light9
changeset 1531:5a0a775ca9d3
tiny bit more WIP on solve.py
Ignore-this: 6ea6f78a95a19877a26b9091946506b8
author | drewp@bigasterisk.com |
---|---|
date | Wed, 10 May 2017 04:06:02 +0000 |
parents | a5a44077c54c |
children | c83c423b3de0 |
files | light9/paint/solve.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/paint/solve.py Wed May 10 04:03:54 2017 +0000 +++ b/light9/paint/solve.py Wed May 10 04:06:02 2017 +0000 @@ -55,8 +55,16 @@ class Settings(object): + def __init__(self, graph, settingsList): + self._compiled = {} # dev: { attr: val } + for row in settingsList: + self._compiled.setdefault(row[0], {})[row[1]] = row[2] + def toVector(self): - def fromVector(self): + """ + + def fromVector(cls, graph, vector): + """update our settings from a vector with the same ordering as toVector would make""" def distanceTo(self, other):