コード例 #1
0
        def f(i):
            time()
            types.cint(i).print_reg('fran')

            @for_range(self.M)
            def f(j):
                self.f_ranks[i][(j - i + self.N) % self.N] = j
コード例 #2
0
        def f(i):
            time()
            types.cint(i).print_reg('mpre')

            @for_range(self.M)
            def f(j):
                self.m_prefs[i][j] = (i + j) % self.N
コード例 #3
0
 def f(i):
     time()
     types.cint(i).print_reg('fran')
     @for_range(inner_loops)
     def f(j):
         if self.reverse:
             self.f_ranks[i] = tuple((-i - j + 2 * self.N - 2) % self.N \
                                         for j in range(self.M))
         else:
             self.f_ranks[i][(-i - j + 2 * self.N - 2) % self.N] = j
コード例 #4
0
 def f(i):
     time()
     types.cint(i).print_reg('mpre')
     @for_range(inner_loops)
     def f(j):
         self.m_prefs[i][j] = (-i + j + self.N - 1) % (self.N - 1)
     if self.M < self.N:
         self.m_prefs[i][self.M-1] = (2 * self.N - 2 - i) % self.N
     else:
         self.m_prefs[i][self.N-1] = self.N - 1
コード例 #5
0
 def f(i):
     types.cint(i).print_reg('wife')
     self.husbands[i].reveal().print_reg('husb')