Changeset 9d0c2b in git for kernel/summator.cc


Ignore:
Timestamp:
Jul 8, 2008, 10:18:27 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
77987005e6c432b32a83558af620b8a21ecaa8cc
Parents:
9d249b2bd6e53779def56a0139a8157d70ec75c1
Message:
*hannes: syntax


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

Legend:

Unmodified
Added
Removed
  • kernel/summator.cc

    r9d249b r9d0c2b  
    66 *  Purpose: simple Summator usecase implementation
    77 *  Author:  motsak
    8  *  Created: 
    9  *  Version: $Id: summator.cc,v 1.1 2008-07-04 14:19:38 motsak Exp $
     8 *  Created:
     9 *  Version: $Id: summator.cc,v 1.2 2008-07-08 08:18:27 Singular Exp $
    1010 *******************************************************************/
    1111
     
    2020
    2121#include "mod2.h"
    22 
     22#ifdef HAVE_PLURAL
    2323#include <summator.h> // for CPolynomialSummator class
    2424#include <ring.h>
     
    4141    m_temp.m_bucket = sBucketCreate(rBaseRing);
    4242  }
    43 };
     43}
    4444
    4545/*
     
    5050#ifdef PDEBUG
    5151  p_Test(pInitialSum, rBaseRing);
    52 #endif   
     52#endif
    5353
    5454  if(bUsePolynomial)
     
    7676#ifdef PDEBUG
    7777      p_Test(m_temp.m_poly, m_basering);
    78 #endif   
    79      
     78#endif
    8079      p_Delete(&m_temp.m_poly, m_basering);
    8180//      m_temp.m_poly = NULL;
     
    8786#ifdef PDEBUG
    8887  p_Test(pSummand, m_basering);
    89 #endif   
    90  
     88#endif
     89
    9190  if(m_bUsePolynomial)
    9291    m_temp.m_poly = p_Add_q(m_temp.m_poly, pSummand, m_basering);
     
    9998#ifdef PDEBUG
    10099  p_Test(pSummand, m_basering);
    101 #endif   
     100#endif
    102101
    103102  if(m_bUsePolynomial)
     
    110109{
    111110  poly out = NULL;
    112  
     111
    113112  if(m_bUsePolynomial)
    114113  {
    115114    out = m_temp.m_poly;
    116115    m_temp.m_poly = NULL;
    117   } else
     116  }
     117  else
    118118  {
    119119    int pLength;
     
    123123#ifdef PDEBUG
    124124  p_Test(out, m_basering);
    125 #endif   
    126  
     125#endif
     126
    127127  return out;
    128128}
     
    132132{
    133133  poly out = NULL;
    134  
     134
    135135  if(m_bUsePolynomial)
    136136  {
     
    138138    m_temp.m_poly = NULL;
    139139    *piLength = pLength(out);
    140   } else
     140  }
     141  else
    141142  {
    142143    *piLength = 0;
     
    147148  p_Test(out, m_basering);
    148149  assume(pLength(out) == *piLength);
    149 #endif   
    150  
     150#endif
     151
    151152  return out;
    152153}
     
    157158{
    158159  AddAndDelete(p_Copy(pSummand, m_basering), iLength);
    159 };
     160}
    160161
    161162void CPolynomialSummator::Add(poly pSummand)
    162163{
    163164  AddAndDelete(p_Copy(pSummand, m_basering));
    164 };
     165}
    165166
    166 
     167#endif
Note: See TracChangeset for help on using the changeset viewer.