?? mat_zz_pe.txt
字號:
/**************************************************************************\MODULE: mat_ZZ_pESUMMARY:Defines the class mat_ZZ_pE.\**************************************************************************/#include <NTL/matrix.h>#include <NTL/vec_vec_ZZ_pE.h>NTL_matrix_decl(ZZ_pE,vec_ZZ_pE,vec_vec_ZZ_pE,mat_ZZ_pE)NTL_io_matrix_decl(ZZ_pE,vec_ZZ_pE,vec_vec_ZZ_pE,mat_ZZ_pE)NTL_eq_matrix_decl(ZZ_pE,vec_ZZ_pE,vec_vec_ZZ_pE,mat_ZZ_pE)void add(mat_ZZ_pE& X, const mat_ZZ_pE& A, const mat_ZZ_pE& B); // X = A + Bvoid sub(mat_ZZ_pE& X, const mat_ZZ_pE& A, const mat_ZZ_pE& B); // X = A - Bvoid negate(mat_ZZ_pE& X, const mat_ZZ_pE& A); // X = - Avoid mul(mat_ZZ_pE& X, const mat_ZZ_pE& A, const mat_ZZ_pE& B); // X = A * Bvoid mul(vec_ZZ_pE& x, const mat_ZZ_pE& A, const vec_ZZ_pE& b); // x = A * bvoid mul(vec_ZZ_pE& x, const vec_ZZ_pE& a, const mat_ZZ_pE& B); // x = a * Bvoid mul(mat_ZZ_pE& X, const mat_ZZ_pE& A, const ZZ_pE& b);void mul(mat_ZZ_pE& X, const mat_ZZ_pE& A, const ZZ_p& b);void mul(mat_ZZ_pE& X, const mat_ZZ_pE& A, long b);// X = A * bvoid mul(mat_ZZ_pE& X, const ZZ_pE& a, const mat_ZZ_pE& B);void mul(mat_ZZ_pE& X, const ZZ_p& a, const mat_ZZ_pE& B);void mul(mat_ZZ_pE& X, long a, const mat_ZZ_pE& B);// X = a * Bvoid determinant(ZZ_pE& d, const mat_ZZ_pE& A);ZZ_pE determinant(const mat_ZZ_pE& a); // d = determinant(A)void transpose(mat_ZZ_pE& X, const mat_ZZ_pE& A);mat_ZZ_pE transpose(const mat_ZZ_pE& A);// X = transpose of Avoid solve(ZZ_pE& d, vec_ZZ_pE& X, const mat_ZZ_pE& A, const vec_ZZ_pE& b);// A is an n x n matrix, b is a length n vector. Computes d =// determinant(A). If d != 0, solves x*A = b.void inv(ZZ_pE& d, mat_ZZ_pE& X, const mat_ZZ_pE& A);// A is an n x n matrix. Computes d = determinant(A). If d != 0,// computes X = A^{-1}.void sqr(mat_ZZ_pE& X, const mat_ZZ_pE& A);mat_ZZ_pE sqr(const mat_ZZ_pE& A);// X = A*A void inv(mat_ZZ_pE& X, const mat_ZZ_pE& A);mat_ZZ_pE inv(const mat_ZZ_pE& A);// X = A^{-1}; error is raised if A is singularvoid power(mat_ZZ_pE& X, const mat_ZZ_pE& A, const ZZ& e);mat_ZZ_pE power(const mat_ZZ_pE& A, const ZZ& e);void power(mat_ZZ_pE& X, const mat_ZZ_pE& A, long e);mat_ZZ_pE power(const mat_ZZ_pE& A, long e);// X = A^e; e may be negative (in which case A must be nonsingular).void ident(mat_ZZ_pE& X, long n);mat_ZZ_pE ident_mat_ZZ_pE(long n);// X = n x n identity matrixlong IsIdent(const mat_ZZ_pE& A, long n);// test if A is the n x n identity matrixvoid diag(mat_ZZ_pE& X, long n, const ZZ_pE& d);mat_ZZ_pE diag(long n, const ZZ_pE& d);// X = n x n diagonal matrix with d on diagonallong IsDiag(const mat_ZZ_pE& A, long n, const ZZ_pE& d);// test if X is an n x n diagonal matrix with d on diagonallong gauss(mat_ZZ_pE& M);long gauss(mat_ZZ_pE& M, long w);// Performs unitary row operations so as to bring M into row echelon// form. If the optional argument w is supplied, stops when first w// columns are in echelon form. The return value is the rank (or the// rank of the first w columns).void image(mat_ZZ_pE& X, const mat_ZZ_pE& A);// The rows of X are computed as basis of A's row space. X is is row// echelon formvoid kernel(mat_ZZ_pE& X, const mat_ZZ_pE& A);// Computes a basis for the kernel of the map x -> x*A. where x is a// row vector.// miscellaneous:void clear(mat_ZZ_pE& a);// x = 0 (dimension unchanged)long IsZero(const mat_ZZ_pE& a);// test if a is the zero matrix (any dimension)// operator notation:mat_ZZ_pE operator+(const mat_ZZ_pE& a, const mat_ZZ_pE& b);mat_ZZ_pE operator-(const mat_ZZ_pE& a, const mat_ZZ_pE& b);mat_ZZ_pE operator*(const mat_ZZ_pE& a, const mat_ZZ_pE& b);mat_ZZ_pE operator-(const mat_ZZ_pE& a);// matrix/scalar multiplication:mat_ZZ_pE operator*(const mat_ZZ_pE& a, const ZZ_pE& b);mat_ZZ_pE operator*(const mat_ZZ_pE& a, const ZZ_p& b);mat_ZZ_pE operator*(const mat_ZZ_pE& a, long b);mat_ZZ_pE operator*(const ZZ_pE& a, const mat_ZZ_pE& b);mat_ZZ_pE operator*(const ZZ_p& a, const mat_ZZ_pE& b);mat_ZZ_pE operator*(long a, const mat_ZZ_pE& b);// matrix/vector multiplication:vec_ZZ_pE operator*(const mat_ZZ_pE& a, const vec_ZZ_pE& b);vec_ZZ_pE operator*(const vec_ZZ_pE& a, const mat_ZZ_pE& b);// assignment operator notation:mat_ZZ_pE& operator+=(mat_ZZ_pE& x, const mat_ZZ_pE& a);mat_ZZ_pE& operator-=(mat_ZZ_pE& x, const mat_ZZ_pE& a);mat_ZZ_pE& operator*=(mat_ZZ_pE& x, const mat_ZZ_pE& a);mat_ZZ_pE& operator*=(mat_ZZ_pE& x, const ZZ_pE& a);mat_ZZ_pE& operator*=(mat_ZZ_pE& x, const ZZ_p& a);mat_ZZ_pE& operator*=(mat_ZZ_pE& x, long a);vec_ZZ_pE& operator*=(vec_ZZ_pE& x, const mat_ZZ_pE& a);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -