示例#1
0
void mul(vec_ZZ& x, const mat_ZZ& A, const vec_ZZ& b)
{
    if (&b == &x || A.position1(x) != -1) {
        vec_ZZ tmp;
        mul_aux(tmp, A, b);
        x = tmp;
    }
    else
        mul_aux(x, A, b);
}
示例#2
0
void mul(vec_ZZ& x, const vec_ZZ& a, const mat_ZZ& B)
{
    if (&a == &x) {
        vec_ZZ tmp;
        mul_aux(tmp, a, B);
        x = tmp;
    }
    else
        mul_aux(x, a, B);
}
示例#3
0
void mul(vec_ZZ& x, const mat_ZZ& A, const vec_ZZ& b)  
{  
   if (&b == &x || A.alias(x)) {
      vec_ZZ tmp;
      mul_aux(tmp, A, b);
      x = tmp;
   }
   else
      mul_aux(x, A, b);
}  
示例#4
0
void mul(mat_zz_pE& X, const mat_zz_pE& A, const mat_zz_pE& B)  
{  
   if (&X == &A || &X == &B) {  
      mat_zz_pE tmp;  
      mul_aux(tmp, A, B);  
      X = tmp;  
   }  
   else  
      mul_aux(X, A, B);  
}  
void mul(vec_GF2E& x, const vec_GF2E& a, const mat_GF2E& B)
{
   if (&a == &x) {
      vec_GF2E tmp;
      mul_aux(tmp, a, B);
      x = tmp;
   }
   else
      mul_aux(x, a, B);
}
示例#6
0
void mul(vec_RR& x, const vec_RR& a, const mat_RR& B)
{
   if (&a == &x) {
      vec_RR tmp;
      mul_aux(tmp, a, B);
      x = tmp;
   }
   else
      mul_aux(x, a, B);
}
示例#7
0
void mul(mat_ZZ& X, const mat_ZZ& A, const mat_ZZ& B)
{
    if (&X == &A || &X == &B) {
        mat_ZZ tmp;
        mul_aux(tmp, A, B);
        X = tmp;
    }
    else
        mul_aux(X, A, B);
}
示例#8
0
void mul(vec_GF2& x, const vec_GF2& a, const mat_GF2& B)
{
   if (&a == &x || B.position1(x) != -1) {
      vec_GF2 tmp;
      mul_aux(tmp, a, B);
      x = tmp;
   }
   else
      mul_aux(x, a, B);
}
示例#9
0
void mul_aux(mat_GF2& X, const mat_GF2& A, const mat_GF2& B)
{
   long n = A.NumRows();
   long l = A.NumCols();
   long m = B.NumCols();

   if (l != B.NumRows())
      Error("matrix mul: dimension mismatch");

   X.SetDims(n, m);

   long i;

   for (i = 1; i <= n; i++) {
      mul_aux(X(i), A(i), B);
   }
}
示例#10
0
vec_zz_pE operator*(const vec_zz_pE& a, const mat_zz_pE& b)
{
   vec_zz_pE res;
   mul_aux(res, a, b);
   newNTL_OPT_RETURN(vec_zz_pE, res);
}
mat_ZZ_pE operator*(const mat_ZZ_pE& a, const mat_ZZ_pE& b)
{
   mat_ZZ_pE res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(mat_ZZ_pE, res);
}
示例#12
0
vec_RR operator*(const vec_RR& a, const mat_RR& b)
{
   vec_RR res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(vec_RR, res);
}
示例#13
0
vec_GF2E operator*(const vec_GF2E& a, const mat_GF2E& b)
{
   vec_GF2E res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(vec_GF2E, res);
}
示例#14
0
mat_zz_p operator*(const mat_zz_p& a, const mat_zz_p& b)
{
   mat_zz_p res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(mat_zz_p, res);
}
示例#15
0
vec_GF2 operator*(const vec_GF2& a, const mat_GF2& b)
{
   vec_GF2 res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(vec_GF2, res);
}
示例#16
0
vec_ZZ operator*(const vec_ZZ& a, const mat_ZZ& b)
{
    vec_ZZ res;
    mul_aux(res, a, b);
    NTL_OPT_RETURN(vec_ZZ, res);
}
vec_ZZ_p operator*(const vec_ZZ_p& a, const mat_ZZ_p& b)
{
   vec_ZZ_p res;
   mul_aux(res, a, b);
   NTL_OPT_RETURN(vec_ZZ_p, res);
}