Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/etc/ai/clause.hpp

Go to the documentation of this file.
00001 #ifndef __J2K__CLAUSE_HPP__
00002 #define __J2K__CLAUSE_HPP__
00003 
00004 #include <j2k/Fred/Standard.hpp>
00005 
00006 enum status_t
00007 {
00008   C_undefined = 0,
00009   C_false     = 1,
00010   C_true      = 2,
00011   C_nil       = 3,
00012   C_invalid   = 4
00013 };
00014 
00015 struct logic_t
00016 {
00017     char variables[26]; // ~P v Q v A  => P,Q,A  (for the loop)
00018     int  nbVariables;
00019 
00020     char  negated[26];   // negated[ 'P' - 'A' ] = 1  ~P
00021     char letters[26];    // letters[ 'P' - 'A' ] = 1
00022 };
00023 
00024 struct clause_t
00025 {
00026     int clause;
00027     int depth;
00028     int parents[2];
00029     int length;
00030  
00031     logic_t  logic;   
00032 
00033     status_t status;
00034 
00035     size_t len;
00036     char  string[ 160 ];
00037 };
00038 
00039 class Clause
00040 {
00041   private:
00042    clause_t data;
00043 
00044   public:
00045     Clause(); 
00046     Clause( const char* str0 );
00047     virtual ~Clause();
00048 
00049     Clause( clause_t src );
00050     const Clause& operator=( const Clause& src );
00051 
00052     Clause( const Clause& src );
00053     const Clause& Clause::operator=( clause_t src );
00054 
00055     void print(); 
00056     void assign( const char* str0 ); 
00057     void decompose();  
00058     void compose();
00059     clause_t compare( const Clause& src );
00060 };
00061 
00062 #endif

Generated on Sun Oct 14 18:46:30 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001