mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-17 01:39:02 -04:00
Update to sagemath 6.2
This commit is contained in:
parent
52d9e04212
commit
fa9204b9a9
25 changed files with 9618 additions and 7756 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@
|
|||
/sage-5.12.tar
|
||||
/sage-5.13.tar
|
||||
/sage-6.1.1.tar.gz
|
||||
/sage-6.2.tar.gz
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 12:39:09.255844618 -0200
|
||||
+++ src/module_list.py 2014-02-07 12:39:20.005845030 -0200
|
||||
@@ -2114,7 +2114,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h"
|
||||
libraries = ["csage", "stdc++", "cplex"])
|
||||
--- src/module_list.py.orig 2014-05-10 16:02:43.371125667 -0300
|
||||
+++ src/module_list.py 2014-05-10 16:02:58.362124591 -0300
|
||||
@@ -2115,7 +2115,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h"
|
||||
libraries = ["stdc++", "cplex"])
|
||||
)
|
||||
|
||||
-if is_package_installed('cbc'):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 12:47:06.312862886 -0200
|
||||
+++ src/module_list.py 2014-02-07 12:49:07.920867543 -0200
|
||||
@@ -2124,7 +2124,7 @@ if is_package_installed('cbc'):
|
||||
--- src/module_list.py.orig 2014-05-10 15:59:50.979138032 -0300
|
||||
+++ src/module_list.py 2014-05-10 16:00:00.142137375 -0300
|
||||
@@ -2125,7 +2125,7 @@ if is_package_installed('cbc'):
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 11:27:41.862680439 -0200
|
||||
+++ src/module_list.py 2014-02-07 11:27:58.536681078 -0200
|
||||
@@ -2069,7 +2069,8 @@ ext_modules = [
|
||||
--- src/module_list.py.orig 2014-05-26 13:34:05.597783829 -0300
|
||||
+++ src/module_list.py 2014-05-26 13:34:15.908784224 -0300
|
||||
@@ -2070,7 +2070,8 @@ ext_modules = [
|
||||
# These extensions are to be compiled only if the
|
||||
# corresponding packages have been installed
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 12:46:14.237860892 -0200
|
||||
+++ src/module_list.py 2014-02-07 12:46:18.226861045 -0200
|
||||
@@ -2073,7 +2073,7 @@ ext_modules = [
|
||||
--- src/module_list.py.orig 2014-05-10 15:58:00.155145981 -0300
|
||||
+++ src/module_list.py 2014-05-10 15:58:09.742145293 -0300
|
||||
@@ -2074,7 +2074,7 @@ ext_modules = [
|
||||
def is_package_installed(name):
|
||||
return False
|
||||
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
|
||||
--- src/sage/groups/perm_gps/permgroup.py.orig 2014-02-07 12:37:33.523840952 -0200
|
||||
+++ src/sage/groups/perm_gps/permgroup.py 2014-02-07 12:37:42.905841312 -0200
|
||||
--- src/sage/groups/perm_gps/permgroup.py.orig 2014-05-10 15:53:23.284165840 -0300
|
||||
+++ src/sage/groups/perm_gps/permgroup.py 2014-05-10 15:54:59.829158915 -0300
|
||||
@@ -180,8 +180,7 @@ def hap_decorator(f):
|
||||
"""
|
||||
@wraps(f)
|
||||
def wrapped(self, n, p=0):
|
||||
- if not is_package_installed('gap_packages'):
|
||||
- raise RuntimeError, "You must install the optional gap_packages package."
|
||||
+ raise RuntimeError, "gap-hap package not available."
|
||||
- raise RuntimeError("You must install the optional gap_packages package.")
|
||||
+ raise RuntimeError("gap-hap package not available.")
|
||||
load_hap()
|
||||
from sage.rings.arith import is_prime
|
||||
if not (p == 0 or is_prime(p)):
|
||||
@@ -3934,8 +3933,7 @@ class PermutationGroup_generic(group.Gro
|
||||
@@ -3933,8 +3932,7 @@ class PermutationGroup_generic(group.Gro
|
||||
|
||||
- David Joyner and Graham Ellis
|
||||
"""
|
||||
- if not is_package_installed('gap_packages'):
|
||||
- raise RuntimeError, "You must install the optional gap_packages package."
|
||||
+ raise RuntimeError, "gap-hap package not available."
|
||||
- raise RuntimeError("You must install the optional gap_packages package.")
|
||||
+ raise RuntimeError("gap-hap package not available.")
|
||||
load_hap()
|
||||
from sage.rings.arith import is_prime
|
||||
if not (p == 0 or is_prime(p)):
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
diff -up src/c_lib/src/memory.c.orig src/c_lib/src/memory.c
|
||||
--- src/c_lib/src/memory.c.orig 2014-02-07 11:01:49.674621000 -0200
|
||||
+++ src/c_lib/src/memory.c 2014-02-07 11:02:02.046621474 -0200
|
||||
@@ -18,7 +18,7 @@ AUTHORS:
|
||||
****************************************************************************/
|
||||
|
||||
#include <Python.h>
|
||||
-#include <mpir.h>
|
||||
+#include <gmp.h>
|
||||
#include "interrupt.h"
|
||||
#include "memory.h"
|
||||
|
||||
diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp
|
||||
--- src/sage/modular/arithgroup/farey.cpp.orig 2014-02-07 16:44:24.474408115 -0200
|
||||
+++ src/sage/modular/arithgroup/farey.cpp 2014-02-07 16:44:33.100408446 -0200
|
||||
--- src/sage/modular/arithgroup/farey.cpp.orig 2014-05-26 13:28:28.975770939 -0300
|
||||
+++ src/sage/modular/arithgroup/farey.cpp 2014-05-26 13:28:45.777771582 -0300
|
||||
@@ -141,6 +141,7 @@ operator*(const SL2Z& M, const vector<mp
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 12:38:18.873842689 -0200
|
||||
+++ src/module_list.py 2014-02-07 12:38:27.546843021 -0200
|
||||
@@ -2149,7 +2149,7 @@ if UNAME[0] == "Darwin" and not UNAME[2]
|
||||
--- src/module_list.py.orig 2014-05-10 15:57:18.343148980 -0300
|
||||
+++ src/module_list.py 2014-05-10 15:57:28.082148282 -0300
|
||||
@@ -2150,7 +2150,7 @@ if UNAME[0] == "Darwin" and not UNAME[2]
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py
|
||||
--- src/sage/graphs/graph_generators.py.orig 2014-02-07 12:36:49.882839281 -0200
|
||||
+++ src/sage/graphs/graph_generators.py 2014-02-07 12:37:01.793839737 -0200
|
||||
@@ -823,7 +823,7 @@ class GraphGenerators():
|
||||
--- src/sage/graphs/graph_generators.py.orig 2014-05-10 15:51:24.250174378 -0300
|
||||
+++ src/sage/graphs/graph_generators.py 2014-05-10 15:51:36.224173519 -0300
|
||||
@@ -824,7 +824,7 @@ class GraphGenerators():
|
||||
"""
|
||||
import subprocess
|
||||
from sage.misc.package import is_package_installed
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
diff -up src/sage/libs/pari/decl.pxi.orig src/sage/libs/pari/decl.pxi
|
||||
--- src/sage/libs/pari/decl.pxi.orig 2014-02-07 12:47:51.412864613 -0200
|
||||
+++ src/sage/libs/pari/decl.pxi 2014-02-07 12:48:00.616864966 -0200
|
||||
@@ -869,7 +869,6 @@ cdef extern from 'pari/pari.h':
|
||||
GEN polredabs0(GEN x, long flag)
|
||||
GEN polredabs2(GEN x)
|
||||
GEN polredabsall(GEN x, long flun)
|
||||
- GEN polredbest(GEN x, long flag)
|
||||
GEN qflll0(GEN x, long flag)
|
||||
GEN qflllgram0(GEN x, long flag)
|
||||
GEN smallpolred(GEN x)
|
||||
diff -up src/sage/libs/pari/gen.pyx.orig src/sage/libs/pari/gen.pyx
|
||||
--- src/sage/libs/pari/gen.pyx.orig 2014-02-07 12:48:07.252865220 -0200
|
||||
+++ src/sage/libs/pari/gen.pyx 2014-02-07 12:48:21.513865766 -0200
|
||||
@@ -7885,10 +7885,6 @@ cdef class gen(sage.structure.element.Ri
|
||||
pari_catch_sig_on()
|
||||
return P.new_gen(polredabs0(self.g, flag))
|
||||
|
||||
- def polredbest(self, long flag=0):
|
||||
- pari_catch_sig_on()
|
||||
- return P.new_gen(polredbest(self.g, flag))
|
||||
-
|
||||
def polresultant(self, y, var=-1, long flag=0):
|
||||
cdef gen t0 = objtogen(y)
|
||||
pari_catch_sig_on()
|
|
@ -1,6 +1,5 @@
|
|||
diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
|
||||
--- src/c_lib/include/ntl_wrap.h.orig 2014-02-07 15:20:57.081216365 -0200
|
||||
+++ src/c_lib/include/ntl_wrap.h 2014-02-07 15:21:04.225216638 -0200
|
||||
--- src/c_lib/include/ntl_wrap.h.orig 2014-05-13 16:22:05.526912185 -0300
|
||||
+++ src/c_lib/include/ntl_wrap.h 2014-05-13 16:26:37.997931724 -0300
|
||||
@@ -40,91 +40,92 @@ EXTERN void setup_NTL_error_callback(voi
|
||||
//////// ZZ //////////
|
||||
|
||||
|
@ -303,7 +302,7 @@ diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
|
|||
#endif
|
||||
|
||||
#define NTL_zz_pX_DOUBLE_EQUALS( obj1, obj2 )\
|
||||
@@ -225,64 +227,63 @@ struct zz_pX;
|
||||
@@ -225,104 +227,107 @@ struct zz_pX;
|
||||
//////// ZZ_pEContext ///////////////
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
@ -336,32 +335,28 @@ diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
|
|||
#endif
|
||||
|
||||
//////// mat_ZZ //////////
|
||||
-
|
||||
|
||||
#ifndef __cplusplus
|
||||
-struct mat_ZZ;
|
||||
-typedef struct {} mat_ZZ;
|
||||
+typedef struct mat_ZZ mat_ZZ;
|
||||
#endif
|
||||
|
||||
-EXTERN void mat_ZZ_SetDims(struct mat_ZZ* mZZ, long nrows, long ncols);
|
||||
-EXTERN struct mat_ZZ* mat_ZZ_pow(const struct mat_ZZ* x, long e);
|
||||
-EXTERN long mat_ZZ_nrows(const struct mat_ZZ* x);
|
||||
-EXTERN long mat_ZZ_ncols(const struct mat_ZZ* x);
|
||||
-EXTERN void mat_ZZ_setitem(struct mat_ZZ* x, int i, int j, const struct ZZ* z);
|
||||
-EXTERN struct ZZ* mat_ZZ_getitem(const struct mat_ZZ* x, int i, int j);
|
||||
-EXTERN struct ZZ* mat_ZZ_determinant(const struct mat_ZZ* x, long deterministic);
|
||||
-EXTERN struct mat_ZZ* mat_ZZ_HNF(const struct mat_ZZ* A, const struct ZZ* D);
|
||||
-EXTERN struct ZZX* mat_ZZ_charpoly(const struct mat_ZZ* A);
|
||||
-EXTERN long mat_ZZ_LLL(struct ZZ **det, struct mat_ZZ *x, long a, long b, long verbose);
|
||||
-EXTERN long mat_ZZ_LLL_U(struct ZZ **det, struct mat_ZZ *x, struct mat_ZZ *U, long a, long b, long verbose);
|
||||
+EXTERN void mat_ZZ_SetDims(mat_ZZ* mZZ, long nrows, long ncols);
|
||||
+EXTERN mat_ZZ* mat_ZZ_pow(const mat_ZZ* x, long e);
|
||||
+EXTERN long mat_ZZ_nrows(const mat_ZZ* x);
|
||||
+EXTERN long mat_ZZ_ncols(const mat_ZZ* x);
|
||||
EXTERN void mat_ZZ_SetDims(mat_ZZ* mZZ, long nrows, long ncols);
|
||||
EXTERN mat_ZZ* mat_ZZ_pow(const mat_ZZ* x, long e);
|
||||
EXTERN long mat_ZZ_nrows(const mat_ZZ* x);
|
||||
EXTERN long mat_ZZ_ncols(const mat_ZZ* x);
|
||||
-EXTERN void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const struct ZZ* z);
|
||||
-EXTERN struct ZZ* mat_ZZ_getitem(const mat_ZZ* x, int i, int j);
|
||||
-EXTERN struct ZZ* mat_ZZ_determinant(const mat_ZZ* x, long deterministic);
|
||||
-EXTERN mat_ZZ* mat_ZZ_HNF(const mat_ZZ* A, const struct ZZ* D);
|
||||
-EXTERN struct ZZX* mat_ZZ_charpoly(const mat_ZZ* A);
|
||||
-EXTERN long mat_ZZ_LLL(struct ZZ **det, mat_ZZ *x, long a, long b, long verbose);
|
||||
-EXTERN long mat_ZZ_LLL_U(struct ZZ **det, mat_ZZ *x, mat_ZZ *U, long a, long b, long verbose);
|
||||
+EXTERN void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const ZZ* z);
|
||||
+EXTERN ZZ* mat_ZZ_getitem(const mat_ZZ* x, int i, int j);
|
||||
+EXTERN ZZ* mat_ZZ_determinant(const mat_ZZ* x, long deterministic);
|
||||
+EXTERN mat_ZZ* mat_ZZ_HNF(const mat_ZZ* A, const ZZ* D);
|
||||
+EXTERN ZZX* mat_ZZ_charpoly(const mat_ZZ* A);
|
||||
+EXTERN ZZX* mat_ZZ_charpoly(const mat_ZZ* A);
|
||||
+EXTERN long mat_ZZ_LLL(ZZ **det, mat_ZZ *x, long a, long b, long verbose);
|
||||
+EXTERN long mat_ZZ_LLL_U(ZZ **det, mat_ZZ *x, mat_ZZ *U, long a, long b, long verbose);
|
||||
|
||||
|
@ -397,8 +392,11 @@ diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
|
|||
+typedef struct ZZ_pE ZZ_pE;
|
||||
#endif
|
||||
|
||||
// EXTERN struct ZZ_pE* new_ZZ_pE
|
||||
@@ -292,37 +293,40 @@ struct ZZ_pE;
|
||||
-// EXTERN struct ZZ_pE* new_ZZ_pE
|
||||
+// EXTERN ZZ_pE* new_ZZ_pE
|
||||
|
||||
|
||||
|
||||
//////// ZZ_pEX //////////
|
||||
|
||||
//#ifndef __cplusplus
|
||||
|
@ -432,70 +430,791 @@ diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
|
|||
//////// mat_GF2E //////////
|
||||
|
||||
#ifndef __cplusplus
|
||||
-struct mat_GF2E;
|
||||
-typedef struct {} mat_GF2E;
|
||||
+typedef struct mat_GF2E mat_GF2E;
|
||||
#endif
|
||||
|
||||
-EXTERN void mat_GF2E_setitem(struct mat_GF2E* x, int i, int j, const struct GF2E* z);
|
||||
-EXTERN void mat_GF2E_setitem(mat_GF2E* x, int i, int j, const struct GF2E* z);
|
||||
+EXTERN void mat_GF2E_setitem(mat_GF2E* x, int i, int j, const GF2E* z);
|
||||
|
||||
//////// mat_GF2 //////////
|
||||
|
||||
#ifndef __cplusplus
|
||||
-struct mat_GF2;
|
||||
-typedef struct {} mat_GF2;
|
||||
+typedef struct GF2 GF2;
|
||||
+typedef struct mat_GF2 mat_GF2;
|
||||
#endif
|
||||
|
||||
-EXTERN void mat_GF2_setitem(struct mat_GF2* x, int i, int j, const struct GF2* z);
|
||||
-EXTERN void mat_GF2_setitem(mat_GF2* x, int i, int j, const struct GF2* z);
|
||||
+EXTERN void mat_GF2_setitem(mat_GF2* x, int i, int j, const GF2* z);
|
||||
diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
|
||||
--- src/c_lib/src/ntl_wrap.cpp.orig 2014-02-07 15:20:57.085216365 -0200
|
||||
+++ src/c_lib/src/ntl_wrap.cpp 2014-02-07 15:21:07.322216757 -0200
|
||||
@@ -845,67 +845,67 @@ struct ZZ_pX ZZ_pE_to_ZZ_pX(struct ZZ_pE
|
||||
--- src/c_lib/src/ntl_wrap.cpp.orig 2014-05-13 16:22:05.531912186 -0300
|
||||
+++ src/c_lib/src/ntl_wrap.cpp 2014-05-13 16:22:11.181912591 -0300
|
||||
@@ -29,7 +29,7 @@ int ZZ_to_int(const ZZ* x)
|
||||
|
||||
//////// mat_ZZ //////////
|
||||
|
||||
-void mat_ZZ_SetDims(struct mat_ZZ* mZZ, long nrows, long ncols){
|
||||
+void mat_ZZ_SetDims(mat_ZZ* mZZ, long nrows, long ncols){
|
||||
mZZ->SetDims(nrows, ncols);
|
||||
/* Returns a *new* ZZ object.
|
||||
AUTHOR: David Harvey (2008-06-08) */
|
||||
-struct ZZ* int_to_ZZ(int value)
|
||||
+ZZ* int_to_ZZ(int value)
|
||||
{
|
||||
ZZ* output = new ZZ();
|
||||
conv(*output, value);
|
||||
@@ -40,7 +40,7 @@ struct ZZ* int_to_ZZ(int value)
|
||||
Assumes output has been mpz_init'd.
|
||||
AUTHOR: David Harvey
|
||||
Joel B. Mohler moved the ZZX_getitem_as_mpz code out to this function (2007-03-13) */
|
||||
-void ZZ_to_mpz(mpz_t* output, const struct ZZ* x)
|
||||
+void ZZ_to_mpz(mpz_t* output, const ZZ* x)
|
||||
{
|
||||
unsigned char stack_bytes[4096];
|
||||
int use_heap;
|
||||
@@ -62,7 +62,7 @@ void ZZ_to_mpz(mpz_t* output, const stru
|
||||
/* Copies the mpz_t into the ZZ
|
||||
AUTHOR: Joel B. Mohler (2007-03-15) */
|
||||
// This should be changed to an mpz_t not an mpz_t*
|
||||
-void mpz_to_ZZ(struct ZZ* output, const mpz_t *x)
|
||||
+void mpz_to_ZZ(ZZ* output, const mpz_t *x)
|
||||
{
|
||||
unsigned char stack_bytes[4096];
|
||||
int use_heap;
|
||||
@@ -86,7 +86,7 @@ void ZZ_set_from_int(ZZ* x, int value)
|
||||
conv(*x, value);
|
||||
}
|
||||
|
||||
-struct mat_ZZ* mat_ZZ_pow(const struct mat_ZZ* x, long e)
|
||||
+mat_ZZ* mat_ZZ_pow(const mat_ZZ* x, long e)
|
||||
-long ZZ_remove(struct ZZ &dest, const struct ZZ &src, const struct ZZ &f)
|
||||
+long ZZ_remove(ZZ &dest, const ZZ &src, const ZZ &f)
|
||||
{
|
||||
mat_ZZ *z = new mat_ZZ();
|
||||
// Based on the code for mpz_remove
|
||||
ZZ fpow[40]; // inexaustible...until year 2020 or so
|
||||
@@ -172,12 +172,12 @@ void ZZ_p_set_from_int(ZZ_p* x, int valu
|
||||
conv(*x, value);
|
||||
}
|
||||
|
||||
-void ZZ_p_modulus(struct ZZ* mod, const struct ZZ_p* x)
|
||||
+void ZZ_p_modulus(ZZ* mod, const ZZ_p* x)
|
||||
{
|
||||
(*mod) = x->modulus();
|
||||
}
|
||||
|
||||
-struct ZZ_p* ZZ_p_pow(const struct ZZ_p* x, long e)
|
||||
+ZZ_p* ZZ_p_pow(const ZZ_p* x, long e)
|
||||
{
|
||||
ZZ_p *z = new ZZ_p();
|
||||
power(*z, *x, e);
|
||||
@@ -203,7 +203,7 @@ ZZ_p* ZZ_p_random(void)
|
||||
return z;
|
||||
}
|
||||
|
||||
-long mat_ZZ_nrows(const struct mat_ZZ* x)
|
||||
+long mat_ZZ_nrows(const mat_ZZ* x)
|
||||
-struct ZZ_p* ZZ_p_neg(struct ZZ_p* x)
|
||||
+ZZ_p* ZZ_p_neg(ZZ_p* x)
|
||||
{
|
||||
return x->NumRows();
|
||||
return new ZZ_p(-(*x));
|
||||
}
|
||||
@@ -214,7 +214,7 @@ struct ZZ_p* ZZ_p_neg(struct ZZ_p* x)
|
||||
//////// ZZX //////////
|
||||
///////////////////////////////////////////////
|
||||
|
||||
-char* ZZX_repr(struct ZZX* x)
|
||||
+char* ZZX_repr(ZZX* x)
|
||||
{
|
||||
ostringstream instore;
|
||||
instore << (*x);
|
||||
@@ -224,13 +224,13 @@ char* ZZX_repr(struct ZZX* x)
|
||||
return buf;
|
||||
}
|
||||
|
||||
-struct ZZX* ZZX_copy(struct ZZX* x) {
|
||||
+ZZX* ZZX_copy(ZZX* x) {
|
||||
return new ZZX(*x);
|
||||
}
|
||||
|
||||
/* Sets ith coefficient of x to value.
|
||||
AUTHOR: David Harvey (2006-06-08) */
|
||||
-void ZZX_setitem_from_int(struct ZZX* x, long i, int value)
|
||||
+void ZZX_setitem_from_int(ZZX* x, long i, int value)
|
||||
{
|
||||
SetCoeff(*x, i, value);
|
||||
}
|
||||
@@ -238,7 +238,7 @@ void ZZX_setitem_from_int(struct ZZX* x,
|
||||
/* Returns ith coefficient of x.
|
||||
Return value is only valid if the result should fit into an int.
|
||||
AUTHOR: David Harvey (2006-06-08) */
|
||||
-int ZZX_getitem_as_int(struct ZZX* x, long i)
|
||||
+int ZZX_getitem_as_int(ZZX* x, long i)
|
||||
{
|
||||
return ZZ_to_int(&coeff(*x, i));
|
||||
}
|
||||
@@ -246,75 +246,75 @@ int ZZX_getitem_as_int(struct ZZX* x, lo
|
||||
/* Copies ith coefficient of x to output.
|
||||
Assumes output has been mpz_init'd.
|
||||
AUTHOR: David Harvey (2007-02) */
|
||||
-void ZZX_getitem_as_mpz(mpz_t* output, struct ZZX* x, long i)
|
||||
+void ZZX_getitem_as_mpz(mpz_t* output, ZZX* x, long i)
|
||||
{
|
||||
const ZZ& z = coeff(*x, i);
|
||||
ZZ_to_mpz(output, &z);
|
||||
}
|
||||
|
||||
-struct ZZX* ZZX_div(struct ZZX* x, struct ZZX* y, int* divisible)
|
||||
+ZZX* ZZX_div(ZZX* x, ZZX* y, int* divisible)
|
||||
{
|
||||
- struct ZZX* z = new ZZX();
|
||||
+ ZZX* z = new ZZX();
|
||||
*divisible = divide(*z, *x, *y);
|
||||
return z;
|
||||
}
|
||||
|
||||
|
||||
-long mat_ZZ_ncols(const struct mat_ZZ* x)
|
||||
+long mat_ZZ_ncols(const mat_ZZ* x)
|
||||
|
||||
-void ZZX_quo_rem(struct ZZX* x, struct ZZX* other, struct ZZX** r, struct ZZX** q)
|
||||
+void ZZX_quo_rem(ZZX* x, ZZX* other, ZZX** r, ZZX** q)
|
||||
{
|
||||
- struct ZZX *qq = new ZZX(), *rr = new ZZX();
|
||||
+ ZZX *qq = new ZZX(), *rr = new ZZX();
|
||||
DivRem(*qq, *rr, *x, *other);
|
||||
*r = rr; *q = qq;
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_square(struct ZZX* x)
|
||||
+ZZX* ZZX_square(ZZX* x)
|
||||
{
|
||||
- struct ZZX* s = new ZZX();
|
||||
+ ZZX* s = new ZZX();
|
||||
sqr(*s, *x);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
-int ZZX_is_monic(struct ZZX* x)
|
||||
+int ZZX_is_monic(ZZX* x)
|
||||
{
|
||||
return IsOne(LeadCoeff(*x));
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_neg(struct ZZX* x)
|
||||
+ZZX* ZZX_neg(ZZX* x)
|
||||
{
|
||||
- struct ZZX* y = new ZZX();
|
||||
+ ZZX* y = new ZZX();
|
||||
*y = -*x;
|
||||
return y;
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_left_shift(struct ZZX* x, long n)
|
||||
+ZZX* ZZX_left_shift(ZZX* x, long n)
|
||||
{
|
||||
- struct ZZX* y = new ZZX();
|
||||
+ ZZX* y = new ZZX();
|
||||
LeftShift(*y, *x, n);
|
||||
return y;
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_right_shift(struct ZZX* x, long n)
|
||||
+ZZX* ZZX_right_shift(ZZX* x, long n)
|
||||
{
|
||||
- struct ZZX* y = new ZZX();
|
||||
+ ZZX* y = new ZZX();
|
||||
RightShift(*y, *x, n);
|
||||
return y;
|
||||
}
|
||||
|
||||
-struct ZZX* ZZX_primitive_part(struct ZZX* x)
|
||||
+ZZX* ZZX_primitive_part(ZZX* x)
|
||||
{
|
||||
- struct ZZX* p = new ZZX();
|
||||
+ ZZX* p = new ZZX();
|
||||
PrimitivePart(*p, *x);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
-void ZZX_pseudo_quo_rem(struct ZZX* x, struct ZZX* y, struct ZZX** r, struct ZZX** q)
|
||||
+void ZZX_pseudo_quo_rem(ZZX* x, ZZX* y, ZZX** r, ZZX** q)
|
||||
{
|
||||
*r = new ZZX();
|
||||
*q = new ZZX();
|
||||
@@ -322,16 +322,16 @@ void ZZX_pseudo_quo_rem(struct ZZX* x, s
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_gcd(struct ZZX* x, struct ZZX* y)
|
||||
+ZZX* ZZX_gcd(ZZX* x, ZZX* y)
|
||||
{
|
||||
- struct ZZX* g = new ZZX();
|
||||
+ ZZX* g = new ZZX();
|
||||
GCD(*g, *x, *y);
|
||||
return g;
|
||||
}
|
||||
|
||||
|
||||
-void ZZX_xgcd(struct ZZX* x, struct ZZX* y, struct ZZ** r, struct ZZX** s,
|
||||
- struct ZZX** t, int proof)
|
||||
+void ZZX_xgcd(ZZX* x, ZZX* y, ZZ** r, ZZX** s,
|
||||
+ ZZX** t, int proof)
|
||||
{
|
||||
*r = new ZZ();
|
||||
*s = new ZZX();
|
||||
@@ -340,24 +340,24 @@ void ZZX_xgcd(struct ZZX* x, struct ZZX*
|
||||
}
|
||||
|
||||
|
||||
-long ZZX_degree(struct ZZX* x)
|
||||
+long ZZX_degree(ZZX* x)
|
||||
{
|
||||
return deg(*x);
|
||||
}
|
||||
|
||||
-void ZZX_set_x(struct ZZX* x)
|
||||
+void ZZX_set_x(ZZX* x)
|
||||
{
|
||||
SetX(*x);
|
||||
}
|
||||
|
||||
|
||||
-int ZZX_is_x(struct ZZX* x)
|
||||
+int ZZX_is_x(ZZX* x)
|
||||
{
|
||||
return IsX(*x);
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_derivative(struct ZZX* x)
|
||||
+ZZX* ZZX_derivative(ZZX* x)
|
||||
{
|
||||
ZZX* d = new ZZX();
|
||||
diff(*d, *x);
|
||||
@@ -365,14 +365,14 @@ struct ZZX* ZZX_derivative(struct ZZX* x
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_reverse(struct ZZX* x)
|
||||
+ZZX* ZZX_reverse(ZZX* x)
|
||||
{
|
||||
ZZX* r = new ZZX();
|
||||
reverse(*r, *x);
|
||||
return r;
|
||||
}
|
||||
|
||||
-struct ZZX* ZZX_reverse_hi(struct ZZX* x, int hi)
|
||||
+ZZX* ZZX_reverse_hi(ZZX* x, int hi)
|
||||
{
|
||||
ZZX* r = new ZZX();
|
||||
reverse(*r, *x, hi);
|
||||
@@ -380,7 +380,7 @@ struct ZZX* ZZX_reverse_hi(struct ZZX* x
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_truncate(struct ZZX* x, long m)
|
||||
+ZZX* ZZX_truncate(ZZX* x, long m)
|
||||
{
|
||||
ZZX* t = new ZZX();
|
||||
trunc(*t, *x, m);
|
||||
@@ -388,7 +388,7 @@ struct ZZX* ZZX_truncate(struct ZZX* x,
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_multiply_and_truncate(struct ZZX* x, struct ZZX* y, long m)
|
||||
+ZZX* ZZX_multiply_and_truncate(ZZX* x, ZZX* y, long m)
|
||||
{
|
||||
ZZX* t = new ZZX();
|
||||
MulTrunc(*t, *x, *y, m);
|
||||
@@ -396,7 +396,7 @@ struct ZZX* ZZX_multiply_and_truncate(st
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_square_and_truncate(struct ZZX* x, long m)
|
||||
+ZZX* ZZX_square_and_truncate(ZZX* x, long m)
|
||||
{
|
||||
ZZX* t = new ZZX();
|
||||
SqrTrunc(*t, *x, m);
|
||||
@@ -404,7 +404,7 @@ struct ZZX* ZZX_square_and_truncate(stru
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_invert_and_truncate(struct ZZX* x, long m)
|
||||
+ZZX* ZZX_invert_and_truncate(ZZX* x, long m)
|
||||
{
|
||||
ZZX* t = new ZZX();
|
||||
InvTrunc(*t, *x, m);
|
||||
@@ -412,7 +412,7 @@ struct ZZX* ZZX_invert_and_truncate(stru
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_multiply_mod(struct ZZX* x, struct ZZX* y, struct ZZX* modulus)
|
||||
+ZZX* ZZX_multiply_mod(ZZX* x, ZZX* y, ZZX* modulus)
|
||||
{
|
||||
ZZX* p = new ZZX();
|
||||
MulMod(*p, *x, *y, *modulus);
|
||||
@@ -420,7 +420,7 @@ struct ZZX* ZZX_multiply_mod(struct ZZX*
|
||||
}
|
||||
|
||||
|
||||
-struct ZZ* ZZX_trace_mod(struct ZZX* x, struct ZZX* y)
|
||||
+ZZ* ZZX_trace_mod(ZZX* x, ZZX* y)
|
||||
{
|
||||
ZZ* p = new ZZ();
|
||||
TraceMod(*p, *x, *y);
|
||||
@@ -428,7 +428,7 @@ struct ZZ* ZZX_trace_mod(struct ZZX* x,
|
||||
}
|
||||
|
||||
|
||||
-char* ZZX_trace_list(struct ZZX* x)
|
||||
+char* ZZX_trace_list(ZZX* x)
|
||||
{
|
||||
vec_ZZ v;
|
||||
TraceVec(v, *x);
|
||||
@@ -441,7 +441,7 @@ char* ZZX_trace_list(struct ZZX* x)
|
||||
}
|
||||
|
||||
|
||||
-struct ZZ* ZZX_resultant(struct ZZX* x, struct ZZX* y, int proof)
|
||||
+ZZ* ZZX_resultant(ZZX* x, ZZX* y, int proof)
|
||||
{
|
||||
ZZ* res = new ZZ();
|
||||
resultant(*res, *x, *y, proof);
|
||||
@@ -449,7 +449,7 @@ struct ZZ* ZZX_resultant(struct ZZX* x,
|
||||
}
|
||||
|
||||
|
||||
-struct ZZ* ZZX_norm_mod(struct ZZX* x, struct ZZX* y, int proof)
|
||||
+ZZ* ZZX_norm_mod(ZZX* x, ZZX* y, int proof)
|
||||
{
|
||||
ZZ* res = new ZZ();
|
||||
NormMod(*res, *x, *y, proof);
|
||||
@@ -457,7 +457,7 @@ struct ZZ* ZZX_norm_mod(struct ZZX* x, s
|
||||
}
|
||||
|
||||
|
||||
-struct ZZ* ZZX_discriminant(struct ZZX* x, int proof)
|
||||
+ZZ* ZZX_discriminant(ZZX* x, int proof)
|
||||
{
|
||||
ZZ* d = new ZZ();
|
||||
discriminant(*d, *x, proof);
|
||||
@@ -465,7 +465,7 @@ struct ZZ* ZZX_discriminant(struct ZZX*
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_charpoly_mod(struct ZZX* x, struct ZZX* y, int proof)
|
||||
+ZZX* ZZX_charpoly_mod(ZZX* x, ZZX* y, int proof)
|
||||
{
|
||||
ZZX* f = new ZZX();
|
||||
CharPolyMod(*f, *x, *y, proof);
|
||||
@@ -473,7 +473,7 @@ struct ZZX* ZZX_charpoly_mod(struct ZZX*
|
||||
}
|
||||
|
||||
|
||||
-struct ZZX* ZZX_minpoly_mod(struct ZZX* x, struct ZZX* y)
|
||||
+ZZX* ZZX_minpoly_mod(ZZX* x, ZZX* y)
|
||||
{
|
||||
ZZX* f = new ZZX();
|
||||
MinPolyMod(*f, *x, *y);
|
||||
@@ -481,19 +481,19 @@ struct ZZX* ZZX_minpoly_mod(struct ZZX*
|
||||
}
|
||||
|
||||
|
||||
-void ZZX_clear(struct ZZX* x)
|
||||
+void ZZX_clear(ZZX* x)
|
||||
{
|
||||
clear(*x);
|
||||
}
|
||||
|
||||
|
||||
-void ZZX_preallocate_space(struct ZZX* x, long n)
|
||||
+void ZZX_preallocate_space(ZZX* x, long n)
|
||||
{
|
||||
x->SetMaxLength(n);
|
||||
}
|
||||
|
||||
/*
|
||||
-EXTERN struct ZZ* ZZX_polyeval(struct ZZX* f, struct ZZ* a)
|
||||
+EXTERN ZZ* ZZX_polyeval(ZZX* f, ZZ* a)
|
||||
{
|
||||
ZZ* b = new ZZ();
|
||||
*b = PolyEval(*f, *a);
|
||||
@@ -501,7 +501,7 @@ EXTERN struct ZZ* ZZX_polyeval(struct ZZ
|
||||
}
|
||||
*/
|
||||
|
||||
-void ZZX_squarefree_decomposition(struct ZZX*** v, long** e, long* n, struct ZZX* x)
|
||||
+void ZZX_squarefree_decomposition(ZZX*** v, long** e, long* n, ZZX* x)
|
||||
{
|
||||
vec_pair_ZZX_long factors;
|
||||
SquareFreeDecomp(factors, *x);
|
||||
@@ -518,7 +518,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
//////// ZZ_pX //////////
|
||||
///////////////////////////////////////////////
|
||||
|
||||
-// char* ZZ_pX_repr(struct ZZ_pX* x)
|
||||
+// char* ZZ_pX_repr(ZZ_pX* x)
|
||||
// {
|
||||
// ostringstream instore;
|
||||
// instore << (*x);
|
||||
@@ -528,17 +528,17 @@ void ZZX_squarefree_decomposition(struct
|
||||
// return buf;
|
||||
// }
|
||||
|
||||
-// void ZZ_pX_dealloc(struct ZZ_pX* x) {
|
||||
+// void ZZ_pX_dealloc(ZZ_pX* x) {
|
||||
// delete x;
|
||||
// }
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_copy(struct ZZ_pX* x) {
|
||||
+// ZZ_pX* ZZ_pX_copy(ZZ_pX* x) {
|
||||
// return new ZZ_pX(*x);
|
||||
// }
|
||||
|
||||
// /* Sets ith coefficient of x to value.
|
||||
// AUTHOR: David Harvey (2008-06-08) */
|
||||
-// void ZZ_pX_setitem_from_int(struct ZZ_pX* x, long i, int value)
|
||||
+// void ZZ_pX_setitem_from_int(ZZ_pX* x, long i, int value)
|
||||
// {
|
||||
// SetCoeff(*x, i, value);
|
||||
// }
|
||||
@@ -546,26 +546,26 @@ void ZZX_squarefree_decomposition(struct
|
||||
// /* Returns ith coefficient of x.
|
||||
// Return value is only valid if the result should fit into an int.
|
||||
// AUTHOR: David Harvey (2008-06-08) */
|
||||
-// int ZZ_pX_getitem_as_int(struct ZZ_pX* x, long i)
|
||||
+// int ZZ_pX_getitem_as_int(ZZ_pX* x, long i)
|
||||
// {
|
||||
// return ZZ_to_int(&rep(coeff(*x, i)));
|
||||
// }
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_add(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_add(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_pX *z = new ZZ_pX();
|
||||
// add(*z, *x, *y);
|
||||
// return z;
|
||||
// }
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_sub(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_sub(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_pX *z = new ZZ_pX();
|
||||
// sub(*z, *x, *y);
|
||||
// return z;
|
||||
// }
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_mul(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_mul(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_pX *z = new ZZ_pX();
|
||||
// mul(*z, *x, *y);
|
||||
@@ -573,24 +573,24 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_div(struct ZZ_pX* x, struct ZZ_pX* y, int* divisible)
|
||||
+// ZZ_pX* ZZ_pX_div(ZZ_pX* x, ZZ_pX* y, int* divisible)
|
||||
// {
|
||||
-// struct ZZ_pX* z = new ZZ_pX();
|
||||
+// ZZ_pX* z = new ZZ_pX();
|
||||
// *divisible = divide(*z, *x, *y);
|
||||
// return z;
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_mod(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_mod(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
-// struct ZZ_pX* z = new ZZ_pX();
|
||||
+// ZZ_pX* z = new ZZ_pX();
|
||||
// rem(*z, *x, *y);
|
||||
// return z;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
-// void ZZ_pX_quo_rem(struct ZZ_pX* x, struct ZZ_pX* y, struct ZZ_pX** r, struct ZZ_pX** q)
|
||||
+// void ZZ_pX_quo_rem(ZZ_pX* x, ZZ_pX* y, ZZ_pX** r, ZZ_pX** q)
|
||||
// {
|
||||
// *r = new ZZ_pX();
|
||||
// *q = new ZZ_pX();
|
||||
@@ -598,55 +598,55 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_square(struct ZZ_pX* x)
|
||||
+// ZZ_pX* ZZ_pX_square(ZZ_pX* x)
|
||||
// {
|
||||
-// struct ZZ_pX* s = new ZZ_pX();
|
||||
+// ZZ_pX* s = new ZZ_pX();
|
||||
// sqr(*s, *x);
|
||||
// return s;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
-// int ZZ_pX_is_monic(struct ZZ_pX* x)
|
||||
+// int ZZ_pX_is_monic(ZZ_pX* x)
|
||||
// {
|
||||
// IsOne(LeadCoeff(*x));
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_neg(struct ZZ_pX* x)
|
||||
+// ZZ_pX* ZZ_pX_neg(ZZ_pX* x)
|
||||
// {
|
||||
-// struct ZZ_pX* y = new ZZ_pX();
|
||||
+// ZZ_pX* y = new ZZ_pX();
|
||||
// *y = -*x;
|
||||
// return y;
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_left_shift(struct ZZ_pX* x, long n)
|
||||
+// ZZ_pX* ZZ_pX_left_shift(ZZ_pX* x, long n)
|
||||
// {
|
||||
-// struct ZZ_pX* y = new ZZ_pX();
|
||||
+// ZZ_pX* y = new ZZ_pX();
|
||||
// LeftShift(*y, *x, n);
|
||||
// return y;
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_right_shift(struct ZZ_pX* x, long n)
|
||||
+// ZZ_pX* ZZ_pX_right_shift(ZZ_pX* x, long n)
|
||||
// {
|
||||
-// struct ZZ_pX* y = new ZZ_pX();
|
||||
+// ZZ_pX* y = new ZZ_pX();
|
||||
// RightShift(*y, *x, n);
|
||||
// return y;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_gcd(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_gcd(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
-// struct ZZ_pX* g = new ZZ_pX();
|
||||
+// ZZ_pX* g = new ZZ_pX();
|
||||
// GCD(*g, *x, *y);
|
||||
// return g;
|
||||
// }
|
||||
|
||||
|
||||
-// void ZZ_pX_xgcd(struct ZZ_pX** d, struct ZZ_pX** s, struct ZZ_pX** t, struct ZZ_pX* a, struct ZZ_pX* b)
|
||||
+// void ZZ_pX_xgcd(ZZ_pX** d, ZZ_pX** s, ZZ_pX** t, ZZ_pX* a, ZZ_pX* b)
|
||||
// {
|
||||
// *d = new ZZ_pX();
|
||||
// *s = new ZZ_pX();
|
||||
@@ -654,7 +654,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// XGCD(**d, **s, **t, *a, *b);
|
||||
// }
|
||||
|
||||
-// void ZZ_pX_plain_xgcd(struct ZZ_pX** d, struct ZZ_pX** s, struct ZZ_pX** t, struct ZZ_pX* a, struct ZZ_pX* b)
|
||||
+// void ZZ_pX_plain_xgcd(ZZ_pX** d, ZZ_pX** s, ZZ_pX** t, ZZ_pX* a, ZZ_pX* b)
|
||||
// {
|
||||
// *d = new ZZ_pX();
|
||||
// *s = new ZZ_pX();
|
||||
@@ -662,25 +662,25 @@ void ZZX_squarefree_decomposition(struct
|
||||
// PlainXGCD(**d, **s, **t, *a, *b);
|
||||
// }
|
||||
|
||||
-// ZZ_p* ZZ_pX_leading_coefficient(struct ZZ_pX* x)
|
||||
+// ZZ_p* ZZ_pX_leading_coefficient(ZZ_pX* x)
|
||||
// {
|
||||
// return new ZZ_p(LeadCoeff(*x));
|
||||
// }
|
||||
|
||||
|
||||
-// void ZZ_pX_set_x(struct ZZ_pX* x)
|
||||
+// void ZZ_pX_set_x(ZZ_pX* x)
|
||||
// {
|
||||
// SetX(*x);
|
||||
// }
|
||||
|
||||
|
||||
-// int ZZ_pX_is_x(struct ZZ_pX* x)
|
||||
+// int ZZ_pX_is_x(ZZ_pX* x)
|
||||
// {
|
||||
// return IsX(*x);
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_derivative(struct ZZ_pX* x)
|
||||
+// ZZ_pX* ZZ_pX_derivative(ZZ_pX* x)
|
||||
// {
|
||||
// ZZ_pX* d = new ZZ_pX();
|
||||
// diff(*d, *x);
|
||||
@@ -688,14 +688,14 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_reverse(struct ZZ_pX* x)
|
||||
+// ZZ_pX* ZZ_pX_reverse(ZZ_pX* x)
|
||||
// {
|
||||
// ZZ_pX* r = new ZZ_pX();
|
||||
// reverse(*r, *x);
|
||||
// return r;
|
||||
// }
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_reverse_hi(struct ZZ_pX* x, int hi)
|
||||
+// ZZ_pX* ZZ_pX_reverse_hi(ZZ_pX* x, int hi)
|
||||
// {
|
||||
// ZZ_pX* r = new ZZ_pX();
|
||||
// reverse(*r, *x, hi);
|
||||
@@ -703,7 +703,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_truncate(struct ZZ_pX* x, long m)
|
||||
+// ZZ_pX* ZZ_pX_truncate(ZZ_pX* x, long m)
|
||||
// {
|
||||
// ZZ_pX* t = new ZZ_pX();
|
||||
// trunc(*t, *x, m);
|
||||
@@ -711,7 +711,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_multiply_and_truncate(struct ZZ_pX* x, struct ZZ_pX* y, long m)
|
||||
+// ZZ_pX* ZZ_pX_multiply_and_truncate(ZZ_pX* x, ZZ_pX* y, long m)
|
||||
// {
|
||||
// ZZ_pX* t = new ZZ_pX();
|
||||
// MulTrunc(*t, *x, *y, m);
|
||||
@@ -719,7 +719,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_square_and_truncate(struct ZZ_pX* x, long m)
|
||||
+// ZZ_pX* ZZ_pX_square_and_truncate(ZZ_pX* x, long m)
|
||||
// {
|
||||
// ZZ_pX* t = new ZZ_pX();
|
||||
// SqrTrunc(*t, *x, m);
|
||||
@@ -727,7 +727,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_invert_and_truncate(struct ZZ_pX* x, long m)
|
||||
+// ZZ_pX* ZZ_pX_invert_and_truncate(ZZ_pX* x, long m)
|
||||
// {
|
||||
// ZZ_pX* t = new ZZ_pX();
|
||||
// InvTrunc(*t, *x, m);
|
||||
@@ -735,7 +735,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_multiply_mod(struct ZZ_pX* x, struct ZZ_pX* y, struct ZZ_pX* modulus)
|
||||
+// ZZ_pX* ZZ_pX_multiply_mod(ZZ_pX* x, ZZ_pX* y, ZZ_pX* modulus)
|
||||
// {
|
||||
// ZZ_pX* p = new ZZ_pX();
|
||||
// MulMod(*p, *x, *y, *modulus);
|
||||
@@ -743,7 +743,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_p* ZZ_pX_trace_mod(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_p* ZZ_pX_trace_mod(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_p* p = new ZZ_p();
|
||||
// TraceMod(*p, *x, *y);
|
||||
@@ -751,7 +751,7 @@ void ZZX_squarefree_decomposition(struct
|
||||
// }
|
||||
|
||||
|
||||
-char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
+char* ZZ_pX_trace_list(ZZ_pX* x)
|
||||
{
|
||||
vec_ZZ_p v;
|
||||
TraceVec(v, *x);
|
||||
@@ -764,7 +764,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
}
|
||||
|
||||
|
||||
-// struct ZZ_p* ZZ_pX_resultant(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_p* ZZ_pX_resultant(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_p* res = new ZZ_p();
|
||||
// resultant(*res, *x, *y);
|
||||
@@ -772,7 +772,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_p* ZZ_pX_norm_mod(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_p* ZZ_pX_norm_mod(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_p* res = new ZZ_p();
|
||||
// NormMod(*res, *x, *y);
|
||||
@@ -781,7 +781,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_charpoly_mod(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_charpoly_mod(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_pX* f = new ZZ_pX();
|
||||
// CharPolyMod(*f, *x, *y);
|
||||
@@ -789,7 +789,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
// }
|
||||
|
||||
|
||||
-// struct ZZ_pX* ZZ_pX_minpoly_mod(struct ZZ_pX* x, struct ZZ_pX* y)
|
||||
+// ZZ_pX* ZZ_pX_minpoly_mod(ZZ_pX* x, ZZ_pX* y)
|
||||
// {
|
||||
// ZZ_pX* f = new ZZ_pX();
|
||||
// MinPolyMod(*f, *x, *y);
|
||||
@@ -797,18 +797,18 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
|
||||
// }
|
||||
|
||||
|
||||
-// void ZZ_pX_clear(struct ZZ_pX* x)
|
||||
+// void ZZ_pX_clear(ZZ_pX* x)
|
||||
// {
|
||||
// clear(*x);
|
||||
// }
|
||||
|
||||
|
||||
-// void ZZ_pX_preallocate_space(struct ZZ_pX* x, long n)
|
||||
+// void ZZ_pX_preallocate_space(ZZ_pX* x, long n)
|
||||
// {
|
||||
// x->SetMaxLength(n);
|
||||
// }
|
||||
|
||||
-void ZZ_pX_factor(struct ZZ_pX*** v, long** e, long* n, struct ZZ_pX* x, long verbose)
|
||||
+void ZZ_pX_factor(ZZ_pX*** v, long** e, long* n, ZZ_pX* x, long verbose)
|
||||
{
|
||||
long i;
|
||||
vec_pair_ZZ_pX_long factors;
|
||||
@@ -822,7 +822,7 @@ void ZZ_pX_factor(struct ZZ_pX*** v, lon
|
||||
}
|
||||
}
|
||||
|
||||
-void ZZ_pX_linear_roots(struct ZZ_p*** v, long* n, struct ZZ_pX* f)
|
||||
+void ZZ_pX_linear_roots(ZZ_p*** v, long* n, ZZ_pX* f)
|
||||
{
|
||||
long i;
|
||||
vec_ZZ_p w;
|
||||
@@ -836,7 +836,7 @@ void ZZ_pX_linear_roots(struct ZZ_p*** v
|
||||
|
||||
/////////// ZZ_pE //////////////
|
||||
|
||||
-struct ZZ_pX ZZ_pE_to_ZZ_pX(struct ZZ_pE x)
|
||||
+ZZ_pX ZZ_pE_to_ZZ_pX(ZZ_pE x)
|
||||
{
|
||||
return ZZ_pX(rep(x));
|
||||
}
|
||||
@@ -867,45 +867,45 @@ long mat_ZZ_ncols(const mat_ZZ* x)
|
||||
return x->NumCols();
|
||||
}
|
||||
|
||||
-void mat_ZZ_setitem(struct mat_ZZ* x, int i, int j, const struct ZZ* z)
|
||||
-void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const struct ZZ* z)
|
||||
+void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const ZZ* z)
|
||||
{
|
||||
(*x)[i][j] = *z;
|
||||
|
||||
}
|
||||
|
||||
-struct ZZ* mat_ZZ_getitem(const struct mat_ZZ* x, int i, int j)
|
||||
-struct ZZ* mat_ZZ_getitem(const mat_ZZ* x, int i, int j)
|
||||
+ZZ* mat_ZZ_getitem(const mat_ZZ* x, int i, int j)
|
||||
{
|
||||
return new ZZ((*x)(i,j));
|
||||
}
|
||||
|
||||
-struct ZZ* mat_ZZ_determinant(const struct mat_ZZ* x, long deterministic)
|
||||
-struct ZZ* mat_ZZ_determinant(const mat_ZZ* x, long deterministic)
|
||||
+ZZ* mat_ZZ_determinant(const mat_ZZ* x, long deterministic)
|
||||
{
|
||||
ZZ* d = new ZZ();
|
||||
|
@ -503,23 +1222,22 @@ diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
|
|||
return d;
|
||||
}
|
||||
|
||||
-struct mat_ZZ* mat_ZZ_HNF(const struct mat_ZZ* A, const struct ZZ* D)
|
||||
-mat_ZZ* mat_ZZ_HNF(const mat_ZZ* A, const struct ZZ* D)
|
||||
+mat_ZZ* mat_ZZ_HNF(const mat_ZZ* A, const ZZ* D)
|
||||
{
|
||||
- struct mat_ZZ* W = new mat_ZZ();
|
||||
+ mat_ZZ* W = new mat_ZZ();
|
||||
mat_ZZ* W = new mat_ZZ();
|
||||
HNF(*W, *A, *D);
|
||||
return W;
|
||||
}
|
||||
|
||||
-long mat_ZZ_LLL(struct ZZ **det, struct mat_ZZ *x, long a, long b, long verbose)
|
||||
-long mat_ZZ_LLL(struct ZZ **det, mat_ZZ *x, long a, long b, long verbose)
|
||||
+long mat_ZZ_LLL(ZZ **det, mat_ZZ *x, long a, long b, long verbose)
|
||||
{
|
||||
*det = new ZZ();
|
||||
return LLL(**det,*x,a,b,verbose);
|
||||
}
|
||||
|
||||
-long mat_ZZ_LLL_U(struct ZZ **det, struct mat_ZZ *x, struct mat_ZZ *U, long a, long b, long verbose)
|
||||
-long mat_ZZ_LLL_U(struct ZZ **det, mat_ZZ *x, mat_ZZ *U, long a, long b, long verbose)
|
||||
+long mat_ZZ_LLL_U(ZZ **det, mat_ZZ *x, mat_ZZ *U, long a, long b, long verbose)
|
||||
{
|
||||
*det = new ZZ();
|
||||
|
@ -527,7 +1245,7 @@ diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
|
|||
}
|
||||
|
||||
|
||||
-struct ZZX* mat_ZZ_charpoly(const struct mat_ZZ* A)
|
||||
-struct ZZX* mat_ZZ_charpoly(const mat_ZZ* A)
|
||||
+ZZX* mat_ZZ_charpoly(const mat_ZZ* A)
|
||||
{
|
||||
ZZX* f = new ZZX();
|
||||
|
@ -536,13 +1254,13 @@ diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
|
|||
}
|
||||
|
||||
|
||||
-void mat_GF2E_setitem(struct mat_GF2E* x, int i, int j, const struct GF2E* z)
|
||||
-void mat_GF2E_setitem(mat_GF2E* x, int i, int j, const struct GF2E* z)
|
||||
+void mat_GF2E_setitem(mat_GF2E* x, int i, int j, const GF2E* z)
|
||||
{
|
||||
(*x)[i][j] = *z;
|
||||
}
|
||||
|
||||
-void mat_GF2_setitem(struct mat_GF2* x, int i, int j, const struct GF2* z)
|
||||
-void mat_GF2_setitem(mat_GF2* x, int i, int j, const struct GF2* z)
|
||||
+void mat_GF2_setitem(mat_GF2* x, int i, int j, const GF2* z)
|
||||
{
|
||||
(*x)[i][j] = *z;
|
||||
|
@ -601,14 +1319,13 @@ diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
|
|||
{
|
||||
//int j;
|
||||
cpn.restore();
|
||||
diff -up src/sage/libs/ntl/decl.pxi.orig src/sage/libs/ntl/decl.pxi
|
||||
--- src/sage/libs/ntl/decl.pxi.orig 2014-02-07 15:20:57.090216365 -0200
|
||||
+++ src/sage/libs/ntl/decl.pxi 2014-02-07 15:21:00.833216508 -0200
|
||||
--- src/sage/libs/ntl/decl.pxi.orig 2014-05-13 16:22:05.531912186 -0300
|
||||
+++ src/sage/libs/ntl/decl.pxi 2014-05-13 16:29:45.226945150 -0300
|
||||
@@ -22,7 +22,7 @@ from sage.libs.ntl.ntl_ZZ_pEX_decl cimpo
|
||||
|
||||
cdef extern from "ntl_wrap.h":
|
||||
#### mat_ZZ_c
|
||||
- ctypedef struct mat_ZZ_c "struct mat_ZZ":
|
||||
- cdef cppclass mat_ZZ_c "mat_ZZ":
|
||||
+ ctypedef struct mat_ZZ_c "mat_ZZ":
|
||||
pass
|
||||
|
||||
|
@ -680,7 +1397,7 @@ diff -up src/sage/libs/ntl/decl.pxi.orig src/sage/libs/ntl/decl.pxi
|
|||
object vec_GF2E_to_PyString "_to_PyString<vec_GF2E>"(vec_GF2E_c *x)
|
||||
|
||||
#### mat_GF2E_c
|
||||
- ctypedef struct mat_GF2E_c "struct mat_GF2E":
|
||||
- cdef cppclass mat_GF2E_c "mat_GF2E":
|
||||
+ ctypedef struct mat_GF2E_c "mat_GF2E":
|
||||
void (*SetDims)(long nrows, long ncols)
|
||||
long (*NumRows)()
|
||||
|
@ -698,7 +1415,7 @@ diff -up src/sage/libs/ntl/decl.pxi.orig src/sage/libs/ntl/decl.pxi
|
|||
|
||||
|
||||
#### mat_GF2_c
|
||||
- ctypedef struct mat_GF2_c "struct mat_GF2":
|
||||
- cdef cppclass mat_GF2_c "mat_GF2":
|
||||
+ ctypedef struct mat_GF2_c "mat_GF2":
|
||||
void (*SetDims)(long nrows, long ncols)
|
||||
long (*NumRows)()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd
|
||||
--- src/sage/libs/pari/pari_instance.pxd.orig 2014-02-07 11:58:23.031750944 -0200
|
||||
+++ src/sage/libs/pari/pari_instance.pxd 2014-02-07 11:58:44.805751778 -0200
|
||||
--- src/sage/libs/pari/pari_instance.pxd.orig 2014-05-10 15:49:08.954184083 -0300
|
||||
+++ src/sage/libs/pari/pari_instance.pxd 2014-05-10 15:49:13.304183771 -0300
|
||||
@@ -5,6 +5,10 @@ cimport cython
|
||||
|
||||
from sage.libs.pari.gen cimport gen
|
||||
|
@ -12,10 +11,9 @@ diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_insta
|
|||
cpdef long prec_bits_to_words(unsigned long prec_in_bits)
|
||||
|
||||
@cython.final
|
||||
diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx
|
||||
--- src/sage/libs/pari/pari_instance.pyx.orig 2014-02-07 11:57:54.455749850 -0200
|
||||
+++ src/sage/libs/pari/pari_instance.pyx 2014-02-07 11:59:13.119752862 -0200
|
||||
@@ -434,7 +434,12 @@ cdef class PariInstance(sage.structure.p
|
||||
--- src/sage/libs/pari/pari_instance.pyx.orig 2014-05-10 15:49:06.437184263 -0300
|
||||
+++ src/sage/libs/pari/pari_instance.pyx 2014-05-10 15:49:13.307183771 -0300
|
||||
@@ -437,7 +437,12 @@ cdef class PariInstance(sage.structure.p
|
||||
# The size here doesn't really matter, because we will allocate
|
||||
# our own stack anyway. We ask PARI not to set up signal and
|
||||
# error handlers.
|
||||
|
|
8553
sagemath-pari2.7.patch
Normal file
8553
sagemath-pari2.7.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,6 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 11:50:03.665731821 -0200
|
||||
+++ src/module_list.py 2014-02-07 11:50:13.454732196 -0200
|
||||
@@ -1066,7 +1066,7 @@ ext_modules = [
|
||||
--- src/module_list.py.orig 2014-05-10 15:46:32.570195300 -0300
|
||||
+++ src/module_list.py 2014-05-10 15:46:44.964194411 -0300
|
||||
@@ -1058,7 +1058,7 @@ ext_modules = [
|
||||
|
||||
Extension('sage.matrix.matrix_mod2_dense',
|
||||
sources = ['sage/matrix/matrix_mod2_dense.pyx'],
|
||||
|
@ -10,7 +9,7 @@ diff -up src/module_list.py.orig src/module_list.py
|
|||
extra_compile_args = m4ri_extra_compile_args,
|
||||
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
|
||||
|
||||
@@ -1369,7 +1369,7 @@ ext_modules = [
|
||||
@@ -1354,7 +1354,7 @@ ext_modules = [
|
||||
|
||||
Extension('sage.modules.vector_mod2_dense',
|
||||
sources = ['sage/modules/vector_mod2_dense.pyx'],
|
||||
|
@ -19,7 +18,7 @@ diff -up src/module_list.py.orig src/module_list.py
|
|||
extra_compile_args = m4ri_extra_compile_args,
|
||||
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
|
||||
|
||||
@@ -1859,7 +1859,7 @@ ext_modules = [
|
||||
@@ -1860,7 +1860,7 @@ ext_modules = [
|
||||
Extension('sage.rings.polynomial.pbori',
|
||||
sources = ['sage/rings/polynomial/pbori.pyx'],
|
||||
libraries=['polybori-' + polybori_major_version,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
diff -up src/sage/all.py.orig src/sage/all.py
|
||||
--- src/sage/all.py.orig 2014-02-07 12:43:35.244854804 -0200
|
||||
+++ src/sage/all.py 2014-02-07 12:44:11.798856204 -0200
|
||||
@@ -325,11 +325,11 @@ def _write_started_file():
|
||||
--- src/sage/all.py.orig 2014-05-10 15:45:46.934198573 -0300
|
||||
+++ src/sage/all.py 2014-05-10 15:45:58.395197751 -0300
|
||||
@@ -327,11 +327,11 @@ def _write_started_file():
|
||||
|
||||
Check that the file exists when Sage is running::
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
diff -up src/module_list.py.orig src/module_list.py
|
||||
--- src/module_list.py.orig 2014-02-07 11:31:05.355688232 -0200
|
||||
+++ src/module_list.py 2014-02-07 11:32:21.239691137 -0200
|
||||
--- src/module_list.py.orig 2014-05-10 15:38:39.635229222 -0300
|
||||
+++ src/module_list.py 2014-05-10 15:40:06.410222998 -0300
|
||||
@@ -5,7 +5,7 @@ from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from sage.env import *
|
||||
|
@ -36,15 +35,14 @@ diff -up src/module_list.py.orig src/module_list.py
|
|||
@@ -702,7 +703,7 @@ ext_modules = [
|
||||
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
|
||||
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
|
||||
'Lfunction', 'stdc++'],
|
||||
'Lfunction'],
|
||||
- include_dirs = [SAGE_INC + "/libLfunction"],
|
||||
+ include_dirs = [SAGE_INC + "/Lfunction"],
|
||||
extra_compile_args=["-O3", "-ffast-math"],
|
||||
language = 'c++'),
|
||||
|
||||
diff -up src/setup.py.orig src/setup.py
|
||||
--- src/setup.py.orig 2014-02-07 11:32:35.278691675 -0200
|
||||
+++ src/setup.py 2014-02-07 11:34:40.589696474 -0200
|
||||
--- src/setup.py.orig 2014-05-10 15:40:24.650221690 -0300
|
||||
+++ src/setup.py 2014-05-10 15:43:52.993206746 -0300
|
||||
@@ -36,11 +36,11 @@ except KeyError:
|
||||
compile_result_dir = None
|
||||
keep_going = False
|
||||
|
@ -59,17 +57,17 @@ diff -up src/setup.py.orig src/setup.py
|
|||
SAGE_SRC,
|
||||
os.path.join(SAGE_SRC, 'sage', 'ext')]
|
||||
|
||||
@@ -161,11 +161,11 @@ for m in ext_modules:
|
||||
@@ -171,10 +171,12 @@ for m in ext_modules:
|
||||
m.libraries = ['csage'] + m.libraries
|
||||
if m.language == 'c++':
|
||||
m.libraries.append('stdc++')
|
||||
+ m.libraries.append('ntl')
|
||||
+ m.libraries = m.libraries + ['gmp', 'm', 'dl']
|
||||
|
||||
# FIMXE: Do NOT link the following libraries to each and
|
||||
# every module (regardless of the language btw.):
|
||||
- m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl']
|
||||
+ m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl', 'gmp', 'm', 'dl']
|
||||
|
||||
m.extra_compile_args += extra_compile_args
|
||||
m.extra_link_args += extra_link_args
|
||||
- m.library_dirs += ['%s/lib' % SAGE_LOCAL]
|
||||
m.extra_compile_args = m.extra_compile_args + extra_compile_args
|
||||
m.extra_link_args = m.extra_link_args + extra_link_args
|
||||
- m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")]
|
||||
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
|
||||
|
||||
|
||||
|
||||
#############################################
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
|
||||
--- src/doc/common/builder.py.orig 2014-02-07 11:35:55.574699345 -0200
|
||||
+++ src/doc/common/builder.py 2014-02-07 11:35:58.192699445 -0200
|
||||
--- src/doc/common/builder.py.orig 2014-05-10 15:44:39.046203443 -0300
|
||||
+++ src/doc/common/builder.py 2014-05-10 15:45:03.225201708 -0300
|
||||
@@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC
|
||||
# SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT,
|
||||
# PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS
|
||||
|
@ -9,10 +8,9 @@ diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
|
|||
+execfile(os.path.join(os.getenv('SAGE_ROOT'), 'src', 'doc', 'common' , 'build_options.py'))
|
||||
|
||||
|
||||
##########################################
|
||||
diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
|
||||
--- src/doc/common/conf.py.orig 2014-02-07 11:35:55.584699345 -0200
|
||||
+++ src/doc/common/conf.py 2014-02-07 11:35:58.194699445 -0200
|
||||
def print_build_error():
|
||||
--- src/doc/common/conf.py.orig 2014-05-10 15:44:59.936201944 -0300
|
||||
+++ src/doc/common/conf.py 2014-05-10 15:45:03.229201708 -0300
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys, os, sphinx
|
||||
-from sage.env import SAGE_DOC
|
||||
|
@ -30,9 +28,8 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
|
|||
mathjax_relative = os.path.join('sagenb','data','mathjax')
|
||||
|
||||
# It would be really nice if sphinx would copy the entire mathjax directory,
|
||||
diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
|
||||
--- src/sage/doctest/control.py.orig 2014-02-07 11:35:29.138698333 -0200
|
||||
+++ src/sage/doctest/control.py 2014-02-07 11:35:58.196699445 -0200
|
||||
--- src/sage/doctest/control.py.orig 2014-05-10 15:44:59.940201944 -0300
|
||||
+++ src/sage/doctest/control.py 2014-05-10 15:45:03.230201708 -0300
|
||||
@@ -89,7 +89,6 @@ class DocTestDefaults(SageObject):
|
||||
self.valgrind = False
|
||||
self.massif = False
|
||||
|
@ -77,9 +74,8 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
|
|||
return 2
|
||||
return self.run_val_gdb()
|
||||
else:
|
||||
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
|
||||
--- src/sage/interfaces/singular.py.orig 2014-02-07 11:35:55.605699346 -0200
|
||||
+++ src/sage/interfaces/singular.py 2014-02-07 11:35:58.198699446 -0200
|
||||
--- src/sage/interfaces/singular.py.orig 2014-05-10 15:44:59.940201944 -0300
|
||||
+++ src/sage/interfaces/singular.py 2014-05-10 15:45:03.230201708 -0300
|
||||
@@ -2149,7 +2149,7 @@ def generate_docstring_dictionary():
|
||||
nodes.clear()
|
||||
node_names.clear()
|
||||
|
@ -89,9 +85,8 @@ diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
|
|||
|
||||
new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*")
|
||||
new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
|
||||
diff -up src/sage/misc/latex_macros.py.orig src/sage/misc/latex_macros.py
|
||||
--- src/sage/misc/latex_macros.py.orig 2014-02-07 11:35:55.614699347 -0200
|
||||
+++ src/sage/misc/latex_macros.py 2014-02-07 11:35:58.199699446 -0200
|
||||
--- src/sage/misc/latex_macros.py.orig 2014-05-10 15:44:59.940201944 -0300
|
||||
+++ src/sage/misc/latex_macros.py 2014-05-10 15:45:03.232201708 -0300
|
||||
@@ -142,7 +142,7 @@ def convert_latex_macro_to_mathjax(macro
|
||||
return name + ': ["' + defn + '",' + str(num_args) + ']'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -up src/c_lib/SConstruct.orig src/c_lib/SConstruct
|
||||
--- src/c_lib/SConstruct.orig 2014-02-07 10:59:45.462616244 -0200
|
||||
+++ src/c_lib/SConstruct 2014-02-07 11:00:41.900618405 -0200
|
||||
--- src/c_lib/SConstruct.orig 2014-05-26 13:24:15.242761223 -0300
|
||||
+++ src/c_lib/SConstruct 2014-05-26 13:25:26.593763955 -0300
|
||||
@@ -126,8 +126,8 @@ env['PYV']=platform.python_version().rsp
|
||||
# The SCons convenience function Split is the only strange thing
|
||||
# to python programmers. It just makes a list by splitting on
|
||||
|
@ -14,7 +14,7 @@ diff -up src/c_lib/SConstruct.orig src/c_lib/SConstruct
|
|||
cppFiles = Split( "ZZ_pylong.cpp ntl_wrap.cpp" )
|
||||
@@ -136,9 +136,22 @@ incFiles = Split( "ccobject.h convert.h
|
||||
Split( "interrupt.h memory.h mpn_pylong.h mpz_longlong.h" ) + \
|
||||
Split( "mpz_pylong.h ntl_wrap.h pb_wrap.h stdsage.h ZZ_pylong.h" )
|
||||
Split( "mpz_pylong.h ntl_wrap.h stdsage.h ZZ_pylong.h" )
|
||||
|
||||
+env.Append(CFLAGS='@@optflags@@')
|
||||
+env.Append(CXXFLAGS='@@optflags@@')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
diff -up src/bin/sage.orig src/bin/sage
|
||||
--- src/bin/sage.orig 2014-02-07 11:02:57.653623604 -0200
|
||||
+++ src/bin/sage 2014-02-07 11:08:54.765637279 -0200
|
||||
@@ -11,17 +11,14 @@ usage() {
|
||||
--- src/bin/sage.orig 2014-05-26 13:29:30.741773304 -0300
|
||||
+++ src/bin/sage 2014-05-26 13:29:50.173774048 -0300
|
||||
@@ -13,17 +13,14 @@ usage() {
|
||||
echo " file.<sage|py|spyx> -- run given .sage, .py or .spyx files"
|
||||
echo " -advanced -- list all command line options"
|
||||
echo " -c <cmd> -- Evaluates cmd as sage code"
|
||||
|
@ -19,7 +19,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -python [...] -- run the Python interpreter"
|
||||
echo " -R [...] -- run Sage's R with given arguments"
|
||||
echo " -singular [...] -- run Sage's singular with given arguments"
|
||||
@@ -37,10 +34,6 @@ usage() {
|
||||
@@ -39,10 +36,6 @@ usage() {
|
||||
echo " --optional - controls which optional tests are run"
|
||||
echo " --sagenb - test all sagenb files"
|
||||
echo " --help - show all testing options"
|
||||
|
@ -30,7 +30,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -v, -version -- print the Sage version"
|
||||
exit 0
|
||||
}
|
||||
@@ -64,14 +57,14 @@ usage_advanced() {
|
||||
@@ -63,14 +56,14 @@ usage_advanced() {
|
||||
echo " -root -- print the Sage root directory"
|
||||
echo " -gthread, -qthread, -q4thread, -wthread, -pylab"
|
||||
echo " -- pass the option through to ipython"
|
||||
|
@ -47,7 +47,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -inotebook [...] -- start the *insecure* Sage notebook"
|
||||
echo " -n, -notebook [...] -- start the Sage notebook (options are the same"
|
||||
echo " as for the notebook command in Sage)"
|
||||
@@ -88,13 +81,9 @@ usage_advanced() {
|
||||
@@ -87,13 +80,9 @@ usage_advanced() {
|
||||
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
|
||||
echo " -ipython [...] -- run Sage's IPython using the default environment (not"
|
||||
echo " Sage), passing additional options to IPython"
|
||||
|
@ -61,7 +61,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -maxima [...] -- run Sage's Maxima with given arguments"
|
||||
echo " -mwrank [...] -- run Sage's mwrank with given arguments"
|
||||
echo " -python [...] -- run the Python interpreter"
|
||||
@@ -108,80 +97,10 @@ usage_advanced() {
|
||||
@@ -107,80 +96,10 @@ usage_advanced() {
|
||||
echo
|
||||
#### 1.......................26..................................................78
|
||||
#### |.....................--.|...................................................|
|
||||
|
@ -142,7 +142,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -search_src <string> -- search through all the Sage library code for string"
|
||||
echo " -search_doc <string> -- search through the Sage documentation for string"
|
||||
echo " -grep <string> -- same as -search_src"
|
||||
@@ -201,17 +120,6 @@ usage_advanced() {
|
||||
@@ -200,17 +119,6 @@ usage_advanced() {
|
||||
echo
|
||||
#### 1.......................26..................................................78
|
||||
#### |.....................--.|...................................................|
|
||||
|
@ -160,7 +160,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo "Valgrind memory debugging:"
|
||||
echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log"
|
||||
echo " files are named sage-cachegrind.PID can be found in"
|
||||
@@ -225,9 +133,6 @@ usage_advanced() {
|
||||
@@ -224,9 +132,6 @@ usage_advanced() {
|
||||
echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log"
|
||||
echo " files are named sage-memcheck.PID can be found in"
|
||||
echo " $DOT_SAGE"
|
||||
|
@ -170,7 +170,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
echo " -valgrind -- this is an alias for -memcheck"
|
||||
echo
|
||||
echo "You can also use -- before a long option, e.g., 'sage --optional'."
|
||||
@@ -256,17 +161,6 @@ if [ "$1" = '-upgrade' -o "$1" = "--upgr
|
||||
@@ -255,17 +160,6 @@ if [ "$1" = '-upgrade' -o "$1" = "--upgr
|
||||
fi
|
||||
|
||||
|
||||
|
@ -188,7 +188,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ $# -gt 0 ]; then
|
||||
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
|
||||
usage
|
||||
@@ -279,25 +173,11 @@ fi
|
||||
@@ -278,25 +172,11 @@ fi
|
||||
|
||||
# Prepare for running Sage, either interactively or non-interactively.
|
||||
sage_setup() {
|
||||
|
@ -214,7 +214,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ ! -d "$IPYTHONDIR" ]; then
|
||||
# make sure that $DOT_SAGE exists so that ipython will happily
|
||||
# create its config directories there. If DOT_SAGE doesn't
|
||||
@@ -308,20 +188,6 @@ sage_setup() {
|
||||
@@ -307,20 +187,6 @@ sage_setup() {
|
||||
}
|
||||
|
||||
|
||||
|
@ -235,7 +235,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
# Start an interactive Sage session, this function never returns.
|
||||
interactive_sage() {
|
||||
sage_setup
|
||||
@@ -371,11 +237,6 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom'
|
||||
@@ -370,11 +236,6 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom'
|
||||
exec axiom "$@"
|
||||
fi
|
||||
|
||||
|
@ -247,7 +247,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
|
||||
shift
|
||||
exec gap "$@"
|
||||
@@ -388,7 +249,7 @@ fi
|
||||
@@ -387,7 +248,7 @@ fi
|
||||
|
||||
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
|
||||
shift
|
||||
|
@ -256,7 +256,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
fi
|
||||
|
||||
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
|
||||
@@ -416,16 +277,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
|
||||
@@ -415,16 +276,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
|
||||
exec ecl "$@"
|
||||
fi
|
||||
|
||||
|
@ -273,7 +273,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
|
||||
shift
|
||||
exec maxima "$@"
|
||||
@@ -585,20 +436,6 @@ EOF
|
||||
@@ -584,20 +435,6 @@ EOF
|
||||
fi
|
||||
|
||||
#####################################################################
|
||||
|
@ -294,7 +294,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
# File conversion
|
||||
#####################################################################
|
||||
|
||||
@@ -613,36 +450,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2
|
||||
@@ -612,36 +449,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2
|
||||
fi
|
||||
|
||||
#####################################################################
|
||||
|
@ -331,7 +331,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
|
||||
shift
|
||||
sage-cleaner &>/dev/null &
|
||||
@@ -661,58 +477,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
|
||||
@@ -660,58 +476,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -391,7 +391,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ ! -f "$DOT_SAGE"/init.sage ]; then
|
||||
echo >&2 "init.sage does not exist ... creating"
|
||||
touch "$DOT_SAGE"/init.sage
|
||||
@@ -728,10 +498,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
|
||||
@@ -727,10 +497,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -403,7 +403,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
shift
|
||||
SAGE_BANNER="no"
|
||||
sage_setup
|
||||
@@ -745,12 +512,6 @@ if [ "$1" = '-testall' -o "$1" = "--test
|
||||
@@ -744,12 +511,6 @@ if [ "$1" = '-testall' -o "$1" = "--test
|
||||
exec sage-runtests -a "$@"
|
||||
fi
|
||||
|
||||
|
@ -416,7 +416,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ "$1" = '-c' ]; then
|
||||
shift
|
||||
SAGE_BANNER="no"
|
||||
@@ -759,124 +520,6 @@ if [ "$1" = '-c' ]; then
|
||||
@@ -758,124 +519,6 @@ if [ "$1" = '-c' ]; then
|
||||
exec sage-eval "$@"
|
||||
fi
|
||||
|
||||
|
@ -541,7 +541,7 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
|
||||
shift
|
||||
sage_setup
|
||||
@@ -925,12 +568,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
|
||||
@@ -924,12 +567,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
|
||||
exec sage-callgrind "$@"
|
||||
fi
|
||||
|
||||
|
@ -555,8 +555,8 @@ diff -up src/bin/sage.orig src/bin/sage
|
|||
exec sage-startuptime.py "$@"
|
||||
fi
|
||||
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
|
||||
--- src/bin/sage-runtests.orig 2014-02-07 11:09:24.776638428 -0200
|
||||
+++ src/bin/sage-runtests 2014-02-07 11:09:41.780639079 -0200
|
||||
--- src/bin/sage-runtests.orig 2014-05-26 13:29:46.150773894 -0300
|
||||
+++ src/bin/sage-runtests 2014-05-26 13:29:50.174774048 -0300
|
||||
@@ -54,10 +54,6 @@ if __name__ == "__main__":
|
||||
help="run doctests using Valgrind's cachegrind tool. The log "
|
||||
"files are named sage-cachegrind.PID and can be found in " +
|
||||
|
@ -569,8 +569,8 @@ diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
|
|||
parser.add_option("-f", "--failed", action="store_true", default=False,
|
||||
help="doctest only those files that failed in the previous run")
|
||||
diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
|
||||
--- src/bin/sage-valgrind.orig 2014-02-07 11:09:56.469639641 -0200
|
||||
+++ src/bin/sage-valgrind 2014-02-07 11:10:06.804640037 -0200
|
||||
--- src/bin/sage-valgrind.orig 2014-05-26 13:29:46.152773894 -0300
|
||||
+++ src/bin/sage-valgrind 2014-05-26 13:29:50.174774048 -0300
|
||||
@@ -11,7 +11,7 @@ fi
|
||||
LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p
|
||||
echo "Log file is $LOG"
|
||||
|
|
139
sagemath-sphinx.patch
Normal file
139
sagemath-sphinx.patch
Normal file
|
@ -0,0 +1,139 @@
|
|||
diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py
|
||||
--- src/sage/graphs/generic_graph.py.orig 2014-05-26 15:38:33.169069789 -0300
|
||||
+++ src/sage/graphs/generic_graph.py 2014-05-26 15:41:55.071077520 -0300
|
||||
@@ -9222,7 +9222,7 @@ class GenericGraph(GenericGraph_pyx):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`subdivide_edge` -- subdivides one edge
|
||||
+ - :meth:`subdivide_edge` -- subdivides one edge
|
||||
"""
|
||||
for e in edges:
|
||||
self.subdivide_edge(e, k)
|
||||
@@ -11504,10 +11504,10 @@ class GenericGraph(GenericGraph_pyx):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :mod:`Interval Graph Recognition <sage.graphs.pq_trees>`.
|
||||
+ - :mod:`Interval Graph Recognition <sage.graphs.pq_trees>`.
|
||||
|
||||
- - :meth:`PQ <sage.graphs.pq_trees.PQ>`
|
||||
- -- Implementation of PQ-Trees.
|
||||
+ - :meth:`PQ <sage.graphs.pq_trees.PQ>`
|
||||
+ -- Implementation of PQ-Trees.
|
||||
|
||||
"""
|
||||
self._scream_if_not_simple()
|
||||
@@ -13369,13 +13369,13 @@ class GenericGraph(GenericGraph_pyx):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`breadth_first_search <sage.graphs.base.c_graph.CGraphBackend.breadth_first_search>`
|
||||
- -- breadth-first search for fast compiled graphs.
|
||||
+ - :meth:`breadth_first_search <sage.graphs.base.c_graph.CGraphBackend.breadth_first_search>`
|
||||
+ -- breadth-first search for fast compiled graphs.
|
||||
|
||||
- - :meth:`depth_first_search <sage.graphs.base.c_graph.CGraphBackend.depth_first_search>`
|
||||
- -- depth-first search for fast compiled graphs.
|
||||
+ - :meth:`depth_first_search <sage.graphs.base.c_graph.CGraphBackend.depth_first_search>`
|
||||
+ -- depth-first search for fast compiled graphs.
|
||||
|
||||
- - :meth:`depth_first_search` -- depth-first search for generic graphs.
|
||||
+ - :meth:`depth_first_search` -- depth-first search for generic graphs.
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
@@ -13494,13 +13494,13 @@ class GenericGraph(GenericGraph_pyx):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`breadth_first_search`
|
||||
+ - :meth:`breadth_first_search`
|
||||
|
||||
- - :meth:`breadth_first_search <sage.graphs.base.c_graph.CGraphBackend.breadth_first_search>`
|
||||
- -- breadth-first search for fast compiled graphs.
|
||||
+ - :meth:`breadth_first_search <sage.graphs.base.c_graph.CGraphBackend.breadth_first_search>`
|
||||
+ -- breadth-first search for fast compiled graphs.
|
||||
|
||||
- - :meth:`depth_first_search <sage.graphs.base.c_graph.CGraphBackend.depth_first_search>`
|
||||
- -- depth-first search for fast compiled graphs.
|
||||
+ - :meth:`depth_first_search <sage.graphs.base.c_graph.CGraphBackend.depth_first_search>`
|
||||
+ -- depth-first search for fast compiled graphs.
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py
|
||||
--- src/sage/graphs/graph.py.orig 2014-05-26 15:42:17.579078382 -0300
|
||||
+++ src/sage/graphs/graph.py 2014-05-26 16:04:45.519129999 -0300
|
||||
@@ -2704,9 +2704,9 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`~Graph.is_arc_transitive`
|
||||
- - :meth:`~Graph.is_half_transitive`
|
||||
- - :meth:`~Graph.is_semi_symmetric`
|
||||
+ - :meth:`~Graph.is_arc_transitive`
|
||||
+ - :meth:`~Graph.is_half_transitive`
|
||||
+ - :meth:`~Graph.is_semi_symmetric`
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
@@ -2751,9 +2751,9 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`~Graph.is_edge_transitive`
|
||||
- - :meth:`~Graph.is_half_transitive`
|
||||
- - :meth:`~Graph.is_semi_symmetric`
|
||||
+ - :meth:`~Graph.is_edge_transitive`
|
||||
+ - :meth:`~Graph.is_half_transitive`
|
||||
+ - :meth:`~Graph.is_semi_symmetric`
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
@@ -2788,9 +2788,9 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`~Graph.is_edge_transitive`
|
||||
- - :meth:`~Graph.is_arc_transitive`
|
||||
- - :meth:`~Graph.is_semi_symmetric`
|
||||
+ - :meth:`~Graph.is_edge_transitive`
|
||||
+ - :meth:`~Graph.is_arc_transitive`
|
||||
+ - :meth:`~Graph.is_semi_symmetric`
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
@@ -2827,9 +2827,9 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`~Graph.is_edge_transitive`
|
||||
- - :meth:`~Graph.is_arc_transitive`
|
||||
- - :meth:`~Graph.is_half_transitive`
|
||||
+ - :meth:`~Graph.is_edge_transitive`
|
||||
+ - :meth:`~Graph.is_arc_transitive`
|
||||
+ - :meth:`~Graph.is_half_transitive`
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
@@ -5751,8 +5751,8 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- * Graph cores is also a notion related to graph homomorphisms. For
|
||||
- this second meaning, see :meth:`Graph.has_homomorphism_to`.
|
||||
+ * Graph cores is also a notion related to graph homomorphisms. For
|
||||
+ this second meaning, see :meth:`Graph.has_homomorphism_to`.
|
||||
|
||||
REFERENCE:
|
||||
|
||||
@@ -5937,7 +5937,7 @@ class Graph(GenericGraph):
|
||||
|
||||
.. SEEALSO::
|
||||
|
||||
- - :meth:`is_prime` -- Tests whether a graph is prime.
|
||||
+ - :meth:`is_prime` -- Tests whether a graph is prime.
|
||||
|
||||
REFERENCE:
|
||||
|
131
sagemath.spec
131
sagemath.spec
|
@ -1,34 +1,11 @@
|
|||
# of a system package
|
||||
%global __provides_exclude_from .*/site-packages/.*\\.so
|
||||
|
||||
# for quicker test with packages not yet in fedora
|
||||
%global packager_debug 0
|
||||
|
||||
# not functional due to missing jar dependencies
|
||||
%global with_sage3d 0
|
||||
|
||||
# use an workaround to match upstream sagemath patched sphinx
|
||||
%global with_sphinx_hack 1
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=909510
|
||||
%global have_lrcalc 1
|
||||
|
||||
# Cbc dependency under review is as follow:
|
||||
# first need coin-or-CoinUtils
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=894585
|
||||
# then coin-or-Osi (that requires coin-or-CoinUtils)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=894586
|
||||
# then coin-or-Clp (that requires coin-or-Osi)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=894587
|
||||
# then coin-or-Cgl (that requires coin-or-Clp)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=894588
|
||||
# and finally coin-or-Cbc (that requires coin-or-Cgl)
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=894597
|
||||
# other coin-or-* packages under review are not required by sagemath
|
||||
# but are required to have the "basic" set of coin-or packages
|
||||
%global have_coin_or_Cbc %{packager_debug}
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=914936
|
||||
%ifarch x86_64
|
||||
%global have_fes 1
|
||||
%else
|
||||
|
@ -61,8 +38,8 @@
|
|||
Name: sagemath
|
||||
Group: Applications/Engineering
|
||||
Summary: A free open-source mathematics software system
|
||||
Version: 6.1.1
|
||||
Release: 5%{?dist}
|
||||
Version: 6.2
|
||||
Release: 1%{?dist}
|
||||
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
|
||||
# Additionally, every $files section has a comment with the license name
|
||||
# before files with that license
|
||||
|
@ -134,62 +111,59 @@ Patch12: %{name}-4ti2.patch
|
|||
# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1317
|
||||
Patch13: %{name}-pari.patch
|
||||
|
||||
# Portuguese translations: http://trac.sagemath.org/sage_trac/ticket/12822
|
||||
Patch14: trac_12502_pt_translation_of_a_tour_of_sage_rebase1.patch
|
||||
Patch15: trac_12822_pt_translation_of_tutorial.patch
|
||||
Patch16: trac_12822_pt_translation_of_tutorial_rev1.patch
|
||||
|
||||
# use jmol itself to export preview images
|
||||
# FIXME besides not using X and told so, fails if DISPLAY is not set
|
||||
Patch17: %{name}-jmol.patch
|
||||
Patch14: %{name}-jmol.patch
|
||||
|
||||
# only cremona mini database built and installed
|
||||
# FIXME add a package with the full cremona database
|
||||
# FIXME actually it should be already available in pari-elldata
|
||||
Patch18: %{name}-cremona.patch
|
||||
Patch15: %{name}-cremona.patch
|
||||
|
||||
# lrslib is a requires
|
||||
Patch19: %{name}-lrslib.patch
|
||||
Patch16: %{name}-lrslib.patch
|
||||
|
||||
# nauty cannot be packaged due to license restrictions
|
||||
# http://cs.anu.edu.au/~bdm/nauty/
|
||||
# http://pallini.di.uniroma1.it/
|
||||
Patch20: %{name}-nauty.patch
|
||||
Patch17: %{name}-nauty.patch
|
||||
|
||||
# gap hap package not (yet) available
|
||||
# http://www-gap.mcs.st-and.ac.uk/Packages/hap.html
|
||||
Patch21: %{name}-gap-hap.patch
|
||||
Patch18: %{name}-gap-hap.patch
|
||||
|
||||
# Patch to enable lrcalc once review request is done in Fedora
|
||||
Patch22: %{name}-lrcalc.patch
|
||||
# enable lrcalc
|
||||
Patch19: %{name}-lrcalc.patch
|
||||
|
||||
# Patch to enable cbc once review requests are done in Fedora
|
||||
Patch23: %{name}-cbc.patch
|
||||
# enable cbc
|
||||
Patch20: %{name}-cbc.patch
|
||||
|
||||
# Use system gap directories
|
||||
Patch24: %{name}-libgap.patch
|
||||
Patch21: %{name}-libgap.patch
|
||||
|
||||
# Patch to enable fes once review requests are done in Fedora
|
||||
Patch25: %{name}-fes.patch
|
||||
# enable fes
|
||||
Patch22: %{name}-fes.patch
|
||||
|
||||
# Get package to build with known problem if not yet updated to pari 2.6.
|
||||
Patch26: %{name}-nopari2.6.patch
|
||||
|
||||
# sagemath 5.8 (optionally) requires cryptominisat 2.9.6 (in >= f19)
|
||||
# and does not work with cryptominisat 2.9.5 (in f18)
|
||||
Patch27: %{name}-cryptominisat.patch
|
||||
# enable cryptominisat
|
||||
Patch23: %{name}-cryptominisat.patch
|
||||
|
||||
# Side effect of using distro packages
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=974769
|
||||
Patch28: %{name}-sympy.patch
|
||||
Patch24: %{name}-sympy.patch
|
||||
|
||||
# Correct some warnings of newer sphinx that are treatead as errors
|
||||
# by default as of sagemath 6.2; other problems were fixed using
|
||||
# -k (keep-going)
|
||||
Patch25: %{name}-sphinx.patch
|
||||
|
||||
# Edited latest version from http://trac.sagemath.org/ticket/15767
|
||||
Patch26: %{name}-pari2.7.patch
|
||||
|
||||
BuildRequires: 4ti2
|
||||
BuildRequires: atlas-devel
|
||||
BuildRequires: cddlib-tools
|
||||
BuildRequires: cliquer-devel
|
||||
%if %{have_coin_or_Cbc}
|
||||
BuildRequires: coin-or-Cbc-devel
|
||||
%endif
|
||||
BuildRequires: cryptominisat-devel
|
||||
BuildRequires: Cython
|
||||
BuildRequires: desktop-file-utils
|
||||
|
@ -222,9 +196,7 @@ BuildRequires: libfplll-devel
|
|||
BuildRequires: libgap-devel
|
||||
BuildRequires: libmpc-devel
|
||||
BuildRequires: linbox-devel
|
||||
%if %{have_lrcalc}
|
||||
BuildRequires: lrcalc-devel
|
||||
%endif
|
||||
BuildRequires: m4ri-devel
|
||||
BuildRequires: m4rie-devel
|
||||
BuildRequires: maxima-runtime-ecl
|
||||
|
@ -625,40 +597,24 @@ popd
|
|||
%patch11
|
||||
%patch12
|
||||
%patch13
|
||||
|
||||
pushd src
|
||||
mkdir -p doc/pt/a_tour_of_sage/
|
||||
cp -fa doc/en/a_tour_of_sage/*.png doc/pt/a_tour_of_sage/
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
popd
|
||||
|
||||
%patch14
|
||||
%patch15
|
||||
%patch16
|
||||
%patch17
|
||||
%patch18
|
||||
%patch19
|
||||
|
||||
%patch20
|
||||
%patch21
|
||||
|
||||
%if %{have_lrcalc}
|
||||
%if %{have_fes}
|
||||
%patch22
|
||||
%endif
|
||||
|
||||
# other coin-or packages are build requires or coin-or-Cbc
|
||||
%if %{have_coin_or_Cbc}
|
||||
%patch23
|
||||
%endif
|
||||
|
||||
%patch24
|
||||
|
||||
%if %{have_fes}
|
||||
%patch25
|
||||
%endif
|
||||
|
||||
%patch26
|
||||
%patch27
|
||||
%patch28
|
||||
%patch26 -p1
|
||||
|
||||
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
|
||||
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
|
||||
|
@ -898,6 +854,12 @@ popd
|
|||
|
||||
#------------------------------------------------------------------------
|
||||
pushd build/pkgs/elliptic_curves
|
||||
# --short-circuit -bi debug build helper
|
||||
if [ ! -e src/ellcurves ]; then
|
||||
rm -fr src
|
||||
tar jxf ../../../upstream/%{elliptic_curves_pkg}.tar.bz2
|
||||
mv %{elliptic_curves_pkg} src
|
||||
fi
|
||||
%__python2 ./spkg-install
|
||||
popd
|
||||
|
||||
|
@ -961,19 +923,13 @@ export SAGE_ETC="$SAGE_ETC"
|
|||
export SAGE_SRC="$SAGE_SRC"
|
||||
##export SAGE_DOC="$SAGE_DOC"
|
||||
module load 4ti2-%{_arch}
|
||||
%if %{have_lrcalc}
|
||||
module load lrcalc-%{_arch}
|
||||
%endif
|
||||
module load surf-geometry-%{_arch}
|
||||
export PATH=$SAGE_LOCAL/bin:\$PATH
|
||||
export SINGULARPATH=%{_libdir}/Singular/LIB
|
||||
export SINGULAR_BIN_DIR=%{_libdir}/Singular
|
||||
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
|
||||
%if 0%{?fedora}
|
||||
export SAGE_CBLAS=blas
|
||||
%else
|
||||
export SAGE_CBLAS=cblas
|
||||
%endif
|
||||
export SAGE_FORTRAN=%{_bindir}/gfortran
|
||||
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
|
||||
export SYMPOW_DIR="\$DOT_SAGE/sympow"
|
||||
|
@ -1011,7 +967,7 @@ pushd src
|
|||
popd
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch}
|
||||
cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch}
|
||||
|
||||
# Build documentation, using %#{buildroot} environment
|
||||
pushd src/doc
|
||||
|
@ -1030,7 +986,7 @@ pushd src/doc
|
|||
|
||||
# there we go
|
||||
ln -sf %{buildroot}%{SAGE_DOC} $SAGE_SRC/doc
|
||||
python common/builder.py all html
|
||||
python common/builder.py -k all html
|
||||
export SAGE_DOC=%{buildroot}%{SAGE_DOC}
|
||||
cp -far output $SAGE_DOC
|
||||
|
||||
|
@ -1371,6 +1327,17 @@ exit 0
|
|||
|
||||
########################################################################
|
||||
%changelog
|
||||
* Mon May 26 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.2-1
|
||||
- Update to sagemath 6.2 (#1095282)
|
||||
- Rebuild with Singular 3.1.6 (#1074597)
|
||||
- Add missing python-docutils requires (#1056374)
|
||||
- Correct uninstall of sagemath-notebook (#1097428)
|
||||
- Enable coin-or-Cbc interface
|
||||
- Make coin-or-Cbc not optional
|
||||
- Make lrcalc not optional
|
||||
- Use upstream patch to support pari 2.7
|
||||
- Rediff ntl6 patch
|
||||
|
||||
* Wed Apr 2 2014 Jerry James <loganjerry@gmail.com> - 6.1.1-5
|
||||
- Rebuild for ntl 6.1.0
|
||||
- Fix ld ignoring __global_ldflags due to embedded trailing space
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
800c59f7cfa32c012f358ae240cdb2e6 sage-6.1.1.tar.gz
|
||||
71aa49875797c001ce0a31409f5a1762 sage-6.2.tar.gz
|
||||
|
|
|
@ -1,192 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Gustavo de Oliveira <goliveira5d@gmail.com>
|
||||
# Date 1331804234 -3600
|
||||
# Node ID 94a5dead34f6c05d91a1ea6746cc171a7248e905
|
||||
# Parent 05f00d34acbd7a4340a322d3752461edbae46fd0
|
||||
Trac 12502: Portuguese translation of "A Tour of Sage".
|
||||
|
||||
diff --git a/doc/pt/a_tour_of_sage/conf.py b/doc/pt/a_tour_of_sage/conf.py
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/doc/pt/a_tour_of_sage/conf.py
|
||||
@@ -0,0 +1,36 @@
|
||||
+# -*- coding: utf-8 -*-
|
||||
+#
|
||||
+# Numerical Sage documentation build configuration file, created by
|
||||
+# sphinx-quickstart on Sat Dec 6 11:08:04 2008.
|
||||
+#
|
||||
+# This file is execfile()d with the current directory set to its containing dir.
|
||||
+#
|
||||
+# The contents of this file are pickled, so don't put values in the namespace
|
||||
+# that aren't pickleable (module imports are okay, they're removed automatically).
|
||||
+#
|
||||
+# All configuration values have a default; values that are commented out
|
||||
+# serve to show the default.
|
||||
+
|
||||
+import sys, os
|
||||
+sys.path.append(os.environ['SAGE_DOC'])
|
||||
+from common.conf import *
|
||||
+
|
||||
+# General information about the project.
|
||||
+project = u'Uma Turnê pelo Sage'
|
||||
+name = 'a_tour_of_sage'
|
||||
+language = 'pt_BR'
|
||||
+
|
||||
+# The name for this set of Sphinx documents. If None, it defaults to
|
||||
+# "<project> v<release> documentation".
|
||||
+html_title = project + " v" + release
|
||||
+html_short_title = project + " v" + release
|
||||
+
|
||||
+# Output file base name for HTML help builder.
|
||||
+htmlhelp_basename = name
|
||||
+
|
||||
+# Grouping the document tree into LaTeX files. List of tuples
|
||||
+# (source start file, target name, title, author, document class [howto/manual]).
|
||||
+latex_documents = [
|
||||
+ ('index', name+'.tex', u'A Tour Of Sage',
|
||||
+ u'The Sage Development Team', 'manual'),
|
||||
+]
|
||||
diff --git a/doc/pt/a_tour_of_sage/index.rst b/doc/pt/a_tour_of_sage/index.rst
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/doc/pt/a_tour_of_sage/index.rst
|
||||
@@ -0,0 +1,139 @@
|
||||
+===================
|
||||
+Uma Turnê pelo Sage
|
||||
+===================
|
||||
+
|
||||
+Esta apresentação ao Sage segue de perto o "tour do Mathematica" que
|
||||
+se encontra no começo do "manual do Mathematica".
|
||||
+
|
||||
+
|
||||
+Sage como uma Calculadora
|
||||
+=========================
|
||||
+
|
||||
+A linha de comando do Sage possui o prompt ``sage:``; você não precisa
|
||||
+digitar essa palavra. Se você usar o Sage Notebook, então você deve
|
||||
+copiar todo o comando após o prompt ``sage:`` em uma célula, e
|
||||
+pressionar shift-enter para calcular o resultado.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: 3 + 5
|
||||
+ 8
|
||||
+
|
||||
+O acento circunflexo significa "elevar à potência".
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: 57.1 ^ 100
|
||||
+ 4.60904368661396e175
|
||||
+
|
||||
+Pode-se calcular a inversa de uma matrix :math:`2 \times 2` com o Sage.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: matrix([[1,2], [3,4]])^(-1)
|
||||
+ [ -2 1]
|
||||
+ [ 3/2 -1/2]
|
||||
+
|
||||
+A seguir, calculamos a integral de uma função simples.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: x = var('x') # create a symbolic variable
|
||||
+ sage: integrate(sqrt(x)*sqrt(1+x), x)
|
||||
+ 1/4*((x + 1)^(3/2)/x^(3/2) + sqrt(x + 1)/sqrt(x))/((x + 1)^2/x^2 - 2*(x + 1)/x + 1) + 1/8*log(sqrt(x + 1)/sqrt(x) - 1) - 1/8*log(sqrt(x + 1)/sqrt(x) + 1)
|
||||
+
|
||||
+Agora vamos resolver uma equação quadrática com o Sage. O símbolo
|
||||
+``==`` representa igualdade no Sage.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: a = var('a')
|
||||
+ sage: S = solve(x^2 + x == a, x); S
|
||||
+ [x == -1/2*sqrt(4*a + 1) - 1/2, x == 1/2*sqrt(4*a + 1) - 1/2]
|
||||
+
|
||||
+O resultado é uma lista de igualdades.
|
||||
+
|
||||
+.. link
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: S[0].rhs()
|
||||
+ -1/2*sqrt(4*a + 1) - 1/2
|
||||
+ sage: show(plot(sin(x) + sin(1.6*x), 0, 40))
|
||||
+
|
||||
+.. image:: sin_plot.*
|
||||
+
|
||||
+
|
||||
+Cálculo Numérico com o Sage
|
||||
+===========================
|
||||
+
|
||||
+Primeiro vamos criar uma matriz :math:`500 \times 500` de números aleatórios.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: m = random_matrix(RDF,500)
|
||||
+
|
||||
+Leva alguns segundos para calcular os autovalores dessa matriz e
|
||||
+representá-los em um gráfico.
|
||||
+
|
||||
+.. link
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: e = m.eigenvalues() #about 2 seconds
|
||||
+ sage: w = [(i, abs(e[i])) for i in range(len(e))]
|
||||
+ sage: show(points(w))
|
||||
+
|
||||
+.. image:: eigen_plot.*
|
||||
+
|
||||
+
|
||||
+Graças à biblioteca GMP (GNU Multiprecision Library), o Sage pode
|
||||
+efetuar cálculos com números muito grandes, até mesmo com números com
|
||||
+milhões de dígitos.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: factorial(100)
|
||||
+ 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
|
||||
+ sage: n = factorial(1000000) #about 2.5 seconds
|
||||
+
|
||||
+Vamos calcular :math:`\pi` com 100 algarismos decimais.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: N(pi, digits=100)
|
||||
+ 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068
|
||||
+
|
||||
+Agora o Sage vai fatorar um polinômio em duas variáveis.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: R.<x,y> = QQ[]
|
||||
+ sage: F = factor(x^99 + y^99)
|
||||
+ sage: F
|
||||
+ (x + y) * (x^2 - x*y + y^2) * (x^6 - x^3*y^3 + y^6) *
|
||||
+ (x^10 - x^9*y + x^8*y^2 - x^7*y^3 + x^6*y^4 - x^5*y^5 +
|
||||
+ x^4*y^6 - x^3*y^7 + x^2*y^8 - x*y^9 + y^10) *
|
||||
+ (x^20 + x^19*y - x^17*y^3 - x^16*y^4 + x^14*y^6 + x^13*y^7 -
|
||||
+ x^11*y^9 - x^10*y^10 - x^9*y^11 + x^7*y^13 + x^6*y^14 -
|
||||
+ x^4*y^16 - x^3*y^17 + x*y^19 + y^20) * (x^60 + x^57*y^3 -
|
||||
+ x^51*y^9 - x^48*y^12 + x^42*y^18 + x^39*y^21 - x^33*y^27 -
|
||||
+ x^30*y^30 - x^27*y^33 + x^21*y^39 + x^18*y^42 - x^12*y^48 -
|
||||
+ x^9*y^51 + x^3*y^57 + y^60)
|
||||
+ sage: F.expand()
|
||||
+ x^99 + y^99
|
||||
+
|
||||
+O Sage leva menos de 5 segundos para calcular de quantas maneiras pode-se
|
||||
+particionar :math:`10^8` como uma soma de inteiros positivos.
|
||||
+
|
||||
+::
|
||||
+
|
||||
+ sage: z = Partitions(10^8).cardinality() #about 4.5 seconds
|
||||
+ sage: str(z)[:40]
|
||||
+ '1760517045946249141360373894679135204009'
|
||||
+
|
||||
+Algoritmos incluídos no Sage
|
||||
+============================
|
||||
+
|
||||
+Quando você usa o Sage, você acessa uma das maiores coleções
|
||||
+disponíveis de algoritmos computacionais de código aberto.
|
File diff suppressed because it is too large
Load diff
|
@ -1,468 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Gustavo de Oliveira <goliveira5d@gmail.com>
|
||||
# Date 1336320704 -7200
|
||||
# Node ID f35ca5dd36d8ccfeba96947e9e10402f6e6ed79b
|
||||
# Parent ad8e41651a3187a45f087335cb048418bf545506
|
||||
Trac 12822: Portuguese translation of "Tutorial" (revision 1).
|
||||
|
||||
diff --git a/doc/pt/tutorial/interactive_shell.rst b/doc/pt/tutorial/interactive_shell.rst
|
||||
--- a/doc/pt/tutorial/interactive_shell.rst
|
||||
+++ b/doc/pt/tutorial/interactive_shell.rst
|
||||
@@ -361,8 +361,8 @@
|
||||
|
||||
Note que o GAP e o Maxima são os mais lentos neste teste (isso foi
|
||||
executado no computador ``sage.math.washington.edu``). Devido ao
|
||||
-"overhead" da interface pexpect, talvez não seja apropriado comparar
|
||||
-esses resultados com o Sage, que é o mais rápido.
|
||||
+processamento extra (overhead) da interface pexpect, talvez não seja
|
||||
+apropriado comparar esses resultados com o Sage, que é o mais rápido.
|
||||
|
||||
Outras Dicas para o IPython
|
||||
===========================
|
||||
@@ -402,7 +402,7 @@
|
||||
|
||||
- Você pode usar ``%edit`` (ou ``%ed`` ou ``ed``) para abrir um
|
||||
editor, se você desejar digitar algum código mais complexo. Antes de
|
||||
- iniciar o Sage, certifique-se de que a variável de environment
|
||||
+ iniciar o Sage, certifique-se de que a variável de ambiente
|
||||
:envvar:`EDITOR` está definida com o seu editor favorito (colocando
|
||||
``export EDITOR=/usr/bin/emacs`` ou ``export EDITOR=/usr/bin/vim``
|
||||
or algo similar no lugar apropriado, como um arquivo ``.profile``).
|
||||
@@ -789,7 +789,7 @@
|
||||
sage: v = E.anlist(100000) # instant!
|
||||
|
||||
(Em Python, salvar e restaurar é feito usando o módulo ``cPickle``. Em
|
||||
-particular, um objeto ``x`` do Sage pode ser salvado usando
|
||||
+particular, um objeto ``x`` do Sage pode ser salvo usando
|
||||
``cPickle.dumps(x, 2)``. Note o ``2``!)
|
||||
|
||||
O sage não pode salvar e carregar objetos criados em algum outro
|
||||
@@ -811,7 +811,7 @@
|
||||
ValueError: The session in which this object was defined is no longer
|
||||
running.
|
||||
|
||||
-Objetos do GP/PARI também podem ser salvados e carregados pois suas
|
||||
+Objetos do GP/PARI também podem ser salvos e carregados pois suas
|
||||
representações em forma impressa são suficientes para reconstruí-los.
|
||||
|
||||
.. skip
|
||||
@@ -823,7 +823,7 @@
|
||||
sage: load('a')
|
||||
2
|
||||
|
||||
-Objetos que foram salvados podem ser abertos posteriormente em
|
||||
+Objetos que foram salvos podem ser abertos posteriormente em
|
||||
computadores com arquiteturas e sistemas operacionais diferentes, por
|
||||
exemplo, você poderia salvar uma matriz muito grande em um OS X de
|
||||
32-bits e abri-lo em um Linux de 64-bits, encontrar a forma reduzida,
|
||||
@@ -868,7 +868,7 @@
|
||||
``sessionname``. (No caso raro de uma variável não poder ser salva,
|
||||
ela simplesmente não aparece no dicionário.) O resultado é um arquivo
|
||||
``.sobj`` que pode ser aberto como qualquer outro objeto que foi
|
||||
-salvado. Quando você abre os objetos que foram salvados em uma sessão,
|
||||
+salvo. Quando você abre os objetos que foram salvos em uma sessão,
|
||||
você obtém um dicionário cujas chaves (keys) são os nomes das
|
||||
variáveis e os valores são os objetos.
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
sage: notebook()
|
||||
|
||||
na linha de comando do Sage. Isso inicia o Notebook e abre o seu
|
||||
-browser padrão para visualizá-lo. Os arquivos de estado do servidor
|
||||
+navegador padrão para visualizá-lo. Os arquivos de estado do servidor
|
||||
são armazenados em ``$HOME/.sage/sage\_notebook``.
|
||||
|
||||
Outras opções incluem:
|
||||
diff --git a/doc/pt/tutorial/interfaces.rst b/doc/pt/tutorial/interfaces.rst
|
||||
--- a/doc/pt/tutorial/interfaces.rst
|
||||
+++ b/doc/pt/tutorial/interfaces.rst
|
||||
@@ -48,15 +48,15 @@
|
||||
Mod(5, 10007)
|
||||
|
||||
No primeiro caso, uma cópia separada do interpretador GP é iniciada
|
||||
-como um servidor, e a string ``´znprimroot(10007)'`` é enviada,
|
||||
+como um servidor, e a string ``znprimroot(10007)`` é enviada,
|
||||
calculada pelo GP, e o resultado é armazenado em uma variável no GP
|
||||
(que ocupa espaço na memória dos processos do GP que não serão
|
||||
liberados). Então o valor dessa variável é exibido. No segundo caso,
|
||||
-nenhum programa separado é iniciado, e a string
|
||||
-``´znprimroot(10007)'`` é calculada por uma certa função da biblioteca
|
||||
-C do PARI. O resultado é armazenado na memória em uso pelo Python, que
|
||||
-é liberada quando a variável não for mais referenciada. Os objetos
|
||||
-possuem tipos diferentes:
|
||||
+nenhum programa separado é iniciado, e a string ``znprimroot(10007)``
|
||||
+é calculada por uma certa função da biblioteca C do PARI. O resultado
|
||||
+é armazenado na memória em uso pelo Python, que é liberada quando a
|
||||
+variável não for mais referenciada. Os objetos possuem tipos
|
||||
+diferentes:
|
||||
|
||||
::
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
========
|
||||
|
||||
O Singular fornece uma biblioteca massiva e madura para bases de
|
||||
-Gröbner, máximo divisor comum para poliômios em várias variaveis,
|
||||
+Gröbner, máximo divisor comum para polinômios em várias variáveis,
|
||||
bases de espaços de Riemann-Roch de uma curva plana, e fatorização,
|
||||
entre outras coisas. Vamos ilustrar a fatorização de polinômios em
|
||||
várias variáveis usando a interface do Sage para o Singular (não
|
||||
diff --git a/doc/pt/tutorial/introduction.rst b/doc/pt/tutorial/introduction.rst
|
||||
--- a/doc/pt/tutorial/introduction.rst
|
||||
+++ b/doc/pt/tutorial/introduction.rst
|
||||
@@ -68,7 +68,7 @@
|
||||
principal do Sage [SA]_ para instruções de como instalar o Sage no seu
|
||||
computador. Aqui faremos apenas alguns comentários.
|
||||
|
||||
-#. O arquivo para download do Sage vem com "baterias incluídas". Em
|
||||
+#. O arquivo para instalação do Sage vem com "baterias incluídas". Em
|
||||
outras palavras, embora o Sage use o Python, IPython, PARI, GAP,
|
||||
Singular, Maxima, NTL, GMP, e uma série de outros programas, você
|
||||
não precisa instalá-los separadamente pois eles estão incluídos no
|
||||
diff --git a/doc/pt/tutorial/latex.rst b/doc/pt/tutorial/latex.rst
|
||||
--- a/doc/pt/tutorial/latex.rst
|
||||
+++ b/doc/pt/tutorial/latex.rst
|
||||
@@ -31,15 +31,15 @@
|
||||
|
||||
#. A interface Notebook é configurada para usar o `jsMath
|
||||
<http://www.math.union.edu/~dpvc/jsMath/>`_ para representar
|
||||
- fórmulas matemáticas de forma clara em um web browser. O jsMath é
|
||||
+ fórmulas matemáticas de forma clara em um web navegador. O jsMath é
|
||||
uma coleção de rotinas em JavaScript e fontes associadas.
|
||||
Tipicamente esses fontes ficam armazenadas em um servidor e são
|
||||
- enviadas para o browser juntamente com a página onde elas estão
|
||||
+ enviadas para o navegador juntamente com a página onde elas estão
|
||||
sendo usadas. No caso do Sage, o Notebook está sempre conectado a
|
||||
um servidor usado para executar os comando do Sage, e esse servidor
|
||||
também fornece as fontes do jsMath necessárias. Logo não é
|
||||
necessário configurar nada mais para ter formulas matemáticas
|
||||
- representadas no seu browser quando você usa o Notebook do Sage.
|
||||
+ representadas no seu navegador quando você usa o Notebook do Sage.
|
||||
|
||||
O jsMath é implementado para representar um subconjunto grande,
|
||||
mas não completo, do TeX. Ele não suporta objetos como, por
|
||||
@@ -154,7 +154,7 @@
|
||||
Um segundo recurso disponível no Notebook é possibilidade de inserir
|
||||
código TeX para fazer anotações na folha de trabalho. Quando o cursos
|
||||
esta posicionado entre células de modo que uma barra azul fica
|
||||
-visível, então shift-click irá abrir um mini processador de texto,
|
||||
+visível, então shift+clique irá abrir um mini processador de texto,
|
||||
TinyMCE. Isso permite digitar texto, usando um editor WSISYG para
|
||||
criar HTML e CSS. Logo é possível inserir texto formatado para
|
||||
complementar a folha de trabalho. Todavia, texto entre símbolos $, ou
|
||||
@@ -176,8 +176,9 @@
|
||||
usado para alterar a notação de matrizes -- parênteses grandes,
|
||||
colchetes, barras verticais. Nenhuma noção de estilo é enfatizada,
|
||||
você pode configurar como desejado. Observe como as barras invertidas
|
||||
-usadas em LaTeX requerem uma barra adicional de modo que elas possam
|
||||
-ser interpretadas (escaped) corretamente em uma string do Python. ::
|
||||
+usadas em LaTeX requerem uma barra adicional para que elas não sejam
|
||||
+interpretadas pelo Python como um comando (ou seja, sejam implementadas
|
||||
+simplesmente como parte de uma string. ::
|
||||
|
||||
sage: A = matrix(ZZ, 2, 2, range(4))
|
||||
sage: latex(A)
|
||||
@@ -217,10 +218,10 @@
|
||||
<html><div class="math">\newcommand{\Bold}[1]{\mathbb{#1}}\Bold{Q}</div></html>
|
||||
sage: latex.blackboard_bold(False)
|
||||
|
||||
-É possível aproveitar os recursos do TeX adicionando novas macros e
|
||||
-novos pacotes. Primeiro, macros individuais podem ser adicionadas para
|
||||
-serem usadas quando o jsMath interpreta pequenos trechos de códigos
|
||||
-TeX no Notebook. ::
|
||||
+É possível aproveitar os recursos do TeX adicionando novas funções
|
||||
+(macros em inglês) e novos pacotes. Primeiro, funções individuais podem
|
||||
+ser adicionadas para serem usadas quando o jsMath interpreta pequenos
|
||||
+trechos de códigos TeX no Notebook. ::
|
||||
|
||||
sage: latex.extra_macros()
|
||||
''
|
||||
@@ -436,7 +437,7 @@
|
||||
Para uma experiência semelhante no Notebook, é necessário desabilitar
|
||||
o processador jsMath para o código LaTeX do grafo usando a "lista de
|
||||
comandos a serem evitados pelo jsMath". Grafos são criados usando o
|
||||
-environment ``tikzpicture``, logo essa uma boa escolha para uma string
|
||||
+ambiente ``tikzpicture``, logo essa uma boa escolha para uma string
|
||||
a ser incluída na lista que acabamos de mencionar. Agora,
|
||||
``view(graphs.CompleteGraph(4))`` em uma folha de trabalho deve
|
||||
executar o pdflatex para criar um PDF e então o programa ``convert``
|
||||
@@ -486,7 +487,7 @@
|
||||
|
||||
Existem três programas disponíveis para integrar ainda mais o TeX e o
|
||||
Sage. O primeiro é o sagetex. Uma descrição concisa do sagetex é que
|
||||
-ele é uma coleção de macros do TeX que permitem incluir em um
|
||||
+ele é uma coleção de funções do TeX que permitem incluir em um
|
||||
documento LaTeX instruções para usar o Sage para calcular vários
|
||||
objetos, e/ou formatar objetos usando o comando ``latex()`` existente
|
||||
no Sage. Logo, como um passo intermediário para compilar um documento
|
||||
@@ -496,7 +497,7 @@
|
||||
sagetex para fazer cálculos com o Sage. Veja :ref:`sec-sagetex` para
|
||||
mais informações.
|
||||
|
||||
-O tex2sws começa com um documento LaTeX, mas define environments
|
||||
+O tex2sws começa com um documento LaTeX, mas define ambientes
|
||||
adicionais para inserir código em Sage. Quando processado com as
|
||||
ferramentas adequadas, o resultado é uma folha de trabalho do Sage,
|
||||
com conteúdo apropriadamente formatado para o jsMath e com código em
|
||||
diff --git a/doc/pt/tutorial/programming.rst b/doc/pt/tutorial/programming.rst
|
||||
--- a/doc/pt/tutorial/programming.rst
|
||||
+++ b/doc/pt/tutorial/programming.rst
|
||||
@@ -66,7 +66,7 @@
|
||||
(Em Python, ``^`` significa "ou exclusivo" e ``**`` significa
|
||||
"exponenciação".)
|
||||
|
||||
-Esse "preparsing" está implementado em ``sage/misc/interpreter.py``.)
|
||||
+Esse "" está implementado em ``sage/misc/interpreter.py``.)
|
||||
|
||||
Você pode colar código tabulado com muitas linhas no Sage desde que
|
||||
existam linhas em branco separando blocos de código (isso não é
|
||||
@@ -130,7 +130,7 @@
|
||||
em ``$HOME/.sage/temp/hostname/pid/spyx``. Esses arquivos são
|
||||
excluídos quando você encerra o Sage.
|
||||
|
||||
-Nenhum pré-processador (preparsing) é aplicado em arquivos spyx, por
|
||||
+Nenhum pré-processamento (preparsing) é aplicado em arquivos spyx, por
|
||||
exemplo, ``1/3`` vai resultar em 0 em um arquivo spyx em vez do número
|
||||
racional :math:`1/3`. Se ``foo`` é uma função da biblioteca Sage, para
|
||||
usá-la em um arquivo spyx importe ``sage.all`` e use ``sage.all.foo``.
|
||||
@@ -456,10 +456,10 @@
|
||||
Dicionários
|
||||
===========
|
||||
|
||||
-Um dicionário (também chamado as vezes de lista associativa) é um
|
||||
-mapeamento de objetos "hashable" em objetos arbitrários. (Exemplos de
|
||||
-objetos "hashable" são strings e números; veja a documentação Python
|
||||
-em http://docs.python.org/tut/node7.html e
|
||||
+Um dicionário (também chamado as vezes de lista associativa ou "hash
|
||||
+table") é um mapeamento de objetos em objetos arbitrários. (Exemplos
|
||||
+de objetos que admitem uma lista associativa são strings e números;
|
||||
+veja a documentação Python em http://docs.python.org/tut/node7.html e
|
||||
http://docs.python.org/lib/typesmapping.html para detalhes).
|
||||
|
||||
::
|
||||
@@ -502,7 +502,7 @@
|
||||
Conjuntos
|
||||
=========
|
||||
|
||||
-O Python possui um tipo set (conjuntos) nativo. O principal recurso
|
||||
+O Python possui um tipo de conjuntos (set) nativo. O principal recurso
|
||||
que ele oferece é a rápida verificação se um objeto está ou não em um
|
||||
conjunto, juntamente com as operações comuns em conjuntos.
|
||||
|
||||
diff --git a/doc/pt/tutorial/sagetex.rst b/doc/pt/tutorial/sagetex.rst
|
||||
--- a/doc/pt/tutorial/sagetex.rst
|
||||
+++ b/doc/pt/tutorial/sagetex.rst
|
||||
@@ -88,14 +88,14 @@
|
||||
que tudo que foi calculado, incluindo os gráficos, foi incluído em seu
|
||||
documento.
|
||||
|
||||
-As macros utilizadas acima devem ser fáceis de entender. Um
|
||||
-environment ``sageblock`` insere código "verbatim" (exatamente como é
|
||||
-digitado) e também executa o código quando você executa o Sage. Quando
|
||||
-você insere ``\sage{foo}``, é incluído em seu documento o resultado
|
||||
-que você obteria executando ``latex(foo)`` no Sage. Comandos para
|
||||
-fazer gráficos são um pouco mais complicados, mas em sua forma mais
|
||||
-simples, ``\sageplot{foo}`` insere a imagem que você obtêm usando
|
||||
-``foo.save('filename.eps')``.
|
||||
+As funções (macros em inglês) utilizadas acima devem ser fáceis de
|
||||
+entender. Um ambiente ``sageblock`` insere código "verbatim"
|
||||
+(exatamente como é digitado) e também executa o código quando você
|
||||
+executa o Sage. Quando você insere ``\sage{foo}``, é incluído em seu
|
||||
+documento o resultado que você obteria executando ``latex(foo)`` no
|
||||
+Sage. Comandos para fazer gráficos são um pouco mais complicados, mas
|
||||
+em sua forma mais simples, ``\sageplot{foo}`` insere a imagem que você
|
||||
+obtêm usando ``foo.save('filename.eps')``.
|
||||
|
||||
Em geral, a rotina é a seguinte:
|
||||
|
||||
diff --git a/doc/pt/tutorial/tour_advanced.rst b/doc/pt/tutorial/tour_advanced.rst
|
||||
--- a/doc/pt/tutorial/tour_advanced.rst
|
||||
+++ b/doc/pt/tutorial/tour_advanced.rst
|
||||
@@ -84,7 +84,7 @@
|
||||
funcionalidade para curvas elípticas do PARI, acesso aos dados da base
|
||||
de dados Cremona (isso requer um pacote adicional), os recursos do
|
||||
mwrank, isto é, "2-descends" com cálculos do grupo de Mordell-Weil
|
||||
-completo, o algoritmo SEA (singla em inglês), cálculo de todas as
|
||||
+completo, o algoritmo SEA (sigla em inglês), cálculo de todas as
|
||||
isogenias, bastante código novo para curvas sobre :math:`\QQ`, e parte
|
||||
do software "algebraic descent" de Denis Simons.
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
.. math:: y^2+a_1xy+a_3y=x^3+a_2x^2+a_4x+a_6,
|
||||
|
||||
|
||||
- onde os :math:`a_i`'s são coagidos para os parentes de :math:`a_1`.
|
||||
+ onde os :math:`a_i`'s são coagidos para a família de :math:`a_1`.
|
||||
Se todos os :math:`a_i` possuem parente :math:`\ZZ`, então eles são
|
||||
coagidos para :math:`\QQ`.
|
||||
|
||||
diff --git a/doc/pt/tutorial/tour_assignment.rst b/doc/pt/tutorial/tour_assignment.rst
|
||||
--- a/doc/pt/tutorial/tour_assignment.rst
|
||||
+++ b/doc/pt/tutorial/tour_assignment.rst
|
||||
@@ -81,10 +81,9 @@
|
||||
sage: numerical_approx(pi, prec=200)
|
||||
3.1415926535897932384626433832795028841971693993751058209749
|
||||
|
||||
-O Python é uma linguagem "dinâmicamente digitada" (dynamically typed),
|
||||
-portanto o valor referido por cada variável possui um tipo associado a
|
||||
-ele, mas uma variável pode possuir valores de qualquer tipo em
|
||||
-determinado escopo:
|
||||
+O Python é uma linguagem de tipagem dinâmica, portanto o valor
|
||||
+referido por cada variável possui um tipo associado a ele, mas uma
|
||||
+variável pode possuir valores de qualquer tipo em determinado escopo:
|
||||
|
||||
::
|
||||
|
||||
@@ -98,9 +97,9 @@
|
||||
sage: type(a)
|
||||
<type 'str'>
|
||||
|
||||
-A linguagem de programação C, que é "estaticamente digitada"
|
||||
-(statically typed), é muito diferente; uma variável que foi declarada
|
||||
-como int pode apenas armazenar um int em seu escopo.
|
||||
+A linguagem de programação C, que é de tipagem estática , é muito
|
||||
+diferente; uma variável que foi declarada como int pode apenas
|
||||
+armazenar um int em seu escopo.
|
||||
|
||||
Uma potencial fonte de confusão em Python é que um inteiro literal que
|
||||
começa com zero é tratado como um número octal, isto é, um número na
|
||||
diff --git a/doc/pt/tutorial/tour_coercion.rst b/doc/pt/tutorial/tour_coercion.rst
|
||||
--- a/doc/pt/tutorial/tour_coercion.rst
|
||||
+++ b/doc/pt/tutorial/tour_coercion.rst
|
||||
@@ -3,11 +3,11 @@
|
||||
.. _section-coercion:
|
||||
|
||||
============================
|
||||
-Parentes, Conversão e Coação
|
||||
+Famílias, Conversão e Coação
|
||||
============================
|
||||
|
||||
Esta seção pode parecer mais técnica do que as anteriores, mas
|
||||
-acreditamos que é importante entender o significado de parentes e
|
||||
+acreditamos que é importante entender o significado de famílias e
|
||||
coação de modo a usar anéis e outras estruturas algébricas no Sage de
|
||||
forma efetiva e eficiente.
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
``__mul__``, obviamente garantindo que os axiomas de anel são
|
||||
verificados.
|
||||
|
||||
-Como o Python é uma linguagem "strongly typed" (ainda que "dynamically
|
||||
-typed"), poderia-se, pelo menos a princípio, esperar-se que fosse
|
||||
+Como o Python é uma linguagem de tipagem forte (ainda que de tipagem
|
||||
+dinâmica), poderia-se, pelo menos a princípio, esperar-se que fosse
|
||||
implementado em Python uma classe para cada anel. No final das contas,
|
||||
o Python contém um tipo ``<int>`` para os inteiros, um tipo
|
||||
``<float>`` para os reais, e assim por diante. Mas essa estratégia
|
||||
@@ -87,7 +87,7 @@
|
||||
Univariate Polynomial Ring in c over Integer Ring (using NTL)
|
||||
|
||||
|
||||
-Parentes e Categorias
|
||||
+Famílias e Categorias
|
||||
---------------------
|
||||
|
||||
De forma similar à hierarquia de classes em Python voltada para
|
||||
@@ -137,10 +137,9 @@
|
||||
gerais independentemente de uma implementação específica nas
|
||||
categorias.
|
||||
|
||||
-Estruturas parentes em Sage são supostamente objetos únicos em Python.
|
||||
-Por exemplo, uma vez que um anel de polinômios sobre um certo anel
|
||||
-base e com uma certa lista de geradores é criada, o resultado é
|
||||
-arquivado:
|
||||
+Estruturas da mesma família em Sage são supostamente objetos únicos em
|
||||
+Python. Por exemplo, uma vez que um anel de polinômios sobre um certo anel
|
||||
+base e com uma certa lista de geradores é criada, o resultado é arquivado:
|
||||
|
||||
::
|
||||
|
||||
@@ -163,7 +162,7 @@
|
||||
sage: isinstance(M, RingElement)
|
||||
True
|
||||
|
||||
-Enquanto *parentes* são únicos, elementos iguais de um parente em Sage
|
||||
+Enquanto *famílias* são únicas, elementos iguais de uma família em Sage
|
||||
não são necessariamente idênticos. Isso contrasta com o comportamento
|
||||
do Python para alguns (embora não todos) inteiros:
|
||||
|
||||
@@ -177,7 +176,7 @@
|
||||
False
|
||||
|
||||
É importante observar que elementos de anéis diferentes em geral não
|
||||
-podem ser distinguidos pelos seus tipos, mas sim por seus parentes:
|
||||
+podem ser distinguidos pelos seus tipos, mas sim por sua família:
|
||||
|
||||
::
|
||||
|
||||
@@ -203,7 +202,7 @@
|
||||
O leitor pode conhecer as noções de *conversão de tipo* e *coação de
|
||||
tipo* como na linguagem C, por exemplo. Existem noções de *conversão*
|
||||
e *coação* em Sage também. Mas as noções em Sage são centradas em
|
||||
-*parentes*, não em tipos. Então, por favor não confunda conversão de
|
||||
+*família*, não em tipos. Então, por favor não confunda conversão de
|
||||
tipo em C com conversão em Sage!
|
||||
|
||||
Aqui se encontra uma breve apresentação. Para uma descrição detalhada
|
||||
@@ -227,12 +226,12 @@
|
||||
permitidas. O elemento neutro da multiplicação existe em todos os
|
||||
corpos e em vários anéis, e eles devem ser todos iguais.
|
||||
|
||||
-O Sage faz uma concessão. Se ``P1`` e ``P2`` são estruturas parentes e
|
||||
-``p1`` é um elemento de ``P1``, então o usuário pode explicitamente
|
||||
-perguntar por uma interpretação de ``p1`` em ``P2``. Isso pode não
|
||||
-fazer sentido em todos os casos ou não estar definido para todos os
|
||||
-elementos de ``P1``, e fica a cargo do usuário assegurar que isso faz
|
||||
-sentido. Nos referimos a isso como **conversão**:
|
||||
+O Sage faz uma concessão. Se ``P1`` e ``P2`` são estruturas da mesma família
|
||||
+e ``p1`` é um elemento de ``P1``, então o usuário pode explicitamente
|
||||
+perguntar por uma interpretação de ``p1`` em ``P2``. Isso pode não fazer
|
||||
+sentido em todos os casos ou não estar definido para todos os elementos de
|
||||
+``P1``, e fica a cargo do usuário assegurar que isso faz sentido. Nos
|
||||
+referimos a isso como **conversão**:
|
||||
|
||||
::
|
||||
|
||||
@@ -283,7 +282,7 @@
|
||||
sage: R2(y)
|
||||
y
|
||||
|
||||
-Se não existir homomorfismo de anel que preserve nomes, coerção não é
|
||||
+Se não existir homomorfismo de anel que preserve nomes, coação não é
|
||||
definida. Todavia, conversão pode ainda ser possível, a saber,
|
||||
mapeando geradores de anel de acordo com sua posição da lista de
|
||||
geradores:
|
||||
@@ -309,7 +308,7 @@
|
||||
Se houver coação, ela será usada para comparar elementos de anéis
|
||||
diferentes ou fazer aritmética. Isso é frequentemente conveniente, mas
|
||||
o usuário deve estar ciente que estender a relação ``==`` além das
|
||||
-fronteiras de parentes diferentes pode facilmente resultar em
|
||||
+fronteiras de famílias diferentes pode facilmente resultar em
|
||||
problemas. Por exemplo, enquanto ``==`` é supostamente uma relação de
|
||||
equivalência sobre os elementos de *um* anel, isso não é
|
||||
necessariamente o caso se anéis *diferentes* estão envolvidos. Por
|
||||
@@ -360,7 +359,7 @@
|
||||
sage: 1/10^200+1/10^100 == 1/10^100
|
||||
False
|
||||
|
||||
-Quando se compara elementos de dois parentes ``P1`` e ``P2``, é
|
||||
+Quando se compara elementos de duas famílias ``P1`` e ``P2``, é
|
||||
possível que não haja coação entre os dois anéis, mas existe uma
|
||||
escolha canônica de um parente ``P3`` de modo que tanto ``P1`` como
|
||||
``P2`` são coagidos em ``P3``. Nesse caso, coação vai ocorrer também.
|
||||
@@ -381,7 +380,7 @@
|
||||
Note que a princípio o resultado deveria também fazer sentido no
|
||||
corpo de frações de ``ZZ['x']``. Todavia, o Sage tenta escolher um
|
||||
parente *canônico* comum que parece ser o mais natural (``QQ['x']`` no
|
||||
-nosso exemplo). Se vários potenciais parentes comuns parecem
|
||||
+nosso exemplo). Se várias famílias potencialmente comuns parecem
|
||||
igualmente naturais, o Sage *não* vai escolher um deles
|
||||
aleatoriamente. Os mecanismos sobre os quais essa escolha se baseia é
|
||||
explicado em um `arquivo tutorial
|
||||
@@ -401,5 +400,5 @@
|
||||
A razão é que o Sage não escolhe um dos potenciais candidatos
|
||||
``QQ['x']['y']``, ``QQ['y']['x']``, ``QQ['x','y']`` ou
|
||||
``QQ['y','x']``, porque todas essas estruturas combinadas em pares
|
||||
-diferentes parecem ser parentes comuns naturais, e não existe escolha
|
||||
+diferentes parecem ser de famílias comuns naturais, e não existe escolha
|
||||
canônica aparente.
|
Loading…
Add table
Reference in a new issue