Esempio n. 1
0
void IISource::get(Polynomial & x) {
#if 1
  x.setToZero();
  Term t;
  int type = getType();
  bool todo = true;
  if(type==GBInputNumbers::s_IOFUNCTION) {
    pair<bool,Alias<ISource> > pr(queryNamedFunction("Plus"));
    if(pr.first) {
      list<Term> L;
      while(!pr.second.access().eoi()) {
        pr.second.access().get(t);
        L.push_back(t);
      }
      x.setWithList(L);
      todo = false;
    };
  };
  if(todo) {
    Term t;
    get(t);
    x = t;
    todo = false;
  };
#else
  DBG();
#endif
};
Esempio n. 2
0
void GrbSource::get(Polynomial& x) {
  x.setToZero();
  Term t;
  char c;
  d_so.peekCharacter(c,"\n *");
  list<Term> L;
  while(c!=';') {
    get(t);
    L.push_back(t);
    d_so.peekCharacter(c,"\n *");
  };
  x.setWithList(L);
  d_so.passCharacter();
  if(x.zero()) d_eoi = true;
};