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

Function VMrRefine

Singular/walk.cc:2732–2786  ·  view source on GitHub ↗

* define and execute a new ring with ordering (a(va),Wp(vb),C) * * **************************************************************/

Source from the content-addressed store, hash-verified

2730 * define and execute a new ring with ordering (a(va),Wp(vb),C) *
2731 * **************************************************************/
2732static ring VMrRefine(intvec* va, intvec* vb)
2733{
2734
2735 ring r = rCopy0(currRing,FALSE,FALSE);
2736 int i, nv = currRing->N;
2737
2738 int nb = 5;
2739
2740 //weights: entries for 3 blocks: NULL Made:???
2741 r->wvhdl = (int **)omAlloc0(nb * sizeof(int_ptr));
2742 r->wvhdl[0] = (int*) omAlloc(nv*sizeof(int));
2743 r->wvhdl[1] = (int*) omAlloc(nv*sizeof(int));
2744
2745 for(i=0; i<nv; i++)
2746 {
2747 r->wvhdl[0][i] = (*vb)[i];
2748 r->wvhdl[1][i] = (*va)[i];
2749 }
2750
2751 // order: (1..1),a,lp,C
2752 r->order = (rRingOrder_t *) omAlloc(nb * sizeof(rRingOrder_t *));
2753 r->block0 = (int *)omAlloc0(nb * sizeof(int *));
2754 r->block1 = (int *)omAlloc0(nb * sizeof(int *));
2755
2756 // ringorder a for the first block: var 1..nv
2757 r->order[0] = ringorder_a;
2758 r->block0[0] = 1;
2759 r->block1[0] = nv;
2760
2761 // ringorder Wp for the second block: var 1..nv
2762 r->order[1] = ringorder_a;
2763 r->block0[1] = 1;
2764 r->block1[1] = nv;
2765
2766 // ringorder lp for the third block: var 1..nv
2767 r->order[2] = ringorder_lp;
2768 r->block0[2] = 1;
2769 r->block1[2] = nv;
2770
2771 // ringorder C for the 4th block
2772 // it is very important within "idLift",
2773 // especially, by ring syz_ring=rCurrRingAssure_SyzComp();
2774 // therefore, nb must be (nBlocks(currRing) + 1)
2775 r->order[3] = ringorder_C;
2776
2777 // the last block: everything is 0
2778 r->order[4] = (rRingOrder_t)0;
2779
2780 // complete ring intializations
2781
2782 rComplete(r);
2783
2784 //rChangeCurrRing(r);
2785 return r;
2786}
2787
2788/*****************************************************
2789 * define and execute a new ring with ordering (M,C) *

Callers 8

MwalkFunction · 0.85
MrwalkFunction · 0.85
MpwalkFunction · 0.85
MprwalkFunction · 0.85
rec_fractal_callFunction · 0.85
rec_r_fractal_callFunction · 0.85
MfwalkFunction · 0.85
MfrwalkFunction · 0.85

Calls 3

rCopy0Function · 0.85
omAlloc0Function · 0.85
rCompleteFunction · 0.85

Tested by

no test coverage detected