source: git/factory/cf_reval.cc @ fc11f45

fieker-DuValspielwiese
Last change on this file since fc11f45 was 661ca5e, checked in by Wilfred Pohl <pohl@…>, 18 years ago
nextpoint git-svn-id: file:///usr/local/Singular/svn/trunk@8800 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 800 bytes
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id: cf_reval.cc,v 1.7 2005-11-18 10:03:50 pohl Exp $ */
3
4#define MORE_ZEROES
5
6#include <config.h>
7
8#include "assert.h"
9
10#include "cf_defs.h"
11#include "cf_reval.h"
12
13
14REvaluation::REvaluation( const REvaluation & e )
15{
16    if ( e.gen == 0 )
17        gen = 0;
18    else
19        gen = e.gen->clone();
20    values = e.values;
21}
22
23REvaluation::~REvaluation()
24{
25    if ( gen != 0 )
26        delete gen;
27}
28
29REvaluation&
30REvaluation::operator= ( const REvaluation & e )
31{
32    if ( this != &e ) {
33        if (gen!=0)
34          delete gen;
35        values = e.values;
36        if ( e.gen == 0 )
37            gen = 0;
38        else
39            gen = e.gen->clone();
40    }
41    return *this;
42}
43
44void
45REvaluation::nextpoint()
46{
47    int n = values.max();
48    for ( int i = values.min(); i <= n; i++ )
49        values[i] = gen->generate();
50}
Note: See TracBrowser for help on using the repository browser.