bridge/class-master/depend/pari/src/basemath/qfisom.c
/* calculates the scalar products of the vector w with the base vectors
 * v[b[I]] down to v[b[I-dep+1]] with respect to all invariant forms and puts
 * them on scpvec  */
calculates the scalar products of the vector w with the base vectors
v[b[I]] down to v[b[I-dep+1]] with respect to all invariant forms and puts
them on scpvec
calculates the scalar products of the vector w with the base vectors v [ b [ I ]] down to v [ b [ I - dep + 1 ]] with respect to all invariant forms and puts them on scpvec
static GEN
scpvector(GEN w, GEN b, long I, long dep, GEN v)
{
  long  i, j, n = lg(v)-1;
  GEN scpvec = zero_Flv(dep*n);
  for (i = I; i >= 1  &&  i > I-dep; --i)
  {
    long bi = b[i];
    if (bi > 0)
      for (j = 1; j <= n; ++j)
        scpvec[1+(j-1)*dep + I-i] = zv_dotproduct(w, gmael(v,j,bi));
    else
      for (j = 1; j <= n; ++j)
        scpvec[1+(j-1)*dep + I-i] = -zv_dotproduct(w, gmael(v,j,-bi));
  }
  return scpvec;
}
static GEN scpvector ( GEN w , GEN b , long I , long dep , GEN v ) { long i , j , n = lg ( v ) - 1 ; GEN scpvec = zero_Flv ( dep * n ) ; for ( i = I ; i >= 1 && i > I - dep ; -- i ) { long bi = b [ i ] ; if ( bi > 0 ) for ( j = 1 ; j <= n ; ++ j ) scpvec [ 1 + ( j - 1 ) * dep + I - i ] = zv_dotproduct ( w , gmael ( v , j , bi ) ) ; else for ( j = 1 ; j <= n ; ++ j ) scpvec [ 1 + ( j - 1 ) * dep + I - i ] = - zv_dotproduct ( w , gmael ( v , j , - bi ) ) ; } return scpvec ; }
calculates the scalar products of the vector w with the base vectors
 v[b[I]] down to v[b[I-dep+1]] with respect to all invariant forms and puts
 them on scpvec
calculates the scalar products of the vector w with the base vectors v [ b [ I ]] down to v [ b [ I - dep + 1 ]] with respect to all invariant forms and puts them on scpvec