1997 PrintS(
"Hilbert Series:\n 0\n");
2000 int (*POS)(ideal, poly, std::vector<ideal>, std::vector<poly>, int, int);
2003 Print(
"\nTruncation degree = %d\n",trunDegHs);
2012 WerrorS(
"wrong input: it is not an infinitely gen. case");
2021 std::vector<ideal > idorb;
2022 std::vector< poly > polist;
2024 ideal orb_init =
idInit(1, 1);
2025 idorb.push_back(orb_init);
2029 std::vector< std::vector<int> > posMat;
2030 std::vector<int> posRow(lV,0);
2034 unsigned long lpcnt = 0;
2039 while(lpcnt < idorb.size())
2043 if(lpcnt >= 1 &&
idIs0(idorb[lpcnt]) ==
FALSE)
2060 for(is = 1; is <= lV; is++)
2081 ps = (*POS)(Jwi, wi, idorb, polist, trInd, trunDegHs);
2085 posRow[is-1] = idorb.size();
2087 idorb.push_back(Jwi);
2088 polist.push_back(wi);
2097 posMat.push_back(posRow);
2098 posRow.resize(lV,0);
2103 Print(
"\nlength of the Orbit = %d", lO);
2108 Print(
"words description of the Orbit: \n");
2109 for(is = 0; is < lO; is++)
2115 PrintS(
"\nmaximal degree, #(sum_j R(w,w_j))");
2117 for(is = 0; is < lO; is++)
2119 if(
idIs0(idorb[is]))
2130 for(is = idorb.size()-1; is >= 0; is--)
2134 for(is = polist.size()-1; is >= 0; is--)
2142 int adjMatrix[lO][lO];
2143 memset(adjMatrix, 0, lO*lO*
sizeof(
int));
2144 int rowCount, colCount;
2148 for(rowCount = 0; rowCount < lO; rowCount++)
2150 for(colCount = 0; colCount < lV; colCount++)
2152 tm = posMat[rowCount][colCount];
2153 adjMatrix[rowCount][tm] = adjMatrix[rowCount][tm] + 1;
2164 tt=(
char**)
omAlloc(
sizeof(
char*));
2170 tt=(
char**)
omalloc(lV*
sizeof(
char*));
2171 for(is = 0; is < lV; is++)
2173 tt[is] = (
char*)
omAlloc(7*
sizeof(
char));
2174 sprintf (tt[is],
"t%d", is+1);
2181 char** xx = (
char**)
omAlloc(
sizeof(
char*));
2194 for(rowCount = 0; rowCount < lO; rowCount++)
2196 for(colCount = 0; colCount < lO; colCount++)
2198 if(adjMatrix[rowCount][colCount] != 0)
2200 MATELEM(mR, rowCount + 1, colCount + 1) =
p_ISet(adjMatrix[rowCount][colCount],
R);
2208 for(rowCount = 0; rowCount < lO; rowCount++)
2210 for(colCount = 0; colCount < lV; colCount++)
2215 MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1)=
p_Add_q(rc,
MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1),
R);
2220 for(rowCount = 0; rowCount < lO; rowCount++)
2222 if(C[rowCount] != 0)
2236 PrintS(
"\nlinear system:\n");
2239 for(rowCount = 0; rowCount < lO; rowCount++)
2241 Print(
"H(%d) = ", rowCount+1);
2242 for(colCount = 0; colCount < lV; colCount++)
2247 Print(
"H(%d) + ", posMat[rowCount][colCount] + 1);
2249 Print(
" %d\n", C[rowCount] );
2251 PrintS(
"where H(1) represents the series corresp. to input ideal\n");
2252 PrintS(
"and i^th summand in the rhs of an eqn. is according\n");
2253 PrintS(
"to the right colon map corresp. to the i^th variable\n");
2257 for(rowCount = 0; rowCount < lO; rowCount++)
2259 Print(
"H(%d) = ", rowCount+1);
2260 for(colCount = 0; colCount < lV; colCount++)
2265 Print(
"H(%d) + ", posMat[rowCount][colCount] + 1);
2267 Print(
" %d\n", C[rowCount] );
2269 PrintS(
"where H(1) represents the series corresp. to input ideal\n");
2301 Print(
"Hilbert series:");
2310 for(is = lV-1; is >= 0; is--)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE number n_Param(const int iParameter, const coeffs r)
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1....
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
const CanonicalForm int s
void WerrorS(const char *s)
static int positionInOrbitTruncationCase(ideal I, poly w, std::vector< ideal > idorb, std::vector< poly > polist, int, int trunDegHs)
static ideal colonIdeal(ideal S, poly w, int lV, ideal Jwi, int trunDegHs)
static int positionInOrbit_FG_Case(ideal I, poly, std::vector< ideal > idorb, std::vector< poly >, int, int)
static ideal minimalMonomialGenSet(ideal I)
static int positionInOrbit_IG_Case(ideal I, poly w, std::vector< ideal > idorb, std::vector< poly > polist, int trInd, int trunDegHs)
#define idDelete(H)
delete an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
bool unitMatrix(const int n, matrix &unitMat, const ring R)
Creates a new matrix which is the (nxn) unit matrix, and returns true in case of success.
void luDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &uMat, const ring R)
LU-decomposition of a given (m x n)-matrix.
bool luSolveViaLUDecomp(const matrix pMat, const matrix lMat, const matrix uMat, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LU-decompositi...
void mp_Delete(matrix *a, const ring r)
matrix mp_Sub(matrix a, matrix b, const ring R)
matrix mpNew(int r, int c)
create a r x c zero-matrix
#define MATELEM(mat, i, j)
1-based access to matrix
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
The main handler for Singular numbers which are suitable for Singular polynomials.
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly p_Add_q(poly p, poly q, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
static number p_SetCoeff(poly p, number n, ring r)
static long p_Totaldegree(poly p, const ring r)
void rChangeCurrRing(ring r)
#define pCopy(p)
return a copy of the poly
void StringSetS(const char *st)
void PrintS(const char *s)
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
ideal idInit(int idsize, int rank)
initialise an ideal / module
struct for passing initialization parameters to naInitChar