source: git/ntl/doc/mat_ZZ_p.txt @ 6ce030f

spielwiese
Last change on this file since 6ce030f was 2cfffe, checked in by Hans Schönemann <hannes@…>, 21 years ago
This commit was generated by cvs2svn to compensate for changes in r6316, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@6317 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.2 KB
Line 
1
2/**************************************************************************\
3
4MODULE: mat_ZZ_p
5
6SUMMARY:
7
8Defines the class mat_ZZ_p.
9
10\**************************************************************************/
11
12
13#include <NTL/matrix.h>
14#include <NTL/vec_vec_ZZ_p.h>
15
16NTL_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
17NTL_io_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
18NTL_eq_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
19
20void add(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
21// X = A + B
22
23void sub(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
24// X = A - B
25
26void negate(mat_ZZ_p& X, const mat_ZZ_p& A);
27// X = - A
28
29void mul(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
30// X = A * B
31
32void mul(vec_ZZ_p& x, const mat_ZZ_p& A, const vec_ZZ_p& b);
33// x = A * b
34
35void mul(vec_ZZ_p& x, const vec_ZZ_p& a, const mat_ZZ_p& B);
36// x = a * B
37
38void mul(mat_ZZ_p& X, const mat_ZZ_p& A, const ZZ_p& b);
39void mul(mat_ZZ_p& X, const mat_ZZ_p& A, long b);
40// X = A * b
41
42void mul(mat_ZZ_p& X, const ZZ_p& a, const mat_ZZ_p& B);
43void mul(mat_ZZ_p& X, long a, const mat_ZZ_p& B);
44// X = a * B
45
46
47void determinant(ZZ_p& d, const mat_ZZ_p& A);
48ZZ_p determinant(const mat_ZZ_p& a);
49// d = determinant(A)
50
51
52void transpose(mat_ZZ_p& X, const mat_ZZ_p& A);
53mat_ZZ_p transpose(const mat_ZZ_p& A);
54// X = transpose of A
55
56void solve(ZZ_p& d, vec_ZZ_p& X,
57           const mat_ZZ_p& A, const vec_ZZ_p& b);
58// A is an n x n matrix, b is a length n vector.  Computes d =
59// determinant(A).  If d != 0, solves x*A = b.
60
61void inv(ZZ_p& d, mat_ZZ_p& X, const mat_ZZ_p& A);
62// A is an n x n matrix.  Computes d = determinant(A).  If d != 0,
63// computes X = A^{-1}.
64
65void sqr(mat_ZZ_p& X, const mat_ZZ_p& A);
66mat_ZZ_p sqr(const mat_ZZ_p& A);
67// X = A*A   
68
69void inv(mat_ZZ_p& X, const mat_ZZ_p& A);
70mat_ZZ_p inv(const mat_ZZ_p& A);
71// X = A^{-1}; error is raised if A is  singular
72
73void power(mat_ZZ_p& X, const mat_ZZ_p& A, const ZZ& e);
74mat_ZZ_p power(const mat_ZZ_p& A, const ZZ& e);
75
76void power(mat_ZZ_p& X, const mat_ZZ_p& A, long e);
77mat_ZZ_p power(const mat_ZZ_p& A, long e);
78// X = A^e; e may be negative (in which case A must be nonsingular).
79
80void ident(mat_ZZ_p& X, long n);
81mat_ZZ_p ident_mat_ZZ_p(long n);
82// X = n x n identity matrix
83
84long IsIdent(const mat_ZZ_p& A, long n);
85// test if A is the n x n identity matrix
86
87void diag(mat_ZZ_p& X, long n, const ZZ_p& d);
88mat_ZZ_p diag(long n, const ZZ_p& d);
89// X = n x n diagonal matrix with d on diagonal
90
91long IsDiag(const mat_ZZ_p& A, long n, const ZZ_p& d);
92// test if X is an  n x n diagonal matrix with d on diagonal
93
94
95
96
97long gauss(mat_ZZ_p& M);
98long gauss(mat_ZZ_p& M, long w);
99// Performs unitary row operations so as to bring M into row echelon
100// form.  If the optional argument w is supplied, stops when first w
101// columns are in echelon form.  The return value is the rank (or the
102// rank of the first w columns).
103
104void image(mat_ZZ_p& X, const mat_ZZ_p& A);
105// The rows of X are computed as basis of A's row space.  X is is row
106// echelon form
107
108void kernel(mat_ZZ_p& X, const mat_ZZ_p& A);
109// Computes a basis for the kernel of the map x -> x*A. where x is a
110// row vector.
111
112
113
114// miscellaneous:
115
116void clear(mat_ZZ_p& a);
117// x = 0 (dimension unchanged)
118
119long IsZero(const mat_ZZ_p& a);
120// test if a is the zero matrix (any dimension)
121
122
123// operator notation:
124
125mat_ZZ_p operator+(const mat_ZZ_p& a, const mat_ZZ_p& b);
126mat_ZZ_p operator-(const mat_ZZ_p& a, const mat_ZZ_p& b);
127mat_ZZ_p operator*(const mat_ZZ_p& a, const mat_ZZ_p& b);
128
129mat_ZZ_p operator-(const mat_ZZ_p& a);
130
131
132// matrix/scalar multiplication:
133
134mat_ZZ_p operator*(const mat_ZZ_p& a, const ZZ_p& b);
135mat_ZZ_p operator*(const mat_ZZ_p& a, long b);
136
137mat_ZZ_p operator*(const ZZ_p& a, const mat_ZZ_p& b);
138mat_ZZ_p operator*(long a, const mat_ZZ_p& b);
139
140// matrix/vector multiplication:
141
142vec_ZZ_p operator*(const mat_ZZ_p& a, const vec_ZZ_p& b);
143
144vec_ZZ_p operator*(const vec_ZZ_p& a, const mat_ZZ_p& b);
145
146
147// assignment operator notation:
148
149mat_ZZ_p& operator+=(mat_ZZ_p& x, const mat_ZZ_p& a);
150mat_ZZ_p& operator-=(mat_ZZ_p& x, const mat_ZZ_p& a);
151mat_ZZ_p& operator*=(mat_ZZ_p& x, const mat_ZZ_p& a);
152
153mat_ZZ_p& operator*=(mat_ZZ_p& x, const ZZ_p& a);
154mat_ZZ_p& operator*=(mat_ZZ_p& x, long a);
155
156vec_ZZ_p& operator*=(vec_ZZ_p& x, const mat_ZZ_p& a);
157
158
159
Note: See TracBrowser for help on using the repository browser.