source: git/factory/cf_reval.cc @ c284ce

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