/usr/include/NTL/mat_ZZ_p.h is in libntl-dev 5.4.2-4.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | #ifndef NTL_mat_ZZ_p__H
#define NTL_mat_ZZ_p__H
#include <NTL/tools.h>
#include <NTL/matrix.h>
#include <NTL/vec_vec_ZZ_p.h>
NTL_OPEN_NNS
NTL_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
NTL_io_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
NTL_eq_matrix_decl(ZZ_p,vec_ZZ_p,vec_vec_ZZ_p,mat_ZZ_p)
void add(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
void sub(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
void negate(mat_ZZ_p& X, const mat_ZZ_p& A);
void mul(mat_ZZ_p& X, const mat_ZZ_p& A, const mat_ZZ_p& B);
void mul(vec_ZZ_p& x, const mat_ZZ_p& A, const vec_ZZ_p& b);
void mul(vec_ZZ_p& x, const vec_ZZ_p& a, const mat_ZZ_p& B);
void mul(mat_ZZ_p& X, const mat_ZZ_p& A, const ZZ_p& b);
void mul(mat_ZZ_p& X, const mat_ZZ_p& A, long b);
inline void mul(mat_ZZ_p& X, const ZZ_p& a, const mat_ZZ_p& B)
{ mul(X, B, a); }
inline void mul(mat_ZZ_p& X, long a, const mat_ZZ_p& B)
{ mul(X, B, a); }
void ident(mat_ZZ_p& X, long n);
inline mat_ZZ_p ident_mat_ZZ_p(long n)
{ mat_ZZ_p X; ident(X, n); NTL_OPT_RETURN(mat_ZZ_p, X); }
void determinant(ZZ_p& d, const mat_ZZ_p& A);
long IsIdent(const mat_ZZ_p& A, long n);
void transpose(mat_ZZ_p& X, const mat_ZZ_p& A);
void solve(ZZ_p& d, vec_ZZ_p& X,
const mat_ZZ_p& A, const vec_ZZ_p& b);
void inv(ZZ_p& d, mat_ZZ_p& X, const mat_ZZ_p& A);
inline void sqr(mat_ZZ_p& X, const mat_ZZ_p& A)
{ mul(X, A, A); }
inline mat_ZZ_p sqr(const mat_ZZ_p& A)
{ mat_ZZ_p X; sqr(X, A); NTL_OPT_RETURN(mat_ZZ_p, X); }
void inv(mat_ZZ_p& X, const mat_ZZ_p& A);
inline mat_ZZ_p inv(const mat_ZZ_p& A)
{ mat_ZZ_p X; inv(X, A); NTL_OPT_RETURN(mat_ZZ_p, X); }
void power(mat_ZZ_p& X, const mat_ZZ_p& A, const ZZ& e);
inline mat_ZZ_p power(const mat_ZZ_p& A, const ZZ& e)
{ mat_ZZ_p X; power(X, A, e); NTL_OPT_RETURN(mat_ZZ_p, X); }
inline void power(mat_ZZ_p& X, const mat_ZZ_p& A, long e)
{ power(X, A, ZZ_expo(e)); }
inline mat_ZZ_p power(const mat_ZZ_p& A, long e)
{ mat_ZZ_p X; power(X, A, e); NTL_OPT_RETURN(mat_ZZ_p, X); }
void diag(mat_ZZ_p& X, long n, const ZZ_p& d);
inline mat_ZZ_p diag(long n, const ZZ_p& d)
{ mat_ZZ_p X; diag(X, n, d); NTL_OPT_RETURN(mat_ZZ_p, X); }
long IsDiag(const mat_ZZ_p& A, long n, const ZZ_p& d);
long gauss(mat_ZZ_p& M);
long gauss(mat_ZZ_p& M, long w);
void image(mat_ZZ_p& X, const mat_ZZ_p& A);
void kernel(mat_ZZ_p& X, const mat_ZZ_p& A);
inline ZZ_p determinant(const mat_ZZ_p& a)
{ ZZ_p x; determinant(x, a); return x; }
// functional variant of determinant
inline mat_ZZ_p transpose(const mat_ZZ_p & a)
{ mat_ZZ_p x; transpose(x, a); NTL_OPT_RETURN(mat_ZZ_p, x); }
void clear(mat_ZZ_p& a);
// x = 0 (dimension unchanged)
long IsZero(const mat_ZZ_p& a);
// test if a is the zero matrix (any dimension)
// operator notation:
mat_ZZ_p operator+(const mat_ZZ_p& a, const mat_ZZ_p& b);
mat_ZZ_p operator-(const mat_ZZ_p& a, const mat_ZZ_p& b);
mat_ZZ_p operator*(const mat_ZZ_p& a, const mat_ZZ_p& b);
mat_ZZ_p operator-(const mat_ZZ_p& a);
// matrix/scalar multiplication:
inline mat_ZZ_p operator*(const mat_ZZ_p& a, const ZZ_p& b)
{ mat_ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(mat_ZZ_p, x); }
inline mat_ZZ_p operator*(const mat_ZZ_p& a, long b)
{ mat_ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(mat_ZZ_p, x); }
inline mat_ZZ_p operator*(const ZZ_p& a, const mat_ZZ_p& b)
{ mat_ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(mat_ZZ_p, x); }
inline mat_ZZ_p operator*(long a, const mat_ZZ_p& b)
{ mat_ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(mat_ZZ_p, x); }
// matrix/vector multiplication:
vec_ZZ_p operator*(const mat_ZZ_p& a, const vec_ZZ_p& b);
vec_ZZ_p operator*(const vec_ZZ_p& a, const mat_ZZ_p& b);
// assignment operator notation:
inline mat_ZZ_p& operator+=(mat_ZZ_p& x, const mat_ZZ_p& a)
{
add(x, x, a);
return x;
}
inline mat_ZZ_p& operator-=(mat_ZZ_p& x, const mat_ZZ_p& a)
{
sub(x, x, a);
return x;
}
inline mat_ZZ_p& operator*=(mat_ZZ_p& x, const mat_ZZ_p& a)
{
mul(x, x, a);
return x;
}
inline mat_ZZ_p& operator*=(mat_ZZ_p& x, const ZZ_p& a)
{
mul(x, x, a);
return x;
}
inline mat_ZZ_p& operator*=(mat_ZZ_p& x, long a)
{
mul(x, x, a);
return x;
}
inline vec_ZZ_p& operator*=(vec_ZZ_p& x, const mat_ZZ_p& a)
{
mul(x, x, a);
return x;
}
NTL_CLOSE_NNS
#endif
|