Polaris: Monotonicity.h Source File

Monotonicity.h

Go to the documentation of this file.
00001 #ifndef _MONOTONICITY_H
00002 #define _MONOTONICITY_H
00003 ///
00004 #ifdef POLARIS_GNU_PRAGMAS
00005 #pragma interface
00006 #endif
00007 ///
00008 #include "ClassNames.h"
00009 #include "Listable.h"
00010 ///
00011 enum MONO_DIR {
00012     MONO_POSITIVE,     /// sign is positive
00013     MONO_NEGATIVE,     /// sign is negative
00014     MONO_DIR_UNKNOWN
00015 };
00016 ///
00017 enum MONO_MOV {
00018     MONO_VARYING,     /// term is assuming a succession of values
00019     MONO_CONSTANT,    /// term is a single value
00020     MONO_MOV_UNKNOWN
00021 };
00022 ///
00023 ///
00024 class Monotonicity : public Listable {
00025 
00026  protected:
00027     MONO_DIR _direction;
00028     MONO_MOV _movement;
00029 
00030  public:
00031     Monotonicity( );
00032     Monotonicity( MONO_DIR direction, MONO_MOV movement);
00033     Monotonicity( const Monotonicity & other );
00034 
00035     ~Monotonicity( );
00036 
00037     virtual Listable *listable_clone() const;
00038 
00039     virtual Monotonicity *clone() const;
00040 
00041     void monotonicity ( Monotonicity mon );
00042     MONO_DIR mono_dir ( ) const;
00043     MONO_MOV mono_mov ( ) const;
00044 
00045     bool unknown_dir  ( ) const;
00046     bool unknown_mov  ( ) const;
00047     bool positive ( ) const;
00048     bool negative ( ) const;
00049     bool varying  ( ) const;
00050     bool constant ( ) const;
00051     void set_unknown_dir( );
00052     void set_positive ( );
00053     void set_negative ( );
00054     void set_unknown_mov( );
00055     void set_varying  ( );
00056     void set_constant ( );
00057 
00058     ///< This one is to satisfy Listable
00059     virtual void    print(ostream & o) const;
00060 
00061     friend ostream & operator << (ostream & o, const Monotonicity & ad);
00062 };
00063 
00064 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:59 2005