Changeset b9624d6 in git for Singular/fglmgauss.cc


Ignore:
Timestamp:
Jun 4, 1998, 3:39:21 PM (26 years ago)
Author:
Tim Wichmann <wichmann@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
9bc55636ce6d395563fd45ac7d2eee0dbcaf046d
Parents:
87be9cbe919257412a7b85444fc35ac94702bf38
Message:
* wichmann: + added HAVE_EXPLICIT_CONSTR support


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

Legend:

Unmodified
Added
Removed
  • Singular/fglmgauss.cc

    r87be9cb rb9624d6  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmgauss.cc,v 1.8 1998-06-03 15:25:18 obachman Exp $
     2// $Id: fglmgauss.cc,v 1.9 1998-06-04 13:39:21 wichmann Exp $
    33
    44/****************************************
     
    3232        newfac= NULL;
    3333    }
    34 #ifndef HAVE_EXPLICIT_CONSTR
    35     void mac_gaussElem( const fglmVector newv, const fglmVector newp, number & newpdenom, number & newfac )
     34
     35#ifndef HAVE_EXPLICIT_CONSTR
     36  gaussElem() : v(), p(), pdenom(NULL), fac(NULL) {}
     37
     38  void mac_gaussElem( const fglmVector newv, const fglmVector newp, number & newpdenom, number & newfac )
    3639    {
    3740    v= newv;
     
    4346    }
    4447#endif
     48
    4549    ~gaussElem()
    4650    {
     
    5559    size= 0;
    5660    max= dimen;
     61#ifndef HAVE_EXPLICIT_CONSTR
     62    elems= new gaussElem[ max+1 ];
     63#else
    5764    elems= (gaussElem *)Alloc( (max+1)*sizeof( gaussElem ) );
     65#endif
    5866    isPivot= (BOOLEAN *)Alloc( (max+1)*sizeof( BOOLEAN ) );
    5967    for ( k= max; k > 0; k-- )
     
    6573{
    6674    int k;
     75
     76#ifndef HAVE_EXPLICIT_CONSTR
     77    delete [] elems;
     78#else
    6779    for ( k= size; k > 0; k-- )
    6880        elems[k].~gaussElem();
    6981    Free( (ADDRESS)elems, (max+1)*sizeof( gaussElem ) );
     82#endif
     83
    7084    Free( (ADDRESS)isPivot, (max+1)*sizeof( BOOLEAN ) );
    7185    Free( (ADDRESS)perm, (max+1)*sizeof( int ) );
Note: See TracChangeset for help on using the changeset viewer.