Exemple #1
0
poly* Decomp(poly* p)
{   poly* q=copypoly(p);
    freemem(p);
    clrsorted(q);
    set_weight_sorting(grp);
    return decompose_character(Reduce_pol(q));
}
Exemple #2
0
Fichier : lr.c Projet : d4g33z/lie
poly* From_Part_p (poly* p)
{ _index i,j,n_rows=p->nrows,n=p->ncols; poly* result=mkpoly(n_rows,n-1);
  entry** lambda=p->elm; entry** res=result->elm;
  for (i=0; i<n_rows; ++i)
  { result->coef[i]=p->coef[i]; setshared(p->coef[i]); /* copy coefficient */
    for (j=0; j<n-1; ++j) res[i][j]=lambda[i][j]-lambda[i][j+1];
  }
  return Reduce_pol(result);
}
Exemple #3
0
Fichier : lr.c Projet : d4g33z/lie
poly* To_Part_p (poly* p)
{ _index i,n_rows=p->nrows,n=p->ncols; entry** wt=p->elm;
  poly* result=mkpoly(n_rows,n+1); entry** lambda=result->elm;
  for (i=0; i<n_rows; ++i)
  { _index j=n; entry sum=0; 
    result->coef[i]=p->coef[i]; setshared(p->coef[i]);
    while (lambda[i][j]=sum, --j>=0) sum+=wt[i][j];
  }
  return Reduce_pol(result);
}
Exemple #4
0
lie_Index searchterm(poly* p, entry* t)
{ lie_Index l=0, u, len=p->ncols; entry** expon;
  cmpfn_tp cmp=set_ordering(cmpfn,len,defaultgrp);
  if (!issorted(p)) { p=Reduce_pol(p); }
  u=p->nrows; expon=p->elm;
  while (u-l>1)
  { lie_Index m=(u+l)/2; cmp_tp c=(*cmp)(expon[m],t,len);
    if (c<0) u=m;  else if (c>0) l=m+1;  else return m;
  }
  return  l<u && eqrow(expon[l],t,len) ? l : -1;
}
Exemple #5
0
poly* Worbit_p(poly* p)
{ lie_Index i,k=0,l=0,r=p->ncols; poly* result; entry** res;
  p=copypoly(p); for (i=0; i<p->nrows; ++i) make_dominant(p->elm[i]);
  Reduce_pol(p);
  for (i=0; i<p->nrows; ++i)
    if ((l += bigint2entry(Orbitsize(p->elm[i])))<0)
      error ("That's too large an orbit");
  result=mkpoly(l,p->ncols); res=result->elm;
  for (i=0; i<p->nrows; ++i)
  { lie_Index j; matrix* orbit=Weyl_orbit(p->elm[i],NULL); entry** x=orbit->elm;
    for (j=0; j<orbit->nrows; ++j)
    { result->coef[k]=p->coef[i]; setshared(p->coef[i]);
      copyrow(*x++,res[k++],r);
    }
    freemem(orbit);
  }
  assert(k==result->nrows);
  return result; /* not sorted, but rows are unique */
}