Changeset e14e1b0 in git


Ignore:
Timestamp:
Mar 8, 2010, 2:27:18 PM (14 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '45e267b9942dec9429fe249ce3e5e44ab80a6a3a')
Children:
32785f98c022f9341d401098c78dafff2aff4437
Parents:
c1a5fdccad23660f683eef44f4ca207fa4050c1c
Message:
fixes trac ticket #206

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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rc1a5fd re14e1b0  
    11311131static BOOLEAN jjTIMES_MA_P2(leftv res, leftv u, leftv v)
    11321132{
    1133   return jjTIMES_MA_P1(res,v,u);
     1133  poly p=(poly)u->CopyD(POLY_CMD);
     1134  int r=pMaxComp(p);/* recompute the rank for the case ideal*vector*/
     1135  ideal I= (ideal)pMultMp(p,(matrix)v->CopyD(MATRIX_CMD));
     1136  if (r>0) I->rank=r;
     1137  idNormalize(I);
     1138  res->data = (char *)I;
     1139  return FALSE;
    11341140}
    11351141static BOOLEAN jjTIMES_MA_N1(leftv res, leftv u, leftv v)
     
    33753381,{jjTIMES_P,   '*',            VECTOR_CMD,     VECTOR_CMD, POLY_CMD, ALLOW_PLURAL | ALLOW_RING}
    33763382,{jjTIMES_MA_P1,'*',           IDEAL_CMD,      IDEAL_CMD,  POLY_CMD, ALLOW_PLURAL | ALLOW_RING}
    3377 ,{jjTIMES_MA_P2,'*',           IDEAL_CMD,      POLY_CMD,   IDEAL_CMD, NO_PLURAL | ALLOW_RING}
     3383,{jjTIMES_MA_P2,'*',           IDEAL_CMD,      POLY_CMD,   IDEAL_CMD, ALLOW_PLURAL | ALLOW_RING}
    33783384,{jjTIMES_ID,  '*',            IDEAL_CMD,      IDEAL_CMD,  IDEAL_CMD, ALLOW_PLURAL | ALLOW_RING}
    33793385,{jjTIMES_MA_P1,'*',           MODUL_CMD,      IDEAL_CMD,  VECTOR_CMD, ALLOW_PLURAL | ALLOW_RING}
    3380 ,{jjTIMES_MA_P2,'*',           MODUL_CMD,      VECTOR_CMD, IDEAL_CMD, NO_PLURAL | ALLOW_RING}
     3386,{jjTIMES_MA_P2,'*',           MODUL_CMD,      VECTOR_CMD, IDEAL_CMD, ALLOW_PLURAL | ALLOW_RING}
    33813387,{jjTIMES_ID,  '*',            MODUL_CMD,      IDEAL_CMD,  MODUL_CMD, ALLOW_PLURAL | ALLOW_RING}
    33823388,{jjTIMES_ID,  '*',            MODUL_CMD,      MODUL_CMD,  IDEAL_CMD, ALLOW_PLURAL | ALLOW_RING}
    33833389,{jjTIMES_MA_P1,'*',           MATRIX_CMD,     MATRIX_CMD, POLY_CMD, ALLOW_PLURAL | ALLOW_RING}
    3384 ,{jjTIMES_MA_P2,'*',           MATRIX_CMD,     POLY_CMD,   MATRIX_CMD, NO_PLURAL | ALLOW_RING}
     3390,{jjTIMES_MA_P2,'*',           MATRIX_CMD,     POLY_CMD,   MATRIX_CMD, ALLOW_PLURAL | ALLOW_RING}
    33853391,{jjTIMES_MA_N1,'*',           MATRIX_CMD,     MATRIX_CMD, NUMBER_CMD, ALLOW_PLURAL | ALLOW_RING}
    33863392,{jjTIMES_MA_N2,'*',           MATRIX_CMD,     NUMBER_CMD, MATRIX_CMD, ALLOW_PLURAL | ALLOW_RING}
  • kernel/matpol.cc

    rc1a5fd re14e1b0  
    197197  }
    198198  a->m[0] = pMult(a->m[0], p);
     199  return a;
     200}
     201
     202/*2
     203* multiply a poly 'p' by a matrix 'a', destroy the args
     204*/
     205matrix pMultMp(poly p, matrix a)
     206{
     207  int k, n = a->nrows, m = a->ncols;
     208
     209  pNormalize(p);
     210  for (k=m*n-1; k>0; k--)
     211  {
     212    if (a->m[k]!=NULL)
     213      a->m[k] = pMult(pCopy(p), a->m[k]);
     214  }
     215  a->m[0] = pMult(p, a->m[0]);
    199216  return a;
    200217}
  • kernel/matpol.h

    rc1a5fd re14e1b0  
    3838matrix mpMultI(matrix a, int f);
    3939matrix mpMultP(matrix a, poly p);
     40matrix pMultMp(poly p, matrix a);
    4041matrix mpAdd(matrix a, matrix b);
    4142matrix mpSub(matrix a, matrix b);
Note: See TracChangeset for help on using the changeset viewer.