MCPcopy Create free account
hub / github.com/Singular/Singular / idrecDataInit

Function idrecDataInit

Singular/ipid.cc:140–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138//}
139
140void *idrecDataInit(int t)
141{
142 switch (t)
143 {
144 //the type with init routines:
145#ifdef SINGULAR_4_2
146 case CNUMBER_CMD:
147 return (void*)n2Init(0,NULL);
148 case CPOLY_CMD:
149 return (void*)p2Init(0,NULL);
150 case CMATRIX_CMD:
151#endif
152 case BIGINTMAT_CMD:
153 return (void *)new bigintmat();
154 case BIGINTVEC_CMD:
155 return (void *)new bigintmat(1,0,coeffs_BIGINT);
156 case BUCKET_CMD:
157 if (currRing!=NULL)
158 return (void*)sBucketCreate(currRing);
159 else
160 {
161 WerrorS("need basering for polyBucket");
162 return NULL;
163 }
164 case INTVEC_CMD:
165 case INTMAT_CMD:
166 return (void *)new intvec();
167 case NUMBER_CMD:
168 {
169 if (currRing!=NULL) return (void *) nInit(0);
170 else return NULL;
171 }
172 case BIGINT_CMD:
173 return (void *) n_Init(0, coeffs_BIGINT);
174 case IDEAL_CMD:
175 case MODUL_CMD:
176 case MATRIX_CMD:
177 case SMATRIX_CMD:
178 return (void*) idInit(1,1);
179 case MAP_CMD:
180 {
181 map m = (map)idInit(1,1);
182 m->preimage = omStrDup(IDID(currRingHdl));
183 return (void *)m;
184 }
185 case STRING_CMD:
186 return (void *)omAlloc0(1);
187 case LIST_CMD:
188 {
189 lists l=(lists)omAllocBin(slists_bin);
190 l->Init();
191 return (void*)l;
192 }
193 //the types with the standard init: set the struct to zero
194 case LINK_CMD:
195 return (void*) omAlloc0Bin(sip_link_bin);
196 case PACKAGE_CMD:
197 {

Callers 4

lCopy_newstructFunction · 0.85
newstruct_InitFunction · 0.85
setMethod · 0.85
jiAssign_listFunction · 0.85

Calls 13

n2InitFunction · 0.85
p2InitFunction · 0.85
sBucketCreateFunction · 0.85
WerrorSFunction · 0.85
n_InitFunction · 0.85
idInitFunction · 0.85
omAlloc0Function · 0.85
omAllocBinFunction · 0.85
omAlloc0BinFunction · 0.85
getBlackboxStuffFunction · 0.85
WerrorFunction · 0.85
PrintFunction · 0.50

Tested by

no test coverage detected