コード例 #1
0
ファイル: x-gb.cpp プロジェクト: ChristineJost/M2
Computation /* or null */ *
IM2_GB_set_hilbert_function(Computation *C,
                            const RingElement *h)
{
     try {
          clear_emit_size();
          GBComputation *G = C->cast_to_GBComputation();
          if (G->get_ring()->get_degree_ring() != h->get_ring())
            {
              ERROR("expected Hilbert function hint to be in correct degree ring");
              return 0;
            }
          if (G != 0)
            return G->set_hilbert_function(h);
          ERROR("computation type unknown or not implemented");
          return 0;
     }
     catch (exc::engine_error e) {
          ERROR(e.what());
          return NULL;
     }
}
コード例 #2
0
ファイル: comp-gb-proxy.hpp プロジェクト: AlessandroOneto/M2
 virtual Computation /* or null */ *set_hilbert_function(const RingElement *h)
 { return G->set_hilbert_function(h); }