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.cpp File Reference

#include <j2k/etc/ai/clause.hpp>

Go to the source code of this file.

Functions

void dump (clause_t data)
int main ()


Function Documentation

void dump clause_t    data
 

Definition at line 239 of file clause.cpp.

Referenced by main().

00240 {
00241   register int i = 0;
00242 
00243   // Convert struct to bytes 
00244   char* ptr = (char*)(&data);
00245 
00246   printf( "{" );
00247 
00248   // Printing bytes by ASCII value.
00249   for( ; i < sizeof( clause_t ); i++ )
00250   {
00251     printf( "%d,", (int)ptr[i] );    
00252   }
00253 
00254   printf( "} \n" );
00255 
00256   printf( "P=[%d] \n", data.logic.letters[ 'P' - 'A' ] );
00257 }

int main void   
 

Definition at line 261 of file clause.cpp.

00262 {
00263   Clause p( "P v Q v T v W v ~A" );
00264   Clause q( "~Q v A V W v Z " );
00265 
00266   p.print();
00267   q.print();
00268 
00269   clause_t tmp = p.compare( q );
00270 
00271   printf( "Status=[%d] \n", (int)tmp.status );
00272 
00273   dump( tmp );
00274 
00275   Clause t( tmp );
00276 
00277   t.print();
00278 
00279   return 0;
00280 }


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