My Project
Loading...
Searching...
No Matches
hutil.h File Reference
#include "polys/monomials/ring.h"
#include "kernel/polys.h"
#include "misc/intvec.h"

Go to the source code of this file.

Data Structures

struct  monh
struct  indlist

Macros

#define LEN_MON   (sizeof(scfmon) + sizeof(int))

Typedefs

typedef int * scmon
typedef scmonscfmon
typedef int * varset
typedef monh * monp
typedef monpmonf
typedef indlist * indset

Functions

void hDelete (scfmon ev, int ev_length)
void hComp (scfmon exist, int Nexist, int ak, scfmon stc, int *Nstc)
void hSupp (scfmon stc, int Nstc, varset var, int *Nvar)
void hOrdSupp (scfmon stc, int Nstc, varset var, int Nvar)
void hStaircase (scfmon stc, int *Nstc, varset var, int Nvar)
void hRadical (scfmon rad, int *Nrad, int Nvar)
void hLexS (scfmon stc, int Nstc, varset var, int Nvar)
void hLexR (scfmon rad, int Nrad, varset var, int Nvar)
void hPure (scfmon stc, int a, int *Nstc, varset var, int Nvar, scmon pure, int *Npure)
void hElimS (scfmon stc, int *e1, int a2, int e2, varset var, int Nvar)
void hElimR (scfmon rad, int *e1, int a2, int e2, varset var, int Nvar)
void hLex2S (scfmon stc, int e1, int a2, int e2, varset var, int Nvar, scfmon w)
void hLex2R (scfmon rad, int e1, int a2, int e2, varset var, int Nvar, scfmon w)
void hStepS (scfmon stc, int Nstc, varset var, int Nvar, int *a, int *x)
void hStepR (scfmon rad, int Nrad, varset var, int Nvar, int *a)
monf hCreate (int Nvar)
void hKill (monf xmem, int Nvar)
scfmon hGetmem (int lm, scfmon old, monp monmem)
scmon hGetpure (scmon p)
void hDimSolve (scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hIndMult (scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hIndAllMult (scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hDegreeSeries (intvec *s1, intvec *s2, int *co, int *mu)
scfmon hInit (ideal S, ideal Q, int *Nexist)
void HilbertSeries_OrbitData (ideal S, int lV, bool ig, bool mgrad, bool odp, int trunDegHs)
ideal RightColonOperation (ideal i, poly w, int lV)

Variables

EXTERN_VAR omBin indlist_bin
EXTERN_VAR scfmon hexist
EXTERN_VAR scfmon hstc
EXTERN_VAR scfmon hrad
EXTERN_VAR scfmon hwork
EXTERN_VAR scmon hpure
EXTERN_VAR scmon hpur0
EXTERN_VAR varset hvar
EXTERN_VAR varset hsel
EXTERN_VAR int hNexist
EXTERN_VAR int hNstc
EXTERN_VAR int hNrad
EXTERN_VAR int hNvar
EXTERN_VAR int hNpure
EXTERN_VAR monf stcmem
EXTERN_VAR monf radmem
EXTERN_VAR int hisModule
EXTERN_VAR indset ISet
EXTERN_VAR indset JSet
EXTERN_VAR int hCo
EXTERN_VAR int hMu2
EXTERN_VAR long hMu

Data Structure Documentation

◆ monrec

struct monrec

Definition at line 21 of file hutil.h.

Data Fields
int a
scfmon mo

◆ sindlist

struct sindlist

Definition at line 29 of file hutil.h.

Data Fields
indset nx
intvec * set

Macro Definition Documentation

◆ LEN_MON

#define LEN_MON   (sizeof(scfmon) + sizeof(int))

Definition at line 35 of file hutil.h.

Typedef Documentation

◆ indset

typedef indlist* indset

Definition at line 28 of file hutil.h.

◆ monf

typedef monp* monf

Definition at line 20 of file hutil.h.

◆ monp

typedef monh* monp

Definition at line 19 of file hutil.h.

◆ scfmon

typedef scmon* scfmon

Definition at line 15 of file hutil.h.

◆ scmon

typedef int* scmon

Definition at line 14 of file hutil.h.

◆ varset

typedef int* varset

Definition at line 16 of file hutil.h.

Function Documentation

◆ hComp()

void hComp ( scfmon exist,
int Nexist,
int ak,
scfmon stc,
int * Nstc )

Definition at line 154 of file hutil.cc.

155{
156 int k = 0;
157 scfmon ex = exist, co = stc;
158 int i;
159
160 for (i = Nexist; i>0; i--)
161 {
162 if (((**ex) == 0) || ((**ex) == ak))
163 {
164 *co = *ex;
165 co++;
166 k++;
167 }
168 ex++;
169 }
170 *Nstc = k;
171}
int i
Definition cfEzgcd.cc:132
int k
Definition cfEzgcd.cc:99
scmon * scfmon
Definition hutil.h:15

◆ hCreate()

monf hCreate ( int Nvar)

Definition at line 996 of file hutil.cc.

997{
998 monf xmem;
999 int i;
1000 xmem = (monf)omAlloc((Nvar + 1) * sizeof(monp));
1001 for (i = Nvar; i>0; i--)
1002 {
1003 xmem[i] = (monp)omAlloc(LEN_MON);
1004 xmem[i]->mo = NULL;
1005 }
1006 return xmem;
1007}
#define LEN_MON
Definition hutil.h:35
monh * monp
Definition hutil.h:19
monp * monf
Definition hutil.h:20
#define omAlloc(size)
#define NULL
Definition omList.c:12

◆ hDegreeSeries()

void hDegreeSeries ( intvec * s1,
intvec * s2,
int * co,
int * mu )

Definition at line 106 of file hilb.cc.

107{
108 int i, j, k;
109 int m;
110 *co = *mu = 0;
111 if ((s1 == NULL) || (s2 == NULL))
112 return;
113 i = s1->length();
114 j = s2->length();
115 if (j > i)
116 return;
117 m = 0;
118 for(k=j-2; k>=0; k--)
119 m += (*s2)[k];
120 *mu = m;
121 *co = i - j;
122}
int m
Definition cfEzgcd.cc:128
int length() const
Definition intvec.h:95
int j
Definition facHensel.cc:110
static matrix mu(matrix A, const ring R)
Definition matpol.cc:2028

◆ hDelete()

void hDelete ( scfmon ev,
int ev_length )

Definition at line 140 of file hutil.cc.

141{
142 int i;
143
144 if (ev_length>0)
145 {
146 for (i=ev_length-1;i>=0;i--)
147 omFreeSize(hsecure[i],((currRing->N)+1)*sizeof(int));
148 omFreeSize(hsecure, ev_length*sizeof(scmon));
149 omFreeSize(ev, ev_length*sizeof(scmon));
150 }
151}
STATIC_VAR scfmon hsecure
Definition hutil.cc:29
int * scmon
Definition hutil.h:14
#define omFreeSize(addr, size)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13

◆ hDimSolve()

void hDimSolve ( scmon pure,
int Npure,
scfmon rad,
int Nrad,
varset var,
int Nvar )

Definition at line 35 of file hdegree.cc.

37{
38 int dn, iv, rad0, b, c, x;
39 scmon pn;
40 scfmon rn;
41 if (Nrad < 2)
42 {
43 dn = Npure + Nrad;
44 if (dn < hCo)
45 hCo = dn;
46 return;
47 }
48 if (Npure+1 >= hCo)
49 return;
50 iv = Nvar;
51 while(pure[var[iv]]) iv--;
52 hStepR(rad, Nrad, var, iv, &rad0);
53 if (rad0!=0)
54 {
55 iv--;
56 if (rad0 < Nrad)
57 {
58 pn = hGetpure(pure);
59 rn = hGetmem(Nrad, rad, radmem[iv]);
60 hDimSolve(pn, Npure + 1, rn, rad0, var, iv);
61 b = rad0;
62 c = Nrad;
63 hElimR(rn, &rad0, b, c, var, iv);
64 hPure(rn, b, &c, var, iv, pn, &x);
65 hLex2R(rn, rad0, b, c, var, iv, hwork);
66 rad0 += (c - b);
67 hDimSolve(pn, Npure + x, rn, rad0, var, iv);
68 }
69 else
70 {
71 hDimSolve(pure, Npure, rad, Nrad, var, iv);
72 }
73 }
74 else
75 hCo = Npure + 1;
76}
Variable x
Definition cfModGcd.cc:4090
CanonicalForm b
Definition cfModGcd.cc:4111
VAR int hCo
Definition hdegree.cc:27
void hDimSolve(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
Definition hdegree.cc:35
scfmon hGetmem(int lm, scfmon old, monp monmem)
Definition hutil.cc:1023
void hPure(scfmon stc, int a, int *Nstc, varset var, int Nvar, scmon pure, int *Npure)
Definition hutil.cc:621
VAR scfmon hwork
Definition hutil.cc:16
void hStepR(scfmon rad, int Nrad, varset var, int Nvar, int *a)
Definition hutil.cc:974
void hLex2R(scfmon rad, int e1, int a2, int e2, varset var, int Nvar, scfmon w)
Definition hutil.cc:880
void hElimR(scfmon rad, int *e1, int a2, int e2, varset var, int Nvar)
Definition hutil.cc:742
VAR monf radmem
Definition hutil.cc:21
scmon hGetpure(scmon p)
Definition hutil.cc:1052

◆ hElimR()

void hElimR ( scfmon rad,
int * e1,
int a2,
int e2,
varset var,
int Nvar )

Definition at line 742 of file hutil.cc.

743{
744 int nc = *e1, z = 0, i, j, k, k1;
745 scmon n, o;
746 if (!nc || (a2 == e2))
747 return;
748 j = 0;
749 i = a2;
750 o = rad[i];
751 n = rad[0];
752 k = Nvar;
753 loop
754 {
755 k1 = var[k];
756 if (o[k1] && !n[k1])
757 {
758 k = Nvar;
759 i++;
760 if (i < e2)
761 o = rad[i];
762 else
763 {
764 j++;
765 if (j < nc)
766 {
767 i = a2;
768 o = rad[i];
769 n = rad[j];
770 }
771 else
772 {
773 if (z!=0)
774 {
775 *e1 -= z;
776 hShrink(rad, 0, nc);
777 }
778 return;
779 }
780 }
781 }
782 else
783 {
784 k--;
785 if (!k)
786 {
787 rad[j] = NULL;
788 z++;
789 j++;
790 if (j < nc)
791 {
792 i = a2;
793 o = rad[i];
794 n = rad[j];
795 k = Nvar;
796 }
797 else
798 {
799 if (z!=0)
800 {
801 *e1 -= z;
802 hShrink(rad, 0, nc);
803 }
804 return;
805 }
806 }
807 }
808 }
809}
static void hShrink(scfmon co, int a, int Nco)
Definition hutil.cc:297
#define loop
Definition structs.h:71

◆ hElimS()

void hElimS ( scfmon stc,
int * e1,
int a2,
int e2,
varset var,
int Nvar )

Definition at line 672 of file hutil.cc.

673{
674 int nc = *e1, z = 0, i, j, k, k1;
675 scmon n, o;
676 if (!nc || (a2 == e2))
677 return;
678 j = 0;
679 i = a2;
680 o = stc[i];
681 n = stc[0];
682 k = Nvar;
683 loop
684 {
685 k1 = var[k];
686 if (o[k1] > n[k1])
687 {
688 k = Nvar;
689 i++;
690 if (i < e2)
691 o = stc[i];
692 else
693 {
694 j++;
695 if (j < nc)
696 {
697 i = a2;
698 o = stc[i];
699 n = stc[j];
700 }
701 else
702 {
703 if (z!=0)
704 {
705 *e1 -= z;
706 hShrink(stc, 0, nc);
707 }
708 return;
709 }
710 }
711 }
712 else
713 {
714 k--;
715 if (k==0)
716 {
717 stc[j] = NULL;
718 z++;
719 j++;
720 if (j < nc)
721 {
722 i = a2;
723 o = stc[i];
724 n = stc[j];
725 k = Nvar;
726 }
727 else
728 {
729 if (z!=0)
730 {
731 *e1 -= z;
732 hShrink(stc, 0, nc);
733 }
734 return;
735 }
736 }
737 }
738 }
739}

◆ hGetmem()

scfmon hGetmem ( int lm,
scfmon old,
monp monmem )

Definition at line 1023 of file hutil.cc.

1024{
1025 scfmon x = monmem->mo;
1026 int lx = monmem->a;
1027 if ((x==NULL) || (lm > lx))
1028 {
1029 /* according to http://www.singular.uni-kl.de:8002/trac/ticket/463#comment:4
1030 * we need to work around a compiler bug:
1031 * if ((x!=NULL)&&(lx>0)) omFreeSize((ADDRESS)x, lx * sizeof(scmon));
1032 */
1033 if (x!=NULL) if (lx>0) omFreeSize((ADDRESS)x, lx * sizeof(scmon));
1034 monmem->mo = x = (scfmon)omAlloc(lm * sizeof(scmon));
1035 monmem->a = lm;
1036 }
1037 memcpy(x, old, lm * sizeof(scmon));
1038 return x;
1039}
void * ADDRESS
Definition auxiliary.h:120

◆ hGetpure()

scmon hGetpure ( scmon p)

Definition at line 1052 of file hutil.cc.

1053{
1054 scmon p1 = p;
1055 scmon pn;
1056 p1++;
1057 pn = p1;
1058 pn += (currRing->N);
1059 memcpy(pn, p1, (currRing->N) * sizeof(int));
1060 return pn - 1;
1061}
int p
Definition cfModGcd.cc:4086

◆ HilbertSeries_OrbitData()

void HilbertSeries_OrbitData ( ideal S,
int lV,
bool ig,
bool mgrad,
bool odp,
int trunDegHs )

Definition at line 770 of file hilb.cc.

771{
772
773 /* new story:
774 no lV is needed, i.e. it is to be determined
775 the rest is extracted from the interface input list in extra.cc and makes the input of this proc
776 called from extra.cc
777 */
778
779 /*
780 * This is based on iterative right colon operations on a
781 * two-sided monomial ideal of the free associative algebra.
782 * The algorithm terminates for those monomial ideals
783 * whose monomials define "regular formal languages",
784 * that is, all monomials of the input ideal can be obtained
785 * from finite languages by applying finite number of
786 * rational operations.
787 */
788
789 int trInd;
791 if( !idIs0(S) && p_Totaldegree(S->m[0], currRing)==0)
792 {
793 PrintS("Hilbert Series:\n 0\n");
794 return;
795 }
796 int (*POS)(ideal, poly, std::vector<ideal>, std::vector<poly>, int, int);
797 if(trunDegHs != 0)
798 {
799 Print("\nTruncation degree = %d\n",trunDegHs);
801 }
802 else
803 {
804 if(IG_CASE)
805 {
806 if(idIs0(S))
807 {
808 WerrorS("wrong input: it is not an infinitely gen. case");
809 return;
810 }
811 trInd = p_Totaldegree(S->m[IDELEMS(S)-1], currRing);
813 }
814 else
816 }
817 std::vector<ideal > idorb;
818 std::vector< poly > polist;
819
820 ideal orb_init = idInit(1, 1);
821 idorb.push_back(orb_init);
822
823 polist.push_back( p_One(currRing));
824
825 std::vector< std::vector<int> > posMat;
826 std::vector<int> posRow(lV,0);
827 std::vector<int> C;
828
829 int ds, is, ps;
830 unsigned long lpcnt = 0;
831
832 poly w, wi;
833 ideal Jwi;
834
835 while(lpcnt < idorb.size())
836 {
837 w = NULL;
838 w = polist[lpcnt];
839 if(lpcnt >= 1 && idIs0(idorb[lpcnt]) == FALSE)
840 {
841 if(p_Totaldegree(idorb[lpcnt]->m[0], currRing) != 0)
842 {
843 C.push_back(1);
844 }
845 else
846 C.push_back(0);
847 }
848 else
849 {
850 C.push_back(1);
851 }
852
853 ds = p_Totaldegree(w, currRing);
854 lpcnt++;
855
856 for(is = 1; is <= lV; is++)
857 {
858 wi = NULL;
859 //make new copy 'wi' of word w=polist[lpcnt]
860 //and update it (for the colon operation).
861 //if corresponding to wi, right colon operation gives
862 //a new (right colon) ideal of S,
863 //keep 'wi' in the polist else delete it
864
865 wi = pCopy(w);
866 p_SetExp(wi, (ds*lV)+is, 1, currRing);
867 p_Setm(wi, currRing);
868 Jwi = NULL;
869 //Jwi stores (right) colon ideal of S w.r.t. word
870 //wi if colon operation gives a new ideal place it
871 //in the vector of ideals 'idorb'
872 //otherwise delete it
873
874 Jwi = idInit(1,1);
875
876 Jwi = colonIdeal(S, wi, lV, Jwi, trunDegHs);
877 ps = (*POS)(Jwi, wi, idorb, polist, trInd, trunDegHs);
878
879 if(ps == 0) // finds a new ideal
880 {
881 posRow[is-1] = idorb.size();
882
883 idorb.push_back(Jwi);
884 polist.push_back(wi);
885 }
886 else // ideal is already there in the set
887 {
888 posRow[is-1]=ps-1;
889 idDelete(&Jwi);
890 pDelete(&wi);
891 }
892 }
893 posMat.push_back(posRow);
894 posRow.resize(lV,0);
895 }
896 int lO = C.size();//size of the orbit
897 PrintLn();
898 Print("maximal length of words = %ld\n", p_Totaldegree(polist[lO-1], currRing));
899 Print("\nlength of the Orbit = %d", lO);
900 PrintLn();
901
902 if(odp)
903 {
904 Print("words description of the Orbit: \n");
905 for(is = 0; is < lO; is++)
906 {
907 pWrite0(polist[is]);
908 PrintS(" ");
909 }
910 PrintLn();
911 PrintS("\nmaximal degree, #(sum_j R(w,w_j))");
912 PrintLn();
913 for(is = 0; is < lO; is++)
914 {
915 if(idIs0(idorb[is]))
916 {
917 PrintS("NULL\n");
918 }
919 else
920 {
921 Print("%ld, %d \n",p_Totaldegree(idorb[is]->m[IDELEMS(idorb[is])-1], currRing),IDELEMS(idorb[is]));
922 }
923 }
924 }
925
926 for(is = idorb.size()-1; is >= 0; is--)
927 {
928 idDelete(&idorb[is]);
929 }
930 for(is = polist.size()-1; is >= 0; is--)
931 {
932 pDelete(&polist[is]);
933 }
934
935 idorb.resize(0);
936 polist.resize(0);
937
938 int adjMatrix[lO][lO];
939 memset(adjMatrix, 0, lO*lO*sizeof(int));
940 int rowCount, colCount;
941 int tm = 0;
942 if(!mgrad)
943 {
944 for(rowCount = 0; rowCount < lO; rowCount++)
945 {
946 for(colCount = 0; colCount < lV; colCount++)
947 {
948 tm = posMat[rowCount][colCount];
949 adjMatrix[rowCount][tm] = adjMatrix[rowCount][tm] + 1;
950 }
951 }
952 }
953
954 ring r = currRing;
955 int npar;
956 char** tt;
958 if(!mgrad)
959 {
960 tt=(char**)omAlloc(2*sizeof(char*));
961 tt[0] = omStrDup("t");
962 npar = 1;
963 }
964 else
965 {
966 tt=(char**)omalloc(lV*sizeof(char*));
967 for(is = 0; is < lV; is++)
968 {
969 tt[is] = (char*)omAlloc(12*sizeof(char)); //if required enlarge it later
970 snprintf (tt[is],12, "t%d", is+1);
971 }
972 npar = lV;
973 }
974
975 p.r = rDefault(0, npar, tt);
977 char** xx = (char**)omAlloc(sizeof(char*));
978 xx[0] = omStrDup("x");
979 ring R = rDefault(cf, 1, xx);
980 rChangeCurrRing(R);//rWrite(R);
981 /*
982 * matrix corresponding to the orbit of the ideal
983 */
984 matrix mR = mpNew(lO, lO);
985 matrix cMat = mpNew(lO,1);
986 poly rc;
987
988 if(!mgrad)
989 {
990 for(rowCount = 0; rowCount < lO; rowCount++)
991 {
992 for(colCount = 0; colCount < lO; colCount++)
993 {
994 if(adjMatrix[rowCount][colCount] != 0)
995 {
996 MATELEM(mR, rowCount + 1, colCount + 1) = p_ISet(adjMatrix[rowCount][colCount], R);
997 p_SetCoeff(MATELEM(mR, rowCount + 1, colCount + 1), n_Mult(pGetCoeff(mR->m[lO*rowCount+colCount]),n_Param(1, R->cf), R->cf), R);
998 }
999 }
1000 }
1001 }
1002 else
1003 {
1004 for(rowCount = 0; rowCount < lO; rowCount++)
1005 {
1006 for(colCount = 0; colCount < lV; colCount++)
1007 {
1008 rc=NULL;
1009 rc=p_One(R);
1010 p_SetCoeff(rc, n_Mult(pGetCoeff(rc), n_Param(colCount+1, R->cf),R->cf), R);
1011 MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1)=p_Add_q(rc,MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1), R);
1012 }
1013 }
1014 }
1015
1016 for(rowCount = 0; rowCount < lO; rowCount++)
1017 {
1018 if(C[rowCount] != 0)
1019 {
1020 MATELEM(cMat, rowCount + 1, 1) = p_ISet(C[rowCount], R);
1021 }
1022 }
1023
1024 matrix u;
1025 unitMatrix(lO, u); //unit matrix
1026 matrix gMat = mp_Sub(u, mR, R);
1027
1028 char* s;
1029
1030 if(odp)
1031 {
1032 PrintS("\nlinear system:\n");
1033 if(!mgrad)
1034 {
1035 for(rowCount = 0; rowCount < lO; rowCount++)
1036 {
1037 Print("H(%d) = ", rowCount+1);
1038 for(colCount = 0; colCount < lV; colCount++)
1039 {
1040 StringSetS(""); nWrite(n_Param(1, R->cf));
1041 s = StringEndS(); PrintS(s);
1042 Print("*"); omFree(s);
1043 Print("H(%d) + ", posMat[rowCount][colCount] + 1);
1044 }
1045 Print(" %d\n", C[rowCount] );
1046 }
1047 PrintS("where H(1) represents the series corresp. to input ideal\n");
1048 PrintS("and i^th summand in the rhs of an eqn. is according\n");
1049 PrintS("to the right colon map corresp. to the i^th variable\n");
1050 }
1051 else
1052 {
1053 for(rowCount = 0; rowCount < lO; rowCount++)
1054 {
1055 Print("H(%d) = ", rowCount+1);
1056 for(colCount = 0; colCount < lV; colCount++)
1057 {
1058 StringSetS(""); nWrite(n_Param(colCount+1, R->cf));
1059 s = StringEndS(); PrintS(s);
1060 Print("*");omFree(s);
1061 Print("H(%d) + ", posMat[rowCount][colCount] + 1);
1062 }
1063 Print(" %d\n", C[rowCount] );
1064 }
1065 PrintS("where H(1) represents the series corresp. to input ideal\n");
1066 }
1067 }
1068 PrintLn();
1069 posMat.resize(0);
1070 C.resize(0);
1071 matrix pMat;
1072 matrix lMat;
1073 matrix uMat;
1074 matrix H_serVec = mpNew(lO, 1);
1075 matrix Hnot;
1076
1077 //std::clock_t start;
1078 //start = std::clock();
1079
1080 luDecomp(gMat, pMat, lMat, uMat, R);
1081 luSolveViaLUDecomp(pMat, lMat, uMat, cMat, H_serVec, Hnot);
1082
1083 //to print system solving time
1084 //if(odp){
1085 //std::cout<<"solving time of the system = "<<(std::clock()-start)/(double)(CLOCKS_PER_SEC / 1000)<<" ms"<<std::endl;}
1086
1087 mp_Delete(&mR, R);
1088 mp_Delete(&u, R);
1089 mp_Delete(&pMat, R);
1090 mp_Delete(&lMat, R);
1091 mp_Delete(&uMat, R);
1092 mp_Delete(&cMat, R);
1093 mp_Delete(&gMat, R);
1094 mp_Delete(&Hnot, R);
1095 //print the Hilbert series and length of the Orbit
1096 PrintLn();
1097 Print("Hilbert series:");
1098 PrintLn();
1099 pWrite(H_serVec->m[0]);
1100 if(!mgrad)
1101 {
1102 omFree(tt[0]);
1103 }
1104 else
1105 {
1106 for(is = lV-1; is >= 0; is--)
1107
1108 omFree( tt[is]);
1109 }
1110 omFree(tt);
1111 omFree(xx[0]);
1112 omFree(xx);
1113 rChangeCurrRing(r);
1114 rKill(R);
1115}
#define FALSE
Definition auxiliary.h:97
CanonicalForm cf
Definition cfModGcd.cc:4091
poly * m
Definition matpol.h:18
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition coeffs.h:639
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....
Definition coeffs.h:775
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition coeffs.h:38
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:412
#define Print
Definition emacs.cc:80
const CanonicalForm int s
Definition facAbsFact.cc:51
const CanonicalForm & w
Definition facAbsFact.cc:51
void WerrorS(const char *s)
Definition feFopen.cc:24
static int positionInOrbitTruncationCase(ideal I, poly w, std::vector< ideal > idorb, std::vector< poly > polist, int, int trunDegHs)
Definition hilb.cc:481
static ideal colonIdeal(ideal S, poly w, int lV, ideal Jwi, int trunDegHs)
Definition hilb.cc:735
static int positionInOrbit_FG_Case(ideal I, poly, std::vector< ideal > idorb, std::vector< poly >, int, int)
Definition hilb.cc:450
static int positionInOrbit_IG_Case(ideal I, poly w, std::vector< ideal > idorb, std::vector< poly > polist, int trInd, int)
Definition hilb.cc:372
static ideal minimalMonomialGenSet(ideal I)
Definition hilb.cc:575
#define idDelete(H)
delete an ideal
Definition ideals.h:29
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
void rKill(ring r)
Definition ipshell.cc:6181
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)
Definition matpol.cc:874
matrix mp_Sub(matrix a, matrix b, const ring R)
Definition matpol.cc:189
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition matpol.cc:37
#define MATELEM(mat, i, j)
1-based access to matrix
Definition matpol.h:29
ip_smatrix * matrix
Definition matpol.h:43
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44
The main handler for Singular numbers which are suitable for Singular polynomials.
#define nWrite(n)
Definition numbers.h:29
#define omStrDup(s)
#define omalloc(size)
#define omFree(addr)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
Definition p_polys.cc:1298
poly p_One(const ring r)
Definition p_polys.cc:1314
static poly p_Add_q(poly p, poly q, const ring r)
Definition p_polys.h:938
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
Definition p_polys.h:490
static void p_Setm(poly p, const ring r)
Definition p_polys.h:235
static number p_SetCoeff(poly p, number n, ring r)
Definition p_polys.h:414
static long p_Totaldegree(poly p, const ring r)
Definition p_polys.h:1528
void rChangeCurrRing(ring r)
Definition polys.cc:16
#define pDelete(p_ptr)
Definition polys.h:187
void pWrite0(poly p)
Definition polys.h:310
void pWrite(poly p)
Definition polys.h:309
#define pCopy(p)
return a copy of the poly
Definition polys.h:186
void StringSetS(const char *st)
Definition reporter.cc:128
void PrintS(const char *s)
Definition reporter.cc:288
char * StringEndS()
Definition reporter.cc:151
void PrintLn()
Definition reporter.cc:314
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
Definition ring.cc:103
ideal idInit(int idsize, int rank)
initialise an ideal / module
#define IDELEMS(i)
#define R
Definition sirandom.c:27
struct for passing initialization parameters to naInitChar
Definition transext.h:88

◆ hIndAllMult()

void hIndAllMult ( scmon pure,
int Npure,
scfmon rad,
int Nrad,
varset var,
int Nvar )

Definition at line 562 of file hdegree.cc.

564{
565 int dn, iv, rad0, b, c, x;
566 scmon pn;
567 scfmon rn;
568 if (Nrad < 2)
569 {
570 dn = Npure + Nrad;
571 if (dn > hCo)
572 {
573 if (!Nrad)
574 hCheckIndep(pure);
575 else
576 {
577 pn = *rad;
578 for (iv = Nvar; iv; iv--)
579 {
580 x = var[iv];
581 if (pn[x])
582 {
583 pure[x] = 1;
584 hCheckIndep(pure);
585 pure[x] = 0;
586 }
587 }
588 }
589 }
590 return;
591 }
592 iv = Nvar;
593 while(pure[var[iv]]) iv--;
594 hStepR(rad, Nrad, var, iv, &rad0);
595 iv--;
596 if (rad0 < Nrad)
597 {
598 pn = hGetpure(pure);
599 rn = hGetmem(Nrad, rad, radmem[iv]);
600 pn[var[iv + 1]] = 1;
601 hIndAllMult(pn, Npure + 1, rn, rad0, var, iv);
602 pn[var[iv + 1]] = 0;
603 b = rad0;
604 c = Nrad;
605 hElimR(rn, &rad0, b, c, var, iv);
606 hPure(rn, b, &c, var, iv, pn, &x);
607 hLex2R(rn, rad0, b, c, var, iv, hwork);
608 rad0 += (c - b);
609 hIndAllMult(pn, Npure + x, rn, rad0, var, iv);
610 }
611 else
612 {
613 hIndAllMult(pure, Npure, rad, Nrad, var, iv);
614 }
615}
static void hCheckIndep(scmon pure)
Definition hdegree.cc:541
void hIndAllMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
Definition hdegree.cc:562

◆ hIndMult()

void hIndMult ( scmon pure,
int Npure,
scfmon rad,
int Nrad,
varset var,
int Nvar )

Definition at line 382 of file hdegree.cc.

384{
385 int dn, iv, rad0, b, c, x;
386 scmon pn;
387 scfmon rn;
388 if (Nrad < 2)
389 {
390 dn = Npure + Nrad;
391 if (dn == hCo)
392 {
393 if (Nrad==0)
394 hIndep(pure);
395 else
396 {
397 pn = *rad;
398 for (iv = Nvar; iv!=0; iv--)
399 {
400 x = var[iv];
401 if (pn[x])
402 {
403 pure[x] = 1;
404 hIndep(pure);
405 pure[x] = 0;
406 }
407 }
408 }
409 }
410 return;
411 }
412 iv = Nvar;
413 dn = Npure+1;
414 if (dn >= hCo)
415 {
416 if (dn > hCo)
417 return;
418 loop
419 {
420 if(!pure[var[iv]])
421 {
422 if(hNotZero(rad, Nrad, var, iv))
423 {
424 pure[var[iv]] = 1;
425 hIndep(pure);
426 pure[var[iv]] = 0;
427 }
428 }
429 iv--;
430 if (!iv)
431 return;
432 }
433 }
434 while(pure[var[iv]]) iv--;
435 hStepR(rad, Nrad, var, iv, &rad0);
436 iv--;
437 if (rad0 < Nrad)
438 {
439 pn = hGetpure(pure);
440 rn = hGetmem(Nrad, rad, radmem[iv]);
441 pn[var[iv + 1]] = 1;
442 hIndMult(pn, Npure + 1, rn, rad0, var, iv);
443 pn[var[iv + 1]] = 0;
444 b = rad0;
445 c = Nrad;
446 hElimR(rn, &rad0, b, c, var, iv);
447 hPure(rn, b, &c, var, iv, pn, &x);
448 hLex2R(rn, rad0, b, c, var, iv, hwork);
449 rad0 += (c - b);
450 hIndMult(pn, Npure + x, rn, rad0, var, iv);
451 }
452 else
453 {
454 hIndMult(pure, Npure, rad, Nrad, var, iv);
455 }
456}
void hIndMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
Definition hdegree.cc:382
static BOOLEAN hNotZero(scfmon rad, int Nrad, varset var, int Nvar)
Definition hdegree.cc:353
static void hIndep(scmon pure)
Definition hdegree.cc:368

◆ hInit()

scfmon hInit ( ideal S,
ideal Q,
int * Nexist )

Definition at line 31 of file hutil.cc.

32{
34 if (Q!=NULL) id_LmTest(Q, currRing);
35
37
38 if (hisModule < 0)
39 hisModule = 0;
40
41 int sl, ql, i, k = 0;
42 polyset si, qi, ss;
43 scfmon ex, ek;
44
45 if (S!=NULL)
46 {
47 si = S->m;
48 sl = IDELEMS(S);
49 }
50 else
51 {
52 si = NULL;
53 sl = 0;
54 }
55 if (Q!=NULL)
56 {
57 qi = Q->m;
58 ql = IDELEMS(Q);
59 }
60 else
61 {
62 qi = NULL;
63 ql = 0;
64 }
65 if ((sl + ql) == 0)
66 {
67 *Nexist = 0;
68 return NULL;
69 }
70 ss = si;
71 for (i = sl; i>0; i--)
72 {
73 if (*ss!=0)
74 k++;
75 ss++;
76 }
77 ss = qi;
78 for (i = ql; i>0; i--)
79 {
80 if (*ss!=0)
81 k++;
82 ss++;
83 }
84 *Nexist = k;
85 if (k==0)
86 return NULL;
87 ek = ex = (scfmon)omAlloc0(k * sizeof(scmon));
88 hsecure = (scfmon) omAlloc0(k * sizeof(scmon));
89 for (i = sl; i>0; i--)
90 {
91 if (*si!=NULL)
92 {
93 *ek = (scmon) omAlloc(((currRing->N)+1)*sizeof(int));
94 p_GetExpV(*si, *ek, currRing);
95 ek++;
96 }
97 si++;
98 }
99 for (i = ql; i>0; i--)
100 {
101 if (*qi!=NULL)
102 {
103 *ek = (scmon) omAlloc(((currRing->N)+1)*sizeof(int));
104 p_GetExpV(*qi, *ek, currRing);
105 ek++;
106 }
107 qi++;
108 }
109 memcpy(hsecure, ex, k * sizeof(scmon));
110 return ex;
111}
VAR int hisModule
Definition hutil.cc:20
#define omAlloc0(size)
static void p_GetExpV(poly p, int *ev, const ring r)
Definition p_polys.h:1541
poly * polyset
Definition polys.h:260
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
#define id_LmTest(A, lR)
#define Q
Definition sirandom.c:26

◆ hKill()

void hKill ( monf xmem,
int Nvar )

Definition at line 1010 of file hutil.cc.

1011{
1012 int i;
1013 for (i = Nvar; i!=0; i--)
1014 {
1015 if (xmem[i]->mo!=NULL)
1016 omFreeSize((ADDRESS)xmem[i]->mo, xmem[i]->a * sizeof(scmon));
1017 omFreeSize((ADDRESS)xmem[i], LEN_MON);
1018 }
1019 omFreeSize((ADDRESS)xmem, (Nvar + 1) * sizeof(monp));
1020}

◆ hLex2R()

void hLex2R ( scfmon rad,
int e1,
int a2,
int e2,
varset var,
int Nvar,
scfmon w )

Definition at line 880 of file hutil.cc.

882{
883 int j0 = 0, j = 0, i = a2, k, k1;
884 scmon n, o;
885 if (!e1)
886 {
887 for (; i < e2; i++)
888 rad[i - a2] = rad[i];
889 return;
890 }
891 else if (i == e2)
892 return;
893 n = rad[j];
894 o = rad[i];
895 loop
896 {
897 k = Nvar;
898 loop
899 {
900 k1 = var[k];
901 if (!o[k1] && n[k1])
902 {
903 w[j0] = o;
904 j0++;
905 i++;
906 if (i < e2)
907 {
908 o = rad[i];
909 break;
910 }
911 else
912 {
913 for (; j < e1; j++)
914 {
915 w[j0] = rad[j];
916 j0++;
917 }
918 memcpy(rad, w, (e1 + e2 - a2) * sizeof(scmon));
919 return;
920 }
921 }
922 else if (o[k1] && !n[k1])
923 {
924 w[j0] = n;
925 j0++;
926 j++;
927 if (j < e1)
928 {
929 n = rad[j];
930 break;
931 }
932 else
933 {
934 for (; i < e2; i++)
935 {
936 w[j0] = rad[i];
937 j0++;
938 }
939 memcpy(rad, w, (e1 + e2 - a2) * sizeof(scmon));
940 return;
941 }
942 }
943 k--;
944 }
945 }
946}

◆ hLex2S()

void hLex2S ( scfmon stc,
int e1,
int a2,
int e2,
varset var,
int Nvar,
scfmon w )

Definition at line 812 of file hutil.cc.

814{
815 int j0 = 0, j = 0, i = a2, k, k1;
816 scmon n, o;
817 if (!e1)
818 {
819 for (; i < e2; i++)
820 rad[i - a2] = rad[i];
821 return;
822 } else if (i == e2)
823 return;
824 n = rad[j];
825 o = rad[i];
826 loop
827 {
828 k = Nvar;
829 loop
830 {
831 k1 = var[k];
832 if (o[k1] < n[k1])
833 {
834 w[j0] = o;
835 j0++;
836 i++;
837 if (i < e2)
838 {
839 o = rad[i];
840 break;
841 }
842 else
843 {
844 for (; j < e1; j++)
845 {
846 w[j0] = rad[j];
847 j0++;
848 }
849 memcpy(rad, w, (e1 + e2 - a2) * sizeof(scmon));
850 return;
851 }
852 }
853 else if (o[k1] > n[k1])
854 {
855 w[j0] = n;
856 j0++;
857 j++;
858 if (j < e1)
859 {
860 n = rad[j];
861 break;
862 }
863 else
864 {
865 for (; i < e2; i++)
866 {
867 w[j0] = rad[i];
868 j0++;
869 }
870 memcpy(rad, w, (e1 + e2 - a2) * sizeof(scmon));
871 return;
872 }
873 }
874 k--;
875 }
876 }
877}

◆ hLexR()

void hLexR ( scfmon rad,
int Nrad,
varset var,
int Nvar )

Definition at line 565 of file hutil.cc.

566{
567 int j = 1, i = 0, k, k1;
568 scmon n, o;
569 if (Nrad < 2)
570 return;
571 n = rad[j];
572 o = rad[0];
573 k = Nvar;
574 loop
575 {
576 k1 = var[k];
577 if (!o[k1] && n[k1])
578 {
579 i++;
580 if (i < j)
581 {
582 o = rad[i];
583 k = Nvar;
584 }
585 else
586 {
587 j++;
588 if (j < Nrad)
589 {
590 i = 0;
591 o = rad[0];
592 n = rad[j];
593 k = Nvar;
594 }
595 else
596 return;
597 }
598 }
599 else if (o[k1] && !n[k1])
600 {
601 for (k = j; k > i; k--)
602 rad[k] = rad[k - 1];
603 rad[i] = n;
604 j++;
605 if (j < Nrad)
606 {
607 i = 0;
608 o = rad[0];
609 n = rad[j];
610 k = Nvar;
611 }
612 else
613 return;
614 }
615 else
616 k--;
617 }
618}

◆ hLexS()

void hLexS ( scfmon stc,
int Nstc,
varset var,
int Nvar )

Definition at line 506 of file hutil.cc.

507{
508 if (Nstc < 2)
509 return;
510 int j = 1, i = 0;
511 scmon n = stc[j];
512 scmon o = stc[0];
513 int k = Nvar;
514 loop
515 {
516 int k1 = var[k];
517 if (o[k1] < n[k1])
518 {
519 i++;
520 if (i < j)
521 {
522 o = stc[i];
523 k = Nvar;
524 }
525 else
526 {
527 j++;
528 if (j < Nstc)
529 {
530 i = 0;
531 o = stc[0];
532 n = stc[j];
533 k = Nvar;
534 }
535 else
536 return;
537 }
538 }
539 else if (o[k1] > n[k1])
540 {
541 int tmp_k;
542 for (tmp_k = j; tmp_k > i; tmp_k--)
543 stc[tmp_k] = stc[tmp_k - 1];
544 stc[i] = n;
545 j++;
546 if (j < Nstc)
547 {
548 i = 0;
549 o = stc[0];
550 n = stc[j];
551 k = Nvar;
552 }
553 else
554 return;
555 }
556 else
557 {
558 k--;
559 if (k<=0) return;
560 }
561 }
562}

◆ hOrdSupp()

void hOrdSupp ( scfmon stc,
int Nstc,
varset var,
int Nvar )

Definition at line 202 of file hutil.cc.

203{
204 int i, i1, j, jj, k, l;
205 int x;
206 scmon temp, count;
207 float o, h, g, *v1;
208
209 v1 = (float *)omAlloc(Nvar * sizeof(float));
210 temp = (int *)omAlloc(Nstc * sizeof(int));
211 count = (int *)omAlloc(Nstc * sizeof(int));
212 for (i = 1; i <= Nvar; i++)
213 {
214 i1 = var[i];
215 *temp = stc[0][i1];
216 *count = 1;
217 jj = 1;
218 for (j = 1; j < Nstc; j++)
219 {
220 x = stc[j][i1];
221 k = 0;
222 loop
223 {
224 if (x > temp[k])
225 {
226 k++;
227 if (k == jj)
228 {
229 temp[k] = x;
230 count[k] = 1;
231 jj++;
232 break;
233 }
234 }
235 else if (x < temp[k])
236 {
237 for (l = jj; l > k; l--)
238 {
239 temp[l] = temp[l-1];
240 count[l] = count[l-1];
241 }
242 temp[k] = x;
243 count[k] = 1;
244 jj++;
245 break;
246 }
247 else
248 {
249 count[k]++;
250 break;
251 }
252 }
253 }
254 h = 0.0;
255 o = (float)Nstc/(float)jj;
256 for(j = 0; j < jj; j++)
257 {
258 g = (float)count[j];
259 if (g > o)
260 g -= o;
261 else
262 g = o - g;
263 if (g > h)
264 h = g;
265 }
266 v1[i-1] = h * (float)jj;
267 }
268 omFreeSize((ADDRESS)count, Nstc * sizeof(int));
269 omFreeSize((ADDRESS)temp, Nstc * sizeof(int));
270 for (i = 1; i < Nvar; i++)
271 {
272 i1 = var[i+1];
273 h = v1[i];
274 j = 0;
275 loop
276 {
277 if (h > v1[j])
278 {
279 for (l = i; l > j; l--)
280 {
281 v1[l] = v1[l-1];
282 var[l+1] = var[l];
283 }
284 v1[j] = h;
285 var[j+1] = i1;
286 break;
287 }
288 j++;
289 if (j == i)
290 break;
291 }
292 }
293 omFreeSize((ADDRESS)v1, Nvar * sizeof(float));
294}
int l
Definition cfEzgcd.cc:100
g
Definition cfModGcd.cc:4098
STATIC_VAR Poly * h
Definition janet.cc:971
int status int void size_t count
Definition si_signals.h:69

◆ hPure()

void hPure ( scfmon stc,
int a,
int * Nstc,
varset var,
int Nvar,
scmon pure,
int * Npure )

Definition at line 621 of file hutil.cc.

623{
624 int nc = *Nstc, np = 0, nq = 0, j, i, i1, c, l;
625 scmon x;
626 for (j = a; j < nc; j++)
627 {
628 x = stc[j];
629 i = Nvar;
630 c = 2;
631 l = 0;
632 loop
633 {
634 i1 = var[i];
635 if (x[i1])
636 {
637 c--;
638 if (!c)
639 {
640 l = 0;
641 break;
642 }
643 else if (c == 1)
644 l = i1;
645 }
646 i--;
647 if (!i)
648 break;
649 }
650 if (l)
651 {
652 if (!pure[l])
653 {
654 np++;
655 pure[l] = x[l];
656 }
657 else if (x[l] < pure[l])
658 pure[l] = x[l];
659 stc[j] = NULL;
660 nq++;
661 }
662 }
663 *Npure = np;
664 if (nq!=0)
665 {
666 *Nstc -= nq;
667 hShrink(stc, a, nc);
668 }
669}

◆ hRadical()

void hRadical ( scfmon rad,
int * Nrad,
int Nvar )

Definition at line 411 of file hutil.cc.

412{
413 int nc = *Nrad, z = 0, i, j, k;
414 scmon n, o;
415 if (nc < 2)
416 return;
417 i = 0;
418 j = 1;
419 n = rad[j];
420 o = rad[0];
421 k = Nvar;
422 loop
423 {
424 if ((o[k]!=0) && (n[k]==0))
425 {
426 loop
427 {
428 k--;
429 if (k==0)
430 {
431 rad[i] = NULL;
432 z++;
433 break;
434 }
435 else
436 {
437 if ((o[k]==0) && (n[k]!=0))
438 break;
439 }
440 }
441 k = Nvar;
442 }
443 else if (!o[k] && n[k])
444 {
445 loop
446 {
447 k--;
448 if (!k)
449 {
450 rad[j] = NULL;
451 z++;
452 break;
453 }
454 else
455 {
456 if (o[k] && !n[k])
457 break;
458 }
459 }
460 k = Nvar;
461 }
462 else
463 {
464 k--;
465 if (!k)
466 {
467 rad[j] = NULL;
468 z++;
469 k = Nvar;
470 }
471 }
472 if (k == Nvar)
473 {
474 if (!rad[j])
475 i = j - 1;
476 loop
477 {
478 i++;
479 if (i == j)
480 {
481 i = -1;
482 j++;
483 if (j < nc)
484 n = rad[j];
485 else
486 {
487 if (z)
488 {
489 *Nrad -= z;
490 hShrink(rad, 0, nc);
491 }
492 return;
493 }
494 }
495 else if (rad[i])
496 {
497 o = rad[i];
498 break;
499 }
500 }
501 }
502 }
503}

◆ hStaircase()

void hStaircase ( scfmon stc,
int * Nstc,
varset var,
int Nvar )

Definition at line 313 of file hutil.cc.

314{
315 int nc = *Nstc;
316 if (nc < 2)
317 return;
318 int z = 0;
319 int i = 0;
320 int j = 1;
321 scmon n = stc[1 /*j*/];
322 scmon o = stc[0];
323 int k = Nvar;
324 loop
325 {
326 int k1 = var[k];
327 if (o[k1] > n[k1])
328 {
329 loop
330 {
331 k--;
332 if (k==0)
333 {
334 stc[i] = NULL;
335 z++;
336 break;
337 }
338 else
339 {
340 k1 = var[k];
341 if (o[k1] < n[k1])
342 break;
343 }
344 }
345 k = Nvar;
346 }
347 else if (o[k1] < n[k1])
348 {
349 loop
350 {
351 k--;
352 if (k==0)
353 {
354 stc[j] = NULL;
355 z++;
356 break;
357 }
358 else
359 {
360 k1 = var[k];
361 if (o[k1] > n[k1])
362 break;
363 }
364 }
365 k = Nvar;
366 }
367 else
368 {
369 k--;
370 if (k==0)
371 {
372 stc[j] = NULL;
373 z++;
374 k = Nvar;
375 }
376 }
377 if (k == Nvar)
378 {
379 if (stc[j]==NULL)
380 i = j - 1;
381 loop
382 {
383 i++;
384 if (i == j)
385 {
386 i = -1;
387 j++;
388 if (j < nc)
389 n = stc[j];
390 else
391 {
392 if (z!=0)
393 {
394 *Nstc -= z;
395 hShrink(stc, 0, nc);
396 }
397 return;
398 }
399 }
400 else if (stc[i]!=NULL)
401 {
402 o = stc[i];
403 break;
404 }
405 }
406 }
407 }
408}

◆ hStepR()

void hStepR ( scfmon rad,
int Nrad,
varset var,
int Nvar,
int * a )

Definition at line 974 of file hutil.cc.

975{
976 int k1, i;
977 k1 = var[Nvar];
978 i = 0;
979 loop
980 {
981 if (rad[i][k1])
982 {
983 *a = i;
984 return;
985 }
986 i++;
987 if (i == Nrad)
988 {
989 *a = i;
990 return;
991 }
992 }
993}

◆ hStepS()

void hStepS ( scfmon stc,
int Nstc,
varset var,
int Nvar,
int * a,
int * x )

Definition at line 949 of file hutil.cc.

950{
951 int k1, i;
952 int y;
953 k1 = var[Nvar];
954 y = *x;
955 i = *a;
956 loop
957 {
958 if (y < stc[i][k1])
959 {
960 *a = i;
961 *x = stc[i][k1];
962 return;
963 }
964 i++;
965 if (i == Nstc)
966 {
967 *a = i;
968 return;
969 }
970 }
971}
const CanonicalForm int const CFList const Variable & y
Definition facAbsFact.cc:53

◆ hSupp()

void hSupp ( scfmon stc,
int Nstc,
varset var,
int * Nvar )

Definition at line 174 of file hutil.cc.

175{
176 int nv, i0, i1, i, j;
177 nv = i0 = *Nvar;
178 i1 = 0;
179 for (i = 1; i <= nv; i++)
180 {
181 j = 0;
182 loop
183 {
184 if (stc[j][i]>0)
185 {
186 i1++;
187 var[i1] = i;
188 break;
189 }
190 j++;
191 if (j == Nstc)
192 {
193 var[i0] = i;
194 i0--;
195 break;
196 }
197 }
198 }
199 *Nvar = i1;
200}

◆ RightColonOperation()

ideal RightColonOperation ( ideal i,
poly w,
int lV )

Definition at line 1117 of file hilb.cc.

1118{
1119 /*
1120 * This returns right colon ideal of a monomial two-sided ideal of
1121 * the free associative algebra with respect to a monomial 'w'
1122 * (S:_R w).
1123 */
1124 S = minimalMonomialGenSet(S);
1125 ideal Iw = idInit(1,1);
1126 Iw = colonIdeal(S, w, lV, Iw, 0);
1127 return (Iw);
1128}

Variable Documentation

◆ hCo

EXTERN_VAR int hCo

Definition at line 47 of file hutil.h.

◆ hexist

Definition at line 39 of file hutil.h.

◆ hisModule

EXTERN_VAR int hisModule

Definition at line 44 of file hutil.h.

◆ hMu

EXTERN_VAR long hMu

Definition at line 48 of file hutil.h.

◆ hMu2

EXTERN_VAR int hMu2

Definition at line 47 of file hutil.h.

◆ hNexist

EXTERN_VAR int hNexist

Definition at line 42 of file hutil.h.

◆ hNpure

EXTERN_VAR int hNpure

Definition at line 42 of file hutil.h.

◆ hNrad

EXTERN_VAR int hNrad

Definition at line 42 of file hutil.h.

◆ hNstc

EXTERN_VAR int hNstc

Definition at line 42 of file hutil.h.

◆ hNvar

EXTERN_VAR int hNvar

Definition at line 42 of file hutil.h.

◆ hpur0

Definition at line 40 of file hutil.h.

◆ hpure

Definition at line 40 of file hutil.h.

◆ hrad

Definition at line 39 of file hutil.h.

◆ hsel

Definition at line 41 of file hutil.h.

◆ hstc

Definition at line 39 of file hutil.h.

◆ hvar

Definition at line 41 of file hutil.h.

◆ hwork

Definition at line 39 of file hutil.h.

◆ indlist_bin

EXTERN_VAR omBin indlist_bin

Definition at line 37 of file hutil.h.

◆ ISet

Definition at line 46 of file hutil.h.

◆ JSet

Definition at line 46 of file hutil.h.

◆ radmem

EXTERN_VAR monf radmem

Definition at line 43 of file hutil.h.

◆ stcmem

EXTERN_VAR monf stcmem

Definition at line 43 of file hutil.h.