Changeset 301c033 in git


Ignore:
Timestamp:
Jul 21, 2010, 4:10:14 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
198c60532f02886e728a0b264975f50487915682
Parents:
19191129ddddff4c6aac6c8ee9304d5336e4acbf
Message:
rDefault

git-svn-id: file:///usr/local/Singular/svn/trunk@13042 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    r1919112 r301c033  
    129129}
    130130
    131 ring rDefault(int ch, int N, char **n)
     131ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1)
    132132{
    133133  ring r=(ring) omAlloc0Bin(sip_sring_bin);
     
    143143  }
    144144  /*weights: entries for 2 blocks: NULL*/
    145   r->wvhdl = (int **)omAlloc0(2 * sizeof(int_ptr));
    146   /*order: lp,0*/
    147   r->order = (int *) omAlloc(2* sizeof(int *));
    148   r->block0 = (int *)omAlloc0(2 * sizeof(int *));
    149   r->block1 = (int *)omAlloc0(2 * sizeof(int *));
    150   /* ringorder dp for the first block: var 1..N */
    151   r->order[0]  = ringorder_lp;
    152   r->block0[0] = 1;
    153   r->block1[0] = N;
    154   /* the last block: everything is 0 */
    155   r->order[1]  = 0;
     145  r->wvhdl = (int **)omAlloc0((ord_size+1) * sizeof(int_ptr));
     146  r->order = ord;
     147  r->block0 = block0;
     148  r->block1 = block1;
    156149  /*polynomial ring*/
    157150  r->OrdSgn    = 1;
     
    160153  rComplete(r);
    161154  return r;
     155}
     156
     157ring rDefault(int ch, int N, char **n)
     158{
     159  /*order: lp,0*/
     160  int *order = (int *) omAlloc(2* sizeof(int));
     161  int *block0 = (int *)omAlloc0(2 * sizeof(int));
     162  int *block1 = (int *)omAlloc0(2 * sizeof(int));
     163  /* ringorder dp for the first block: var 1..N */
     164  order[0]  = ringorder_lp;
     165  block0[0] = 1;
     166  block1[0] = N;
     167  /* the last block: everything is 0 */
     168  order[1]  = 0;
     169
     170  return rDefault(ch,N,n,2,order,block0,block1);
    162171}
    163172
  • kernel/ring.h

    r1919112 r301c033  
    6464idhdl  rDefault(const char *s);
    6565ring   rDefault(int ch, int N, char **n);
     66ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1);
     67
    6668#define rIsRingVar(A) r_IsRingVar(A,currRing)
    6769int    r_IsRingVar(const char *n, ring r);
Note: See TracChangeset for help on using the changeset viewer.