source: git/ntl/include/NTL/vec_ZZ_pE.h @ 92c0ac

spielwiese
Last change on this file since 92c0ac was 92c0ac, checked in by Hans Schönemann <hannes@…>, 21 years ago
NTL-5.2 git-svn-id: file:///usr/local/Singular/svn/trunk@6320 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.7 KB
Line 
1
2#ifndef NTL_vec_ZZ_pE__H
3#define NTL_vec_ZZ_pE__H
4
5#include <NTL/ZZ_pE.h>
6
7NTL_OPEN_NNS
8
9
10NTL_vector_decl(ZZ_pE,vec_ZZ_pE)
11
12NTL_io_vector_decl(ZZ_pE,vec_ZZ_pE)
13
14NTL_eq_vector_decl(ZZ_pE,vec_ZZ_pE)
15
16void mul(vec_ZZ_pE& x, const vec_ZZ_pE& a, const ZZ_pE& b);
17inline void mul(vec_ZZ_pE& x, const ZZ_pE& a, const vec_ZZ_pE& b)
18   { mul(x, b, a); }
19
20void mul(vec_ZZ_pE& x, const vec_ZZ_pE& a, const ZZ_p& b);
21inline void mul(vec_ZZ_pE& x, const ZZ_p& a, const vec_ZZ_pE& b)
22   { mul(x, b, a); }
23
24void mul(vec_ZZ_pE& x, const vec_ZZ_pE& a, long b);
25inline void mul(vec_ZZ_pE& x, long a, const vec_ZZ_pE& b)
26   { mul(x, b, a); }
27
28void add(vec_ZZ_pE& x, const vec_ZZ_pE& a, const vec_ZZ_pE& b);
29void sub(vec_ZZ_pE& x, const vec_ZZ_pE& a, const vec_ZZ_pE& b);
30
31void negate(vec_ZZ_pE& x, const vec_ZZ_pE& a);
32
33void clear(vec_ZZ_pE& x);
34
35
36void InnerProduct(ZZ_pE& x, const vec_ZZ_pE& a, const vec_ZZ_pE& b);
37void InnerProduct(ZZ_pE& x, const vec_ZZ_pE& a, const vec_ZZ_pE& b,
38                  long offset);
39
40
41long IsZero(const vec_ZZ_pE& a);
42
43void VectorCopy(vec_ZZ_pE& x, const vec_ZZ_pE& a, long n);
44inline vec_ZZ_pE VectorCopy(const vec_ZZ_pE& a, long n)
45   { vec_ZZ_pE x; VectorCopy(x, a, n); NTL_OPT_RETURN(vec_ZZ_pE, x); }
46
47
48
49vec_ZZ_pE operator+(const vec_ZZ_pE& a, const vec_ZZ_pE& b);
50vec_ZZ_pE operator-(const vec_ZZ_pE& a, const vec_ZZ_pE& b);
51vec_ZZ_pE operator-(const vec_ZZ_pE& a);
52
53inline vec_ZZ_pE operator*(const vec_ZZ_pE& a, const ZZ_pE& b)
54   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
55
56inline vec_ZZ_pE operator*(const vec_ZZ_pE& a, const ZZ_p& b)
57   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
58
59inline vec_ZZ_pE operator*(const vec_ZZ_pE& a, long b)
60   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
61
62inline vec_ZZ_pE operator*(const ZZ_pE& a, const vec_ZZ_pE& b)
63   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
64
65inline vec_ZZ_pE operator*(const ZZ_p& a, const vec_ZZ_pE& b)
66   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
67
68inline vec_ZZ_pE operator*(long a, const vec_ZZ_pE& b)
69   { vec_ZZ_pE x; mul(x, a, b); NTL_OPT_RETURN(vec_ZZ_pE, x); }
70
71
72
73ZZ_pE operator*(const vec_ZZ_pE& a, const vec_ZZ_pE& b);
74
75
76
77// assignment operator notation:
78
79inline vec_ZZ_pE& operator+=(vec_ZZ_pE& x, const vec_ZZ_pE& a)
80{ 
81   add(x, x, a);
82   return x;
83}
84
85inline vec_ZZ_pE& operator-=(vec_ZZ_pE& x, const vec_ZZ_pE& a)
86{ 
87   sub(x, x, a);
88   return x;
89}
90
91inline vec_ZZ_pE& operator*=(vec_ZZ_pE& x, const ZZ_pE& a)
92{ 
93   mul(x, x, a);
94   return x;
95}
96
97inline vec_ZZ_pE& operator*=(vec_ZZ_pE& x, const ZZ_p& a)
98{ 
99   mul(x, x, a);
100   return x;
101}
102
103inline vec_ZZ_pE& operator*=(vec_ZZ_pE& x, long a)
104{ 
105   mul(x, x, a);
106   return x;
107}
108
109NTL_CLOSE_NNS
110
111#endif
Note: See TracBrowser for help on using the repository browser.