• Home
  • Raw
  • Download

Lines Matching refs:specs

45 def _GenerateRandomRasks(specs):  argument
57 for spec in specs:
76 def _GenerateAllFlagsTasks(specs): argument
91 for spec in specs:
107 def GenerateRandomGATasks(specs, num_tasks, num_trials): argument
124 new_flag = FlagSet([Flag(spec) for spec in specs if random.randint(0, 1)])
136 def _GenerateInitialFlags(specs, spec): argument
161 for other_spec in specs:
186 def _GenerateAllIterativeEliminationTasks(specs): argument
211 for spec in specs:
226 for spec in specs:
227 results.add(Task(flags.FlagSet(_GenerateInitialFlags(specs, spec))))
232 def _ComputeCost(cost_func, specs, flag_set): argument
251 for spec in specs:
277 def _TestAlgorithm(cost_func, specs, generations, best_result): argument
315 task_result = _ComputeCost(cost_func, specs, task.GetFlags())
358 specs = self._GenerateFlagSpecifications()
362 generation_tasks = _GenerateAllFlagsTasks(specs)
363 generations = [HillClimbingBestBranch(generation_tasks, set([]), specs)]
368 _TestAlgorithm('sum(values[0:len(values)])', specs, generations, 0)
375 cost = _ComputeCost(cost_function, specs, all_flags)
379 generations = [HillClimbingBestBranch(generation_tasks, set([]), specs)]
384 _TestAlgorithm(cost_function, specs, generations, cost)
396 specs = self._GenerateFlagSpecifications()
399 specs, MUTATION_RATE)
402 generation_tasks = GenerateRandomGATasks(specs, NUM_CHROMOSOMES, NUM_TRIALS)
406 _TestAlgorithm('sum(values[0:len(values)])', specs, generations, -1)
408 _TestAlgorithm(cost_func, specs, generations, -1)
420 specs = self._GenerateFlagSpecifications()
425 generations = _GenerateAllIterativeEliminationTasks(specs)
430 _TestAlgorithm('sum(values[0:len(values)])', specs, generations, 0)
435 all_flags_tasks = _GenerateAllFlagsTasks(specs)
439 cost = _ComputeCost(cost_function, specs, all_flags)
446 _TestAlgorithm(cost_function, specs, generations, cost)