Changeset f7bfe5 in git


Ignore:
Timestamp:
Nov 17, 2006, 4:35:48 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
ca3e7b5e9ae94d45a0eebab22cb38d16c7542b01
Parents:
f41bd90135713026d8a1ff50059a2d95d034bf52
Message:
*hannes: mpMult


git-svn-id: file:///usr/local/Singular/svn/trunk@9497 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/matpol.cc

    rf41bd9 rf7bfe5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: matpol.cc,v 1.8 2006-11-17 14:31:06 Singular Exp $ */
     4/* $Id: matpol.cc,v 1.9 2006-11-17 15:35:48 Singular Exp $ */
    55
    66/*
     
    194194{
    195195  int i, j, k;
    196   poly s, t, aik, bkj;
    197196  int m = MATROWS(a);
    198197  int p = MATCOLS(a);
     
    211210  for (i=1; i<=m; i++)
    212211  {
    213     for (j=1; j<=q; j++)
    214     {
    215       t = NULL;
    216       for (k=1; k<=p; k++)
    217       {
    218         poly a_p, b_p;
    219         if (((a_p=MATELEM(a,i,k))!=NULL) && ((b_p=MATELEM(b,k,j))!=NULL))
     212    for (k=1; k<=p; k++)
     213    {
     214      poly aik;
     215      if ((aik=MATELEM(a,i,k))!=NULL)
     216      {
     217        for (j=1; j<=q; j++)
    220218        {
    221           s = ppMult_qq(a_p /*MATELEM(a,i,k)*/, b_p/*MATELEM(b,k,j)*/);
    222           t = pAdd(t,s);
     219          poly bkj;
     220          if ((bkj=MATELEM(b,k,j))!=NULL)
     221          {
     222            poly *cij=&(MATELEM(c,i,j));
     223            poly s = ppMult_qq(aik /*MATELEM(a,i,k)*/, bkj/*MATELEM(b,k,j)*/);
     224            if (/*MATELEM(c,i,j)*/ (*cij)==NULL) (*cij)=s;
     225            else (*cij) = pAdd((*cij) /*MATELEM(c,i,j)*/ ,s);
     226          }
    223227        }
    224228      }
    225       pNormalize(t);
    226       MATELEM(c,i,j) = t;
    227     }
    228   }
     229    //  pNormalize(t);
     230    //  MATELEM(c,i,j) = t;
     231    }
     232  }
     233  for(i=m*q-1;i>=0;i--) pNormalize(c->m[i]);
    229234  return c;
    230235}
Note: See TracChangeset for help on using the changeset viewer.