Macaulay2 Engine
Loading...
Searching...
No Matches
matrix-con.hpp
Go to the documentation of this file.
1#ifndef matrixcon_hpp_
2#define matrixcon_hpp_
3
36
37#include <vector>
38#include "ring.hpp"
39#include <utility>
40
41class MatrixGenerator;
42
60{
61 const Ring *R;
62 VECTOR(vec) entries;
64 const FreeModule *cols; // If cols is given at the beginning, this is used.
65 // If this is immutable, no changes are allowed, other than to replace the
66 // entire thing.
67
68 bool cols_frozen; // Once this is set, no more modifications to the 'cols'
69 // are allowed. In particular, if the 'source' is set at
70 // the beginning via the constructor, and that free module is
71 // immutable, then no more changes are allowed.
72
74
75 void compute_column_degree(int i);
76
77 public:
79 MatrixConstructor(const FreeModule *target, int ncols);
80 MatrixConstructor(const FreeModule *target,
81 const FreeModule *source,
82 const_monomial deg = nullptr);
83
84 // The copy constructor just does the default thing: copy over all items.
85
86 void append(vec v);
87 void append(vec v, const_monomial deg);
88
89 void set_entry(int r, int c, ring_elem a);
90 void set_column(int c, vec v);
91
92 void compute_column_degrees(); /* Takes into account the matrix degree */
93
95
97
99
100 void debugDisplay() const;
101};
102
103#endif
104
105// Local Variables:
106// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
107// indent-tabs-mode: nil
108// End:
Engine-side free module R^n over a Ring.
Definition freemod.hpp:66
const Ring * R
void compute_column_degree(int i)
const FreeModule * rows
const FreeModule * cols
Matrix * to_matrix()
void compute_column_degrees()
void set_column_degree(int i, const_monomial deg)
void append(vec v)
void set_entry(int r, int c, ring_elem a)
void debugDisplay() const
void set_matrix_degree(const_monomial deg)
void set_column(int c, vec v)
VECTOR(vec) entries
const_monomial deg
xxx xxx xxx
Definition ring.hpp:102
#define Matrix
Definition factory.cpp:14
const int * const_monomial
Definition imonorder.hpp:45
Ring — the legacy abstract base class for every coefficient and polynomial ring.