bridge/class-master/depend/pari/src/modules/algebras.c
/* remove entries with Hasse invariant 0 */
remove entries with Hasse invariant 0
remove entries with Hasse invariant 0
static GEN
hassereduce(GEN hf)
{
  GEN pr,h, PR = gel(hf,1), H = gel(hf,2);
  long i, j, l = lg(PR);
  pr= cgetg(l, t_VEC);
  h = cgetg(l, t_VECSMALL);
  for (i = j = 1; i < l; i++)
    if (H[i]) {
      gel(pr,j) = gel(PR,i);
      h[j] = H[i]; j++;
    }
  setlg(pr,j);
  setlg(h,j); return mkvec2(pr,h);
}
static GEN hassereduce ( GEN hf ) { GEN pr , h , PR = gel ( hf , 1 ) , H = gel ( hf , 2 ) ; long i , j , l = lg ( PR ) ; pr = cgetg ( l , t_VEC ) ; h = cgetg ( l , t_VECSMALL ) ; for ( i = j = 1 ; i < l ; i ++ ) if ( H [ i ] ) { gel ( pr , j ) = gel ( PR , i ) ; h [ j ] = H [ i ] ; j ++ ; } setlg ( pr , j ) ; setlg ( h , j ) ; return mkvec2 ( pr , h ) ; }
remove entries with Hasse invariant 0
remove entries with Hasse invariant 0