Ejemplo n.º 1
0
 def __init__(self, url, name):
   Problem.__init__(self)
   self.name = name
   self.url = url
   self.ft = FeatureTree.load_ft_url(url)
   self.mutate_engine = MutateEngine(self.ft)
   self.decisions = [Decision(leaf.id, 0, 1) for leaf in self.ft.leaves]
Ejemplo n.º 2
0
class FeatureModel(Problem):
  def __init__(self, url, name):
    Problem.__init__(self)
    self.name = name
    self.url = url
    self.ft = FeatureTree.load_ft_url(url)
    self.mutate_engine = MutateEngine(self.ft)
    self.decisions = [Decision(leaf.id, 0, 1) for leaf in self.ft.leaves]

  def generate(self, generator=uniform):
    return self.mutate_engine.genValidOne()