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

Function getList

Singular/ipshell.cc:3391–3423  ·  view source on GitHub ↗

former spectrum::thelist ( void )*/

Source from the content-addressed store, hash-verified

3389
3390/* former spectrum::thelist ( void )*/
3391lists getList( spectrum& spec )
3392{
3393 lists L = (lists)omAllocBin( slists_bin);
3394
3395 L->Init( 6 );
3396
3397 intvec *num = new intvec( spec.n );
3398 intvec *den = new intvec( spec.n );
3399 intvec *mult = new intvec( spec.n );
3400
3401 for( int i=0; i<spec.n; i++ )
3402 {
3403 (*num) [i] = spec.s[i].get_num_si( );
3404 (*den) [i] = spec.s[i].get_den_si( );
3405 (*mult)[i] = spec.w[i];
3406 }
3407
3408 L->m[0].rtyp = INT_CMD; // milnor number
3409 L->m[1].rtyp = INT_CMD; // geometrical genus
3410 L->m[2].rtyp = INT_CMD; // # of spectrum numbers
3411 L->m[3].rtyp = INTVEC_CMD; // numerators
3412 L->m[4].rtyp = INTVEC_CMD; // denomiantors
3413 L->m[5].rtyp = INTVEC_CMD; // multiplicities
3414
3415 L->m[0].data = (void*)(long)spec.mu;
3416 L->m[1].data = (void*)(long)spec.pg;
3417 L->m[2].data = (void*)(long)spec.n;
3418 L->m[3].data = (void*)num;
3419 L->m[4].data = (void*)den;
3420 L->m[5].data = (void*)mult;
3421
3422 return L;
3423}
3424// from spectrum.cc
3425// ----------------------------------------------------------------------------
3426// print out an error message for a spectrum list

Callers 2

spaddProcFunction · 0.70
spmulProcFunction · 0.70

Calls 4

omAllocBinFunction · 0.85
get_num_siMethod · 0.80
get_den_siMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected