-
# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1317929416 -7200
# Node ID 1e3777187fbeae4706359f89b1820dac61d1a700
# Parent 1b021b4d026aeced55260960803f6ec78f3eaeb9
Add #long time at various places
diff --git a/sage/calculus/riemann.pyx b/sage/calculus/riemann.pyx
a
|
b
|
|
801 | 801 | |
802 | 802 | High resolution plot:: |
803 | 803 | |
804 | | sage: m.plot_colored(plot_points=1000) # long time |
| 804 | sage: m.plot_colored(plot_points=1000) # long time (30s on sage.math, 2011) |
805 | 805 | |
806 | 806 | To generate the unit circle map, it's helpful to see what the |
807 | 807 | colors correspond to:: |
-
diff --git a/sage/categories/classical_crystals.py b/sage/categories/classical_crystals.py
a
|
b
|
|
338 | 338 | |
339 | 339 | :: |
340 | 340 | |
341 | | sage: TestSuite(fb4(1,0,1,0)).run(verbose = True) |
| 341 | sage: TestSuite(fb4(1,0,1,0)).run(verbose = True) # long time (8s on sage.math, 2011) |
342 | 342 | running ._test_an_element() . . . pass |
343 | 343 | running ._test_category() . . . pass |
344 | 344 | running ._test_elements() . . . |
-
diff --git a/sage/categories/coxeter_groups.py b/sage/categories/coxeter_groups.py
a
|
b
|
|
1152 | 1152 | sage: W = WeylGroup(["A",3]) |
1153 | 1153 | sage: P4 = Permutations(4) |
1154 | 1154 | sage: def P4toW(w): return W.from_reduced_word(w.reduced_word()) |
1155 | | sage: for u in P4: |
| 1155 | sage: for u in P4: # long time (5s on sage.math, 2011) |
1156 | 1156 | ... for v in P4: |
1157 | 1157 | ... assert u.permutohedron_lequal(v) == P4toW(u).weak_le(P4toW(v)) |
1158 | 1158 | ... assert u.permutohedron_lequal(v, side='left') == P4toW(u).weak_le(P4toW(v), side='left') |
-
diff --git a/sage/categories/weyl_groups.py b/sage/categories/weyl_groups.py
a
|
b
|
|
304 | 304 | |
305 | 305 | sage: W = WeylGroup(['B',4]) |
306 | 306 | sage: w = W.from_reduced_word([3,2,3,1]) |
307 | | sage: w.stanley_symmetric_function() |
| 307 | sage: w.stanley_symmetric_function() # long time (6s on sage.math, 2011) |
308 | 308 | 48*m[1, 1, 1, 1] + 24*m[2, 1, 1] + 12*m[2, 2] + 8*m[3, 1] + 2*m[4] |
309 | 309 | |
310 | 310 | * :meth:stanley_symmetric_function_as_polynomial` |
-
diff --git a/sage/coding/binary_code.pyx b/sage/coding/binary_code.pyx
a
|
b
|
|
169 | 169 | permuting by the permutation and its inverse in either order, and |
170 | 170 | permuting by the identity both return the original word. |
171 | 171 | |
172 | | NOTE: |
| 172 | .. NOTE:: |
| 173 | |
173 | 174 | The functions permute_word_by_wp and dealloc_word_perm are implicitly |
174 | 175 | involved in each of the above tests. |
175 | 176 | |
176 | | TESTS: |
| 177 | TESTS:: |
| 178 | |
177 | 179 | sage: from sage.coding.binary_code import test_word_perms |
178 | | sage: test_word_perms() |
| 180 | sage: test_word_perms() # long time (5s on sage.math, 2011) |
179 | 181 | |
180 | 182 | """ |
181 | 183 | cdef WordPermutation *g, *h, *i |
-
diff --git a/sage/coding/linear_code.py b/sage/coding/linear_code.py
a
|
b
|
|
1857 | 1857 | sage: M11 = MathieuGroup(11) |
1858 | 1858 | sage: M11.order() |
1859 | 1859 | 7920 |
1860 | | sage: G = C.permutation_automorphism_group() # this should take < 5 seconds |
1861 | | sage: G.is_isomorphic(M11) # this should take < 5 seconds |
| 1860 | sage: G = C.permutation_automorphism_group() # long time (6s on sage.math, 2011) |
| 1861 | sage: G.is_isomorphic(M11) # long time |
1862 | 1862 | True |
1863 | 1863 | |
1864 | 1864 | Other examples:: |
-
diff --git a/sage/combinat/crystals/tensor_product.py b/sage/combinat/crystals/tensor_product.py
a
|
b
|
|
654 | 654 | sage: K = KirillovReshetikhinCrystal(['C',2,1],1,2) |
655 | 655 | sage: T = TensorProductOfCrystals(K,K) |
656 | 656 | sage: hw = [b for b in T if all(b.epsilon(i)==0 for i in [1,2])] |
657 | | sage: for b in hw: |
| 657 | sage: for b in hw: # long time (5s on sage.math, 2011) |
658 | 658 | ... print b, b.energy_function() |
659 | 659 | ... |
660 | 660 | [[], []] 4 |
-
diff --git a/sage/combinat/partition.py b/sage/combinat/partition.py
a
|
b
|
|
380 | 380 | sage: Partition(core=[2,1], quotient=[[2,1],[3],[1,1,1]]) |
381 | 381 | [11, 5, 5, 3, 2, 2, 2] |
382 | 382 | |
383 | | TESTS: We check that #11412 is actually fixed:: |
| 383 | TESTS: |
| 384 | |
| 385 | We check that #11412 is actually fixed:: |
384 | 386 | |
385 | 387 | sage: test = lambda x, k: x == Partition(core=x.core(k), |
386 | 388 | ... quotient=x.quotient(k)) |
… |
… |
|
391 | 393 | ... Partition(core=core, quotient=mus).core(len(mus)) == core |
392 | 394 | ... and |
393 | 395 | ... Partition(core=core, quotient=mus).quotient(len(mus)) == mus) |
394 | | sage: all(test2(core,tuple(mus)) |
| 396 | sage: all(test2(core,tuple(mus)) # long time (5s on sage.math, 2011) |
395 | 397 | ... for k in range(1,10) |
396 | 398 | ... for n_core in range(10-k) |
397 | 399 | ... for core in Partitions(n_core) |
-
diff --git a/sage/combinat/root_system/pieri_factors.py b/sage/combinat/root_system/pieri_factors.py
a
|
b
|
|
805 | 805 | sage: PF = WeylGroup(['C',3,1]).pieri_factors() |
806 | 806 | sage: PF.__class__ |
807 | 807 | <class 'sage.combinat.root_system.pieri_factors.PieriFactors_type_C_affine_with_category'> |
808 | | sage: TestSuite(PF).run() |
| 808 | sage: TestSuite(PF).run() # long time (4s on sage.math, 2011) |
809 | 809 | """ |
810 | 810 | Parent.__init__(self, category = FiniteEnumeratedSets()) |
811 | 811 | self.W = W |
-
diff --git a/sage/crypto/mq/sr.py b/sage/crypto/mq/sr.py
a
|
b
|
|
3353 | 3353 | has a more reasonable memory usage. :: |
3354 | 3354 | |
3355 | 3355 | sage: from sage.crypto.mq.sr import test_consistency |
3356 | | sage: test_consistency(1) # long time (80s on sage.math, 2011) |
| 3356 | sage: test_consistency(1) # long time (73s on sage.math, 2011) |
3357 | 3357 | True |
3358 | 3358 | """ |
3359 | 3359 | consistent = True |
-
diff --git a/sage/finance/time_series.pyx b/sage/finance/time_series.pyx
a
|
b
|
|
1059 | 1059 | sage: v.plot() |
1060 | 1060 | sage: v.plot(points=True) |
1061 | 1061 | sage: v.plot() + v.plot(points=True, rgbcolor='red') |
1062 | | sage: v.plot() + v.plot(points=True, rgbcolor='red',pointsize=50) |
| 1062 | sage: v.plot() + v.plot(points=True, rgbcolor='red', pointsize=50) |
1063 | 1063 | """ |
1064 | 1064 | from sage.plot.all import line, point |
1065 | 1065 | cdef Py_ssize_t s |
-
diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
a
|
b
|
|
13411 | 13411 | |
13412 | 13412 | sage: C = graphs.CubeGraph(8) |
13413 | 13413 | sage: P = C.plot(vertex_labels=False, vertex_size=0, graph_border=True) |
13414 | | sage: P.show() |
| 13414 | sage: P.show() # long time (3s on sage.math, 2011) |
13415 | 13415 | """ |
13416 | 13416 | kwds.setdefault('figsize', [4,4]) |
13417 | 13417 | from graph_plot import graphplot_options |
-
diff --git a/sage/groups/matrix_gps/matrix_group.py b/sage/groups/matrix_gps/matrix_group.py
a
|
b
|
|
1096 | 1096 | sage: F = GF(5); MS = MatrixSpace(F,2,2) |
1097 | 1097 | sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[-1,1]])] |
1098 | 1098 | sage: G = MatrixGroup(gens) |
1099 | | sage: G.invariant_generators() # long time (68s on sage.math, 2011) |
| 1099 | sage: G.invariant_generators() # long time (64s on sage.math, 2011) |
1100 | 1100 | [x1^20 + x1^16*x2^4 + x1^12*x2^8 + x1^8*x2^12 + x1^4*x2^16 + x2^20, x1^20*x2^4 + x1^16*x2^8 + x1^12*x2^12 + x1^8*x2^16 + x1^4*x2^20] |
1101 | 1101 | sage: F=CyclotomicField(8) |
1102 | 1102 | sage: z=F.gen() |
-
diff --git a/sage/gsl/fft.pyx b/sage/gsl/fft.pyx
a
|
b
|
|
33 | 33 | |
34 | 34 | def FastFourierTransform(size, base_ring=None): |
35 | 35 | """ |
36 | | EXAMPLES: |
| 36 | EXAMPLES:: |
| 37 | |
37 | 38 | sage: a = FastFourierTransform(128) |
38 | 39 | sage: for i in range(1, 11): |
39 | 40 | ... a[i] = 1 |
… |
… |
|
178 | 179 | gsl_fft_complex_radix2_inverse is automatically called. |
179 | 180 | Otherwise, gsl_fft_complex_inverse is called. |
180 | 181 | |
181 | | EXAMPLES: |
| 182 | EXAMPLES:: |
| 183 | |
182 | 184 | sage: a = FastFourierTransform(125) |
183 | 185 | sage: b = FastFourierTransform(125) |
184 | 186 | sage: for i in range(1, 60): a[i]=1 |
… |
… |
|
206 | 208 | using the Cooley-Tukey algorithm. This is the same as "inverse" |
207 | 209 | but lacks normalization so that backwards*forwards(f) = n*f. |
208 | 210 | |
209 | | EXAMPLES: |
| 211 | EXAMPLES:: |
| 212 | |
210 | 213 | sage: a = FastFourierTransform(125) |
211 | 214 | sage: b = FastFourierTransform(125) |
212 | 215 | sage: for i in range(1, 60): a[i]=1 |
213 | 216 | sage: for i in range(1, 60): b[i]=1 |
214 | 217 | sage: a.forward_transform() |
215 | 218 | sage: a.backward_transform() |
216 | | sage: (a.plot() + b.plot()).show(ymin=0) |
| 219 | sage: (a.plot() + b.plot()).show(ymin=0) # long time (2s on sage.math, 2011) |
217 | 220 | """ |
218 | 221 | cdef gsl_fft_complex_wavetable * wt |
219 | 222 | cdef gsl_fft_complex_workspace * mem |
-
diff --git a/sage/homology/examples.py b/sage/homology/examples.py
a
|
b
|
|
495 | 495 | [1, 11, 51, 80, 40] |
496 | 496 | sage: P3.homology() |
497 | 497 | {0: 0, 1: C2, 2: 0, 3: Z} |
498 | | sage: P4 = simplicial_complexes.RealProjectiveSpace(4) # long time: 2 seconds |
| 498 | sage: P4 = simplicial_complexes.RealProjectiveSpace(4) # long time (2s on sage.math, 2011) |
499 | 499 | sage: P4.f_vector() # long time |
500 | 500 | [1, 16, 120, 330, 375, 150] |
501 | 501 | sage: P4.homology() # long time |
502 | 502 | {0: 0, 1: C2, 2: 0, 3: C2, 4: 0} |
503 | | sage: P5 = simplicial_complexes.RealProjectiveSpace(5) # long time: 45 seconds |
| 503 | sage: P5 = simplicial_complexes.RealProjectiveSpace(5) # long time (40s on sage.math, 2011) |
504 | 504 | sage: P5.f_vector() # long time |
505 | 505 | [1, 63, 903, 4200, 8400, 7560, 2520] |
506 | 506 | |
-
diff --git a/sage/libs/ntl/ntl_mat_ZZ.pyx b/sage/libs/ntl/ntl_mat_ZZ.pyx
a
|
b
|
|
386 | 386 | sage: t = cputime(); d = A.determinant() |
387 | 387 | sage: cputime(t) # random |
388 | 388 | 0.33201999999999998 |
389 | | sage: t = cputime(); B = A.HNF(d) |
| 389 | sage: t = cputime(); B = A.HNF(d) # long time (5s on sage.math, 2011) |
390 | 390 | sage: cputime(t) # random |
391 | 391 | 6.4924050000000006 |
392 | 392 | |
-
diff --git a/sage/matrix/matrix_cyclo_dense.pyx b/sage/matrix/matrix_cyclo_dense.pyx
a
|
b
|
|
1471 | 1471 | |
1472 | 1472 | The result is cached for each algorithm separately. |
1473 | 1473 | |
1474 | | EXAMPLES: |
| 1474 | EXAMPLES:: |
| 1475 | |
1475 | 1476 | sage: W.<z> = CyclotomicField(3) |
1476 | 1477 | sage: A = matrix(W, 2, 3, [1+z, 2/3, 9*z+7, -3 + 4*z, z, -7*z]); A |
1477 | 1478 | [ z + 1 2/3 9*z + 7] |
… |
… |
|
1483 | 1484 | [ 1 0 -192/97*z - 361/97] |
1484 | 1485 | [ 0 1 1851/97*z + 1272/97] |
1485 | 1486 | |
1486 | | We verify that the result is cached and that the caches are separate: |
| 1487 | We verify that the result is cached and that the caches are separate:: |
| 1488 | |
1487 | 1489 | sage: A.echelon_form() is A.echelon_form() |
1488 | 1490 | True |
1489 | 1491 | sage: A.echelon_form() is A.echelon_form(algorithm='classical') |
1490 | 1492 | False |
1491 | 1493 | |
1492 | | TESTS: |
| 1494 | TESTS:: |
| 1495 | |
1493 | 1496 | sage: W.<z> = CyclotomicField(13) |
1494 | 1497 | sage: A = Matrix(W, 2,3, [10^30*(1-z)^13, 1, 2, 3, 4, z]) |
1495 | 1498 | sage: B = Matrix(W, 2,3, [(1-z)^13, 1, 2, 3, 4, z]) |
1496 | | sage: A.echelon_form() == A.echelon_form('classical') |
| 1499 | sage: A.echelon_form() == A.echelon_form('classical') # long time (4s on sage.math, 2011) |
1497 | 1500 | True |
1498 | 1501 | sage: B.echelon_form() == B.echelon_form('classical') |
1499 | 1502 | True |
1500 | 1503 | |
1501 | | A degenerate case with the degree 1 cyclotomic field: |
| 1504 | A degenerate case with the degree 1 cyclotomic field:: |
| 1505 | |
1502 | 1506 | sage: A = matrix(CyclotomicField(1),2,3,[1,2,3,4,5,6]); |
1503 | 1507 | sage: A.echelon_form() |
1504 | 1508 | [ 1 0 -1] |
1505 | 1509 | [ 0 1 2] |
1506 | 1510 | |
1507 | | A case that checks the bug in trac #3500. |
| 1511 | A case that checks the bug in trac #3500. :: |
| 1512 | |
1508 | 1513 | sage: cf4 = CyclotomicField(4) ; z4 = cf4.0 |
1509 | 1514 | sage: A = Matrix(cf4, 1, 2, [-z4, 1]) |
1510 | 1515 | sage: A.echelon_form() |
-
diff --git a/sage/modular/abvar/homspace.py b/sage/modular/abvar/homspace.py
a
|
b
|
|
134 | 134 | Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33)) |
135 | 135 | sage: B.endomorphism_ring().gens() |
136 | 136 | (Abelian variety endomorphism of Abelian subvariety of dimension 1 of J0(33),) |
137 | | sage: E = J.endomorphism_ring() ; E.gens() |
| 137 | sage: E = J.endomorphism_ring() ; E.gens() # long time (3s on sage.math, 2011) |
138 | 138 | (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, |
139 | 139 | Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, |
140 | 140 | Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, |
… |
… |
|
148 | 148 | |
149 | 149 | :: |
150 | 150 | |
151 | | sage: T = E.image_of_hecke_algebra() |
152 | | sage: T.gens() |
| 151 | sage: T = E.image_of_hecke_algebra() # long time |
| 152 | sage: T.gens() # long time |
153 | 153 | (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, |
154 | 154 | Abelian variety endomorphism of Abelian variety J0(33) of dimension 3, |
155 | 155 | Abelian variety endomorphism of Abelian variety J0(33) of dimension 3) |
156 | | sage: T.index_in(E) |
| 156 | sage: T.index_in(E) # long time |
157 | 157 | +Infinity |
158 | | sage: T.index_in_saturation() |
| 158 | sage: T.index_in_saturation() # long time |
159 | 159 | 1 |
160 | 160 | |
161 | 161 | AUTHORS: |
… |
… |
|
832 | 832 | |
833 | 833 | sage: J0(33).endomorphism_ring().discriminant() |
834 | 834 | -64800 |
835 | | sage: J0(46).endomorphism_ring().discriminant() |
| 835 | sage: J0(46).endomorphism_ring().discriminant() # long time (6s on sage.math, 2011) |
836 | 836 | 24200000000 |
837 | 837 | sage: J0(11).endomorphism_ring().discriminant() |
838 | 838 | 2 |
-
diff --git a/sage/modular/hecke/element.py b/sage/modular/hecke/element.py
a
|
b
|
|
266 | 266 | True |
267 | 267 | sage: CuspForms(22, 2).0.is_old() |
268 | 268 | True |
269 | | sage: EisensteinForms(144, 2).1.is_old() |
| 269 | sage: EisensteinForms(144, 2).1.is_old() # long time (3s on sage.math, 2011) |
270 | 270 | False |
271 | 271 | sage: EisensteinForms(144, 2).1.is_old(2) # not implemented |
272 | 272 | False |
-
diff --git a/sage/modular/modform/constructor.py b/sage/modular/modform/constructor.py
a
|
b
|
|
222 | 222 | sage: G = GammaH(30, [11]) |
223 | 223 | sage: M = ModularForms(G, 2); M |
224 | 224 | Modular Forms space of dimension 20 for Congruence Subgroup Gamma_H(30) with H generated by [11] of weight 2 over Rational Field |
225 | | sage: M.T(7).charpoly().factor() |
| 225 | sage: M.T(7).charpoly().factor() # long time (7s on sage.math, 2011) |
226 | 226 | (x + 4) * x^2 * (x - 6)^4 * (x + 6)^4 * (x - 8)^7 * (x^2 + 4) |
227 | 227 | |
228 | 228 | More examples of spaces with character:: |
-
diff --git a/sage/modular/modform/space.py b/sage/modular/modform/space.py
a
|
b
|
|
1311 | 1311 | |
1312 | 1312 | We check that #10450 is fixed:: |
1313 | 1313 | |
1314 | | sage: M = CuspForms(Gamma1(22), 2).new_submodule() |
1315 | | sage: M.hecke_matrix(3) |
| 1314 | sage: M = CuspForms(Gamma1(22), 2).new_submodule() # long time (3s on sage.math, 2011) |
| 1315 | sage: M.hecke_matrix(3) # long time |
1316 | 1316 | [ 0 -2 3 0] |
1317 | 1317 | [ 0 -3 5 -1] |
1318 | 1318 | [ 1 -1 0 -1] |
1319 | 1319 | [ 0 -2 3 -1] |
1320 | | sage: M.hecke_matrix(9) |
| 1320 | sage: M.hecke_matrix(9) # long time |
1321 | 1321 | [ 3 3 -4 -4] |
1322 | 1322 | [ 2 6 -9 -4] |
1323 | 1323 | [ 0 3 -2 -1] |
-
diff --git a/sage/plot/plot3d/list_plot3d.py b/sage/plot/plot3d/list_plot3d.py
a
|
b
|
|
124 | 124 | ... l.append((float(i*pi/5),float(j*pi/5),m[i,j])) |
125 | 125 | sage: list_plot3d(l,texture='yellow') |
126 | 126 | |
127 | | Note that the points do not have to be regularly sampled. For example: |
128 | | |
129 | | :: |
| 127 | Note that the points do not have to be regularly sampled. For example:: |
130 | 128 | |
131 | 129 | sage: l=[] |
132 | 130 | sage: for i in range(-5,5): |
… |
… |
|
135 | 133 | sage: list_plot3d(l,interpolation_type='nn',texture='yellow',num_points=100) |
136 | 134 | |
137 | 135 | TESTS: |
| 136 | |
138 | 137 | We plot 0, 1, and 2 points:: |
139 | 138 | |
140 | 139 | sage: list_plot3d([]) |
-
diff --git a/sage/plot/plot3d/plot3d.py b/sage/plot/plot3d/plot3d.py
a
|
b
|
|
901 | 901 | sage: Y = spherical_harmonic(2, 1, theta, phi) |
902 | 902 | sage: rea = spherical_plot3d(abs(real(Y)), (phi,0,2*pi), (theta,0,pi), color='blue', opacity=0.6) |
903 | 903 | sage: ima = spherical_plot3d(abs(imag(Y)), (phi,0,2*pi), (theta,0,pi), color='red', opacity=0.6) |
904 | | sage: (rea + ima).show(aspect_ratio=1) |
| 904 | sage: (rea + ima).show(aspect_ratio=1) # long time (4s on sage.math, 2011) |
905 | 905 | |
906 | 906 | A drop of water:: |
907 | 907 | |
-
diff --git a/sage/schemes/elliptic_curves/BSD.py b/sage/schemes/elliptic_curves/BSD.py
a
|
b
|
|
425 | 425 | :: |
426 | 426 | |
427 | 427 | sage: E = EllipticCurve('960d1') |
428 | | sage: E.prove_BSD(verbosity=1) |
| 428 | sage: E.prove_BSD(verbosity=1) # long time (4s on sage.math, 2011) |
429 | 429 | p = 2: True by 2-descent |
430 | 430 | True for p not in {2} by Kolyvagin. |
431 | 431 | [] |
-
diff --git a/sage/schemes/elliptic_curves/ell_finite_field.py b/sage/schemes/elliptic_curves/ell_finite_field.py
a
|
b
|
|
1358 | 1358 | sage: E = EllipticCurve('389a') |
1359 | 1359 | sage: for p in [5927, 2297, 1571, 1709, 3851, 127, 3253, 5783, 3499, 4817]: |
1360 | 1360 | ... G = E.change_ring(GF(p)).abelian_group() |
1361 | | sage: for p in prime_range(10000): #long time (~20s) |
| 1361 | sage: for p in prime_range(10000): # long time (19s on sage.math, 2011) |
1362 | 1362 | ... if p != 389: |
1363 | | ... G=E.change_ring(GF(p)).abelian_group() |
| 1363 | ... G = E.change_ring(GF(p)).abelian_group() |
1364 | 1364 | |
1365 | 1365 | This tests that the bug reported in trac #3926 has been fixed:: |
1366 | 1366 | |
-
diff --git a/sage/schemes/generic/fano_toric_variety.py b/sage/schemes/generic/fano_toric_variety.py
a
|
b
|
|
1094 | 1094 | We construct several complete intersections associated to the same |
1095 | 1095 | nef-partition of the 3-dimensional reflexive polytope #2254:: |
1096 | 1096 | |
1097 | | sage: p = ReflexivePolytope(3, 2254) |
1098 | | sage: np = p.nef_partitions()[1] |
1099 | | sage: np |
| 1097 | sage: p = ReflexivePolytope(3, 2254) # long time (7s on sage.math, 2011) |
| 1098 | sage: np = p.nef_partitions()[1] # long time |
| 1099 | sage: np # long time |
1100 | 1100 | Nef-partition {2, 3, 4, 7, 8} U {0, 1, 5, 6} |
1101 | | sage: X = CPRFanoToricVariety(Delta_polar=p) |
1102 | | sage: X.nef_complete_intersection(np) |
| 1101 | sage: X = CPRFanoToricVariety(Delta_polar=p) # long time |
| 1102 | sage: X.nef_complete_intersection(np) # long time |
1103 | 1103 | Closed subscheme of 3-d CPR-Fano toric variety |
1104 | 1104 | covered by 10 affine patches defined by: |
1105 | 1105 | a2*z1*z4^2*z5^2*z7^3 + a1*z2*z4*z5*z6*z7^2*z8^2 |
… |
… |
|
1110 | 1110 | |
1111 | 1111 | Now we include only monomials associated to vertices of `\Delta_i`:: |
1112 | 1112 | |
1113 | | sage: X.nef_complete_intersection(np, monomial_points="vertices") |
| 1113 | sage: X.nef_complete_intersection(np, monomial_points="vertices") # long time |
1114 | 1114 | Closed subscheme of 3-d CPR-Fano toric variety |
1115 | 1115 | covered by 10 affine patches defined by: |
1116 | 1116 | a2*z1*z4^2*z5^2*z7^3 + a1*z2*z4*z5*z6*z7^2*z8^2 |
… |
… |
|
1121 | 1121 | (effectively, we set ``b5=0``). Next we provide coefficients explicitly |
1122 | 1122 | instead of using default generic names:: |
1123 | 1123 | |
1124 | | sage: X.nef_complete_intersection(np, monomial_points="vertices", |
1125 | | ... coefficients=[range(1,5), range(1, 6)]) |
| 1124 | sage: X.nef_complete_intersection(np, # long time |
| 1125 | ... monomial_points="vertices", |
| 1126 | ... coefficients=[range(1,5), range(1,6)]) |
1126 | 1127 | Closed subscheme of 3-d CPR-Fano toric variety |
1127 | 1128 | covered by 10 affine patches defined by: |
1128 | 1129 | 3*z1*z4^2*z5^2*z7^3 + 2*z2*z4*z5*z6*z7^2*z8^2 |
… |
… |
|
1133 | 1134 | Finally, we take a look at the generic representative of these complete |
1134 | 1135 | intersections in a completely resolved ambient toric variety:: |
1135 | 1136 | |
1136 | | sage: X = CPRFanoToricVariety(Delta_polar=p, |
1137 | | ... coordinate_points="all") |
1138 | | sage: X.nef_complete_intersection(np) |
| 1137 | sage: X = CPRFanoToricVariety(Delta_polar=p, # long time |
| 1138 | ... coordinate_points="all") |
| 1139 | sage: X.nef_complete_intersection(np) # long time |
1139 | 1140 | Closed subscheme of 3-d CPR-Fano toric variety |
1140 | 1141 | covered by 22 affine patches defined by: |
1141 | 1142 | a1*z2*z4*z5*z6*z7^2*z8^2*z9^2*z10^2*z11*z12*z13 |
-
diff --git a/sage/schemes/generic/toric_chow_group.py b/sage/schemes/generic/toric_chow_group.py
a
|
b
|
|
69 | 69 | sage: A.degree(2).ngens() |
70 | 70 | 7 |
71 | 71 | sage: a = sum( A.gen(i) * (i+1) for i in range(0,A.ngens()) ) # an element of A |
72 | | sage: a |
| 72 | sage: a # long time (2s on sage.math, 2011) |
73 | 73 | ( 3 | 1 mod 7 | 0 mod 2, 1 mod 2, 4, 5, 6, 7, 8 | 9 ) |
74 | 74 | |
75 | 75 | The Chow group elements are printed as ``( a0 | a1 mod 7 | a2 mod 2, |
-
diff --git a/sage/tests/french_book/numbertheory.py b/sage/tests/french_book/numbertheory.py
a
|
b
|
|
114 | 114 | ... s=0 |
115 | 115 | ... for p in prime_range(n): s+=1 |
116 | 116 | ... return s |
117 | | sage: timeit('count_primes1(10^5)') # random long time |
| 117 | sage: timeit('count_primes1(10^5)') # random, not tested |
118 | 118 | 5 loops, best of 3: 674 ms per loop |
119 | | sage: timeit('count_primes2(10^5)') # random long time |
| 119 | sage: timeit('count_primes2(10^5)') # random, not tested |
120 | 120 | 5 loops, best of 3: 256 ms per loop |
121 | 121 | sage: timeit('count_primes3(10^5)') # random |
122 | 122 | 5 loops, best of 3: 49.2 ms per loop |