示例#1
0
 def distance_to_dead_ends(self):
     result = list()
     for i in self.gen_covers_count:
         if i % 100 == 0: print i
         f = self.product_field(i)
         s = LG_Solver(f)
         s.run()
         result.append(s.alternative_path_lens())
     return result
示例#2
0
 def distance_to_dead_ends(self):
     result = list()
     for i in self.gen_covers_count:
         if i % 100 == 0: print i
         f = self.product_field(i)
         s = LG_Solver(f)
         s.run()
         result.append(s.alternative_path_lens())
     return result
示例#3
0
def solver_profiling():
    path_to_covers = '/home/anosov/data/hard_base/covers/case_0.dump'
    h = DataHandler(path_to_covers)

    from LG.solver import Solver as LG_Solver

    i_ = 0
    f = h.product_field(i_)
    for i in xrange(1):
        s = LG_Solver(f)
        a = s.run()
        b = s.alternative_path_lens()
        print a
        print [h.cells[i] for i in h.finished_packed_paths[i_]]
示例#4
0
def solver_profiling():
    path_to_covers = '/home/anosov/data/hard_base/covers/case_0.dump'
    h = DataHandler(path_to_covers)

    from LG.solver import Solver as LG_Solver

    i_ = 0
    f = h.product_field(i_)
    for i in xrange(1):
        s = LG_Solver(f)
        a = s.run()
        b = s.alternative_path_lens()
        print a
        print[h.cells[i] for i in h.finished_packed_paths[i_]]
        print b