1985 PrintS(
"Hilbert Series:\n 0\n");
1988 int (*POS)(ideal, poly, std::vector<ideal>, std::vector<poly>, int, int);
1991 Print(
"\nTruncation degree = %d\n",trunDegHs);
2000 WerrorS(
"wrong input: it is not an infinitely gen. case");
2009 std::vector<ideal > idorb;
2010 std::vector< poly > polist;
2012 ideal orb_init =
idInit(1, 1);
2013 idorb.push_back(orb_init);
2017 std::vector< std::vector<int> > posMat;
2018 std::vector<int> posRow(lV,0);
2027 while(lpcnt < idorb.size())
2031 if(lpcnt >= 1 &&
idIs0(idorb[lpcnt]) ==
FALSE)
2048 for(is = 1; is <= lV; is++)
2069 ps = (*POS)(Jwi, wi, idorb, polist, trInd, trunDegHs);
2073 posRow[is-1] = idorb.size();
2075 idorb.push_back(Jwi);
2076 polist.push_back(wi);
2085 posMat.push_back(posRow);
2086 posRow.resize(lV,0);
2091 Print(
"\nlength of the Orbit = %d", lO);
2096 Print(
"words description of the Orbit: \n");
2097 for(is = 0; is < lO; is++)
2103 PrintS(
"\nmaximal degree, #(sum_j R(w,w_j))");
2105 for(is = 0; is < lO; is++)
2107 if(
idIs0(idorb[is]))
2118 for(is = idorb.size()-1; is >= 0; is--)
2122 for(is = polist.size()-1; is >= 0; is--)
2130 int adjMatrix[lO][lO];
2131 memset(adjMatrix, 0, lO*lO*
sizeof(
int));
2132 int rowCount, colCount;
2136 for(rowCount = 0; rowCount < lO; rowCount++)
2138 for(colCount = 0; colCount < lV; colCount++)
2140 tm = posMat[rowCount][colCount];
2141 adjMatrix[rowCount][tm] = adjMatrix[rowCount][tm] + 1;
2152 tt=(
char**)
omAlloc(
sizeof(
char*));
2158 tt=(
char**)
omalloc(lV*
sizeof(
char*));
2159 for(is = 0; is < lV; is++)
2161 tt[is] = (
char*)
omAlloc(7*
sizeof(
char));
2162 sprintf (tt[is],
"t%d", is+1);
2169 char** xx = (
char**)
omAlloc(
sizeof(
char*));
2182 for(rowCount = 0; rowCount < lO; rowCount++)
2184 for(colCount = 0; colCount < lO; colCount++)
2186 if(adjMatrix[rowCount][colCount] != 0)
2188 MATELEM(mR, rowCount + 1, colCount + 1) =
p_ISet(adjMatrix[rowCount][colCount],
R);
2196 for(rowCount = 0; rowCount < lO; rowCount++)
2198 for(colCount = 0; colCount < lV; colCount++)
2203 MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1)=
p_Add_q(rc,
MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1),
R);
2208 for(rowCount = 0; rowCount < lO; rowCount++)
2210 if(C[rowCount] != 0)
2224 PrintS(
"\nlinear system:\n");
2227 for(rowCount = 0; rowCount < lO; rowCount++)
2229 Print(
"H(%d) = ", rowCount+1);
2230 for(colCount = 0; colCount < lV; colCount++)
2235 Print(
"H(%d) + ", posMat[rowCount][colCount] + 1);
2237 Print(
" %d\n", C[rowCount] );
2239 PrintS(
"where H(1) represents the series corresp. to input ideal\n");
2240 PrintS(
"and i^th summand in the rhs of an eqn. is according\n");
2241 PrintS(
"to the right colon map corresp. to the i^th variable\n");
2245 for(rowCount = 0; rowCount < lO; rowCount++)
2247 Print(
"H(%d) = ", rowCount+1);
2248 for(colCount = 0; colCount < lV; colCount++)
2253 Print(
"H(%d) + ", posMat[rowCount][colCount] + 1);
2255 Print(
" %d\n", C[rowCount] );
2257 PrintS(
"where H(1) represents the series corresp. to input ideal\n");
2289 Print(
"Hilbert series:");
2298 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)
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