source: git/ntl/doc/mat_lzz_p.txt @ 16055bd

fieker-DuValspielwiese
Last change on this file since 16055bd was 2cfffe, checked in by Hans Schönemann <hannes@…>, 22 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.1 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 "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 mul(mat_zz_p& X, const mat_zz_p& A, const mat_zz_p& B);
27// X = A * B
28
29void mul(vec_zz_p& x, const mat_zz_p& A, const vec_zz_p& b);
30// x = A * b
31
32void mul(vec_zz_p& x, const vec_zz_p& a, const mat_zz_p& B);
33// x = a * B
34
35void mul(mat_zz_p& X, const mat_zz_p& A, zz_p b);
36void mul(mat_zz_p& X, const mat_zz_p& A, long b);
37// X = A * b
38
39void mul(mat_zz_p& X, zz_p a, const mat_zz_p& B);
40void mul(mat_zz_p& X, long a, const mat_zz_p& B);
41// X = a * B
42
43
44void determinant(zz_p& d, const mat_zz_p& A);
45zz_p determinant(const mat_zz_p& a);
46// d = determinant(A)
47
48
49void transpose(mat_zz_p& X, const mat_zz_p& A);
50mat_zz_p transpose(const mat_zz_p& A);
51// X = transpose of A
52
53void solve(zz_p& d, vec_zz_p& X,
54           const mat_zz_p& A, const vec_zz_p& b);
55// A is an n x n matrix, b is a length n vector.  Computes d =
56// determinant(A).  If d != 0, solves x*A = b.
57
58void inv(zz_p& d, mat_zz_p& X, const mat_zz_p& A);
59// A is an n x n matrix.  Computes d = determinant(A).  If d != 0,
60// computes X = A^{-1}.
61
62void sqr(mat_zz_p& X, const mat_zz_p& A);
63mat_zz_p sqr(const mat_zz_p& A);
64// X = A*A   
65
66void inv(mat_zz_p& X, const mat_zz_p& A);
67mat_zz_p inv(const mat_zz_p& A);
68// X = A^{-1}; error is raised if A is  singular
69
70void power(mat_zz_p& X, const mat_zz_p& A, const ZZ& e);
71mat_zz_p power(const mat_zz_p& A, const ZZ& e);
72
73void power(mat_zz_p& X, const mat_zz_p& A, long e);
74mat_zz_p power(const mat_zz_p& A, long e);
75// X = A^e; e may be negative (in which case A must be nonsingular).
76
77
78void ident(mat_zz_p& X, long n);
79mat_zz_p ident_mat_zz_p(long n);
80// X = n x n identity matrix
81
82long IsIdent(const mat_zz_p& A, long n);
83// test if A is the n x n identity matrix
84
85void diag(mat_zz_p& X, long n, zz_p d);
86mat_zz_p diag(long n, zz_p d);
87// X = n x n diagonal matrix with d on diagonal
88
89long IsDiag(const mat_zz_p& A, long n, zz_p d);
90// test if X is an  n x n diagonal matrix with d on diagonal
91
92
93
94long gauss(mat_zz_p& M);
95long gauss(mat_zz_p& M, long w);
96// Performs unitary row operations so as to bring M into row echelon
97// form.  If the optional argument w is supplied, stops when first w
98// columns are in echelon form.  The return value is the rank (or the
99// rank of the first w columns).
100
101void image(mat_zz_p& X, const mat_zz_p& A);
102// The rows of X are computed as basis of A's row space.  X is is row
103// echelon form
104
105void kernel(mat_zz_p& X, const mat_zz_p& A);
106// Computes a basis for the kernel of the map x -> x*A. where x is a
107// row vector.
108
109
110
111// miscellaneous:
112
113void clear(mat_zz_p& a);
114// x = 0 (dimension unchanged)
115
116long IsZero(const mat_zz_p& a);
117// test if a is the zero matrix (any dimension)
118
119
120// operator notation:
121
122mat_zz_p operator+(const mat_zz_p& a, const mat_zz_p& b);
123mat_zz_p operator-(const mat_zz_p& a, const mat_zz_p& b);
124mat_zz_p operator*(const mat_zz_p& a, const mat_zz_p& b);
125
126mat_zz_p operator-(const mat_zz_p& a);
127
128
129// matrix/scalar multiplication:
130
131mat_zz_p operator*(const mat_zz_p& a, zz_p b);
132mat_zz_p operator*(const mat_zz_p& a, long b);
133
134mat_zz_p operator*(zz_p a, const mat_zz_p& b);
135mat_zz_p operator*(long a, const mat_zz_p& b);
136
137
138// matrix/vector multiplication:
139
140vec_zz_p operator*(const mat_zz_p& a, const vec_zz_p& b);
141
142vec_zz_p operator*(const vec_zz_p& a, const mat_zz_p& b);
143
144
145// assignment operator notation:
146
147mat_zz_p& operator+=(mat_zz_p& x, const mat_zz_p& a);
148mat_zz_p& operator-=(mat_zz_p& x, const mat_zz_p& a);
149mat_zz_p& operator*=(mat_zz_p& x, const mat_zz_p& a);
150
151mat_zz_p& operator*=(mat_zz_p& x, zz_p a);
152mat_zz_p& operator*=(mat_zz_p& x, long a);
153
154vec_zz_p& operator*=(vec_zz_p& x, const mat_zz_p& a);
155
156
Note: See TracBrowser for help on using the repository browser.