File: reducedgb-marked.hpp

package info (click to toggle)
macaulay2 1.21%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 133,096 kB
  • sloc: cpp: 110,377; ansic: 16,306; javascript: 4,193; makefile: 3,821; sh: 3,580; lisp: 764; yacc: 590; xml: 177; python: 140; perl: 114; lex: 65; awk: 3
file content (76 lines) | stat: -rw-r--r-- 2,322 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 2005, Michael E. Stillman

#ifndef _marked_gb_
#define _marked_gb_

#include "reducedgb.hpp"

// Marked GB's: for now, they must be defined over a polynomial ring
// with no quotient elements, and the base must be field.
// AND the monomial order needs to be a term order.
//
// Sorting is NOT done

/**
    @ingroup reducedgb

    @brief Computation of a reduced GB w.r.t. a marked ordering.
*/
class MarkedGB : public ReducedGB
{
  friend ReducedGB *ReducedGB::create(const PolynomialRing *originalR0,
                                      const FreeModule *F0,
                                      const FreeModule *Fsyz0,
                                      const GBWeight *wt0);

 protected:
  MonomialTable *T;
  gbvector **leadterms;  // these point into the corresponding terms for 'polys'

  MarkedGB(const PolynomialRing *originalR0,
           const FreeModule *F0,
           const FreeModule *Fsyz0);

  void auto_reduce();

 public:
  static MarkedGB *create(const PolynomialRing *originalR0,
                          const FreeModule *F0,
                          const FreeModule *Fsyz0);

  virtual ~MarkedGB();

  virtual void remove_gb() {}
  const FreeModule *get_ambient_FreeModule() const { return F; }
  const GBRing *get_gb_ring() const { return R; }
  virtual void set_gb(VECTOR(POLY) & polys0);

  virtual void add_marked_elems(const VECTOR(gbvector *) & leadterms,
                                const VECTOR(POLY) & polys0,
                                bool auto_reduced);

  void marked_remainder(POLY &f,
                        bool use_denom,
                        ring_elem &denom,
                        gbvector *marked_lead_term);
  // Do not reduce the marked_lead_term.  The coefficient of this term might be
  // modified.
  // But it will still point to the same gbvector node.

  virtual void remainder(POLY &f, bool use_denom, ring_elem &denom);

  virtual void remainder(gbvector *&f, bool use_denom, ring_elem &denom);

  void geo_remainder(gbvector *&f, bool use_denom, ring_elem &denom);

  virtual const Matrix /* or null */ *get_initial(int nparts);

  virtual const Matrix /* or null */ *get_parallel_lead_terms(M2_arrayint w);
};

#endif

// Local Variables:
// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
// indent-tabs-mode: nil
// End: