source: git/factory/cf_eval.h @ 38ac8c

spielwiese
Last change on this file since 38ac8c was 38ac8c, checked in by Martin Lee <martinlee84@…>, 13 years ago
added new function to get random eval point added new function to set value of an evaluation point git-svn-id: file:///usr/local/Singular/svn/trunk@14247 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[493c477]1/* emacs edit mode for this file is -*- C++ -*- */
[341696]2/* $Id$ */
[2dd068]3
[493c477]4#ifndef INCL_CF_EVAL_H
5#define INCL_CF_EVAL_H
[2dd068]6
[ab4548f]7#include <config.h>
8
[c5323e]9#ifndef NOSTREAMIO
[1dc616]10#ifdef HAVE_IOSTREAM
11#include <iostream>
[181148]12#define OSTREAM std::ostream
[1dc616]13#elif defined(HAVE_IOSTREAM_H)
[2dd068]14#include <iostream.h>
[181148]15#define OSTREAM ostream
[1dc616]16#endif
[c5323e]17#endif /* NOSTREAMIO */
18
[2dd068]19#include "canonicalform.h"
20
21/*BEGINPUBLIC*/
22
23class Evaluation
24{
25protected:
26    CFArray values;
27public:
28    Evaluation() : values() {}
[3fe8ed4]29    Evaluation( int min0, int max0 ) : values( min0, max0 ) {}
[2dd068]30    Evaluation( const Evaluation & e ) : values( e.values ) {}
31    virtual ~Evaluation() {}
32    Evaluation& operator= ( const Evaluation & e );
33    int min() const { return values.min(); }
34    int max() const { return values.max(); }
35    CanonicalForm operator[] ( int i ) const { return values[i]; }
36    CanonicalForm operator[] ( const Variable & v ) const { return operator[](v.level()); }
37    CanonicalForm operator() ( const CanonicalForm& f ) const;
38    CanonicalForm operator() ( const CanonicalForm & f, int i, int j ) const;
[38ac8c]39    void setValue (int i, const CanonicalForm& f);
[2dd068]40    virtual void nextpoint();
[c5323e]41#ifndef NOSTREAMIO
[181148]42    friend OSTREAM& operator<< ( OSTREAM& s, const Evaluation &e );
[c5323e]43#endif /* NOSTREAMIO */
[2dd068]44};
45
46/*ENDPUBLIC*/
47
[493c477]48#endif /* ! INCL_CF_EVAL_H */
Note: See TracBrowser for help on using the repository browser.