Changeset 92e0eb in git
- Timestamp:
- Mar 15, 2011, 7:17:48 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 5cdbfef15d0014847a35358d543945451f68ff41
- Parents:
- e9c3b29fc2ccfc0e5b778e8460f2dca4275e666e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
re9c3b2 r92e0eb 1060 1060 #endif 1061 1061 1062 1063 #if 01064 /// Returns old SyzCompLimit, can set new limit1065 if(strcmp(sys_cmd,"SetSyzComp")==0)1066 {1067 res->rtyp = INT_CMD;1068 res->data = (void *)rGetCurrSyzLimit(currRing);1069 if ((h!=NULL) && (h->Typ()==INT_CMD))1070 {1071 const int iSyzComp = (int)((long)(h->Data()));1072 assume( iSyzComp > 0 );1073 rSetSyzComp( iSyzComp );1074 }1075 1076 return FALSE;1077 }1078 /// Endowe the current ring with additional (leading) Syz-component ordering1079 if(strcmp(sys_cmd,"MakeSyzCompOrdering")==0)1080 {1081 extern ring rAssure_SyzComp(const ring r, BOOLEAN complete);1082 1083 // res->data = rCurrRingAssure_SyzComp(); // changes current ring! :(1084 res->data = (void *)rAssure_SyzComp(currRing, TRUE);1085 res->rtyp = RING_CMD; // return new ring!1086 1087 return FALSE;1088 }1089 #endif1090 1091 /// Same for Induced Schreyer ordering (ordering on components is defined by sign!)1092 if(strcmp(sys_cmd,"MakeInducedSchreyerOrdering")==0)1093 {1094 extern ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete, int sign);1095 int sign = 1;1096 if ((h!=NULL) && (h->Typ()==INT_CMD))1097 {1098 sign = (int)((long)(h->Data()));1099 assume( sign == 1 || sign == -1 );1100 }1101 res->data = (void *)rAssure_InducedSchreyerOrdering(currRing, TRUE, sign);1102 res->rtyp = RING_CMD; // return new ring!1103 return FALSE;1104 }1105 1106 /// Returns old SyzCompLimit, can set new limit1107 if(strcmp(sys_cmd,"SetInducedReferrence")==0)1108 {1109 extern void rSetISReference(const ideal F, const int rank, const int p, const intvec * componentWeights, const ring r);1110 1111 if ((h!=NULL) && ( (h->Typ()==IDEAL_CMD) || (h->Typ()==MODUL_CMD)))1112 {1113 intvec * componentWeights = (intvec *)atGet(h,"isHomog",INTVEC_CMD); // No copy?!1114 1115 const ideal F = (ideal)h->Data(); ; // No copy!1116 h=h->next;1117 1118 int rank = idRankFreeModule(F, currRing, currRing); // Starting syz-comp (1st: i+1)1119 1120 if ((h!=NULL) && (h->Typ()==INT_CMD))1121 {1122 rank = (int)((long)(h->Data())); h=h->next;1123 }1124 1125 int p = 0; // which IS-block? p^th!1126 1127 if ((h!=NULL) && (h->Typ()==INT_CMD))1128 {1129 p = (int)((long)(h->Data())); h=h->next;1130 }1131 1132 // F & componentWeights belong to that ordering block of currRing now:1133 rSetISReference(F, rank, p, componentWeights, currRing); // F and componentWeights will be copied!1134 }1135 else1136 {1137 WerrorS("`system(\"SetISReferrence\",<ideal/module>, [int, int])` expected");1138 return TRUE;1139 }1140 return FALSE;1141 }1142 1143 1144 // F = system("ISUpdateComponents", F, V, MIN );1145 // // replace gen(i) -> gen(MIN + V[i-MIN]) for all i > MIN in all terms from F!1146 // extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);1147 if(strcmp(sys_cmd,"ISUpdateComponents")==0)1148 {1149 1150 PrintS("ISUpdateComponents:.... \n");1151 1152 if ((h!=NULL) && (h->Typ()==MODUL_CMD))1153 {1154 ideal F = (ideal)h->Data(); ; // No copy!1155 h=h->next;1156 1157 if ((h!=NULL) && (h->Typ()==INTVEC_CMD))1158 {1159 const intvec* const V = (const intvec* const) h->Data();1160 h=h->next;1161 1162 if ((h!=NULL) && (h->Typ()==INT_CMD))1163 {1164 const int MIN = (int)((long)(h->Data()));1165 1166 extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);1167 pISUpdateComponents(F, V, MIN, currRing);1168 return FALSE;1169 }1170 }1171 }1172 1173 WerrorS("`system(\"ISUpdateComponents\",<module>, intvec, int)` expected");1174 return TRUE;1175 }1176 1177 1062 //////////////////////////////////////////////////////////////////////// 1178 1063 /// Additional interface functions to non-commutative subsystem (PLURAL) … … 2466 2351 } 2467 2352 else 2468 /*==================== generic debug ==================================*/2469 if(strcmp(sys_cmd,"DetailedPrint")==0)2470 {2471 #ifndef NDEBUG2472 if( h == NULL )2473 {2474 WarnS("DetailedPrint needs arguments...");2475 return TRUE;2476 }2477 2478 if( h->Typ() == RING_CMD)2479 {2480 const ring r = (const ring)h->Data();2481 rWrite(r);2482 PrintLn();2483 #ifdef RDEBUG2484 rDebugPrint(r);2485 #endif2486 }2487 #ifdef PDEBUG2488 else2489 if( h->Typ() == POLY_CMD || h->Typ() == VECTOR_CMD)2490 {2491 const int nTerms = 3;2492 const poly p = (const poly)h->Data();2493 p_DebugPrint(p, currRing, currRing, nTerms);2494 }2495 else2496 if( h->Typ() == IDEAL_CMD || h->Typ() == MODUL_CMD)2497 {2498 const ideal id = (const ideal)h->Data();2499 2500 h = h->Next();2501 2502 int nTerms = 3;2503 2504 if( h!= NULL && h->Typ() == INT_CMD )2505 {2506 int n = (int)(long)(h->Data());2507 if( n < 0 )2508 {2509 Warn("Negative int argument: %d", n);2510 }2511 else2512 nTerms = n;2513 }2514 2515 idShow(id, currRing, currRing, nTerms);2516 }2517 #endif2518 #endif2519 return FALSE;2520 }2521 else2522 2353 /*==================== mtrack ==================================*/ 2523 2354 if(strcmp(sys_cmd,"mtrack")==0) … … 3818 3649 3819 3650 #endif 3820 3821 // TODO: What about a dynamic module instead? Only Linux? NO:3822 // ONLY: ELF systems and HPUX3823 #ifdef HAVE_SINGULAR_PLUS_PLUS3824 if (strcmp(sys_cmd,"Singular++")==0)3825 {3826 // using namespace SINGULAR_NS;3827 extern BOOLEAN Main(leftv res, leftv h); // FALSE = Ok, TRUE = Error!3828 return Main(res, h);3829 }3830 else3831 #endif // HAVE_SINGULAR_PLUS_PLUS3832 3651 3833 3652 #ifdef HAVE_GFAN
Note: See TracChangeset
for help on using the changeset viewer.