head	1.3;
access
	monica
	thoth
	fjsoria;
symbols
	Eglin_alpha_1:1.1;
locks
	monica:1.3; strict;
comment	@// @;


1.3
date	94.12.06.21.27.03;	author monica;	state Exp;
branches;
next	1.2;

1.2
date	94.08.21.15.21.38;	author monica;	state Exp;
branches;
next	1.1;

1.1
date	93.02.23.12.06.42;	author reti;	state Exp;
branches;
next	;


desc
@@


1.3
log
@modified p8 to output sets
@
text
@#include <iostream.h>
#include "DblPoint.h"
#include "IntPoint.h"
#include "IntPS.h"
#include "PSIter.h"

IA_Point<int> i11(-1),i12(1),i13(3),i4(4),
         i21(-3,-1),i22(1,3),i23(2,-2),i24(-2,2);

IA_Set<IA_Point<int> >
         s11(i11),    s12(i13),    s13(i22),
	 s21(i11,i12),s22(i11,i13),s23(i12,i13),s24(i13,i12),
	 s31(i21,i22),s32(i21,i23),s33(i21,i24),s34(i22,i23),s35(i22,i24);

void set ( IA_Set<IA_Point<int> > a)
{
    if (a.empty()) cout << " empty set ";
    IA_PSIter<IA_Point<int> > it;IA_Point<int> po;
    it=a;
    while (it(po)) cout << po;
}    
	
void set2 ( IA_Set<IA_Point<int> > a)
{
    if (a.empty()) cout << " empty set ";
    IA_PSIter<IA_Point<int> > it(a);IA_Point<int> po;
    while (it(po)) cout << po;
}    
	
void com (IA_Set<IA_Point<int> > a,IA_Set<IA_Point<int> > b)
{
		   switch (compare(a,b))
		   {
		    case 0: cout<< "P_SUBSET"; break;
	            case 1: cout<< "MP_SUBSET";break;
		    case 2: cout<< "EQUAL"; break;
		    case 3: cout<< "MP_SUPERSET";break;
		    case 4: cout<< "P_SUPERSET";break;
		    case 5: cout<< "NO_REL";break;
		    case 6: cout<< "UNKNOWN";break;
		    default: break;	
		   };
}

#define p11(a,op,op2,b)\
                   cout<< "\n\t";\
		   set(a);\
                   cout<< "\n\t"<< op << "\n\t";\
		   set(b);\
		   cout<< "\n\t result: ";\
		   set(a op2 b);\
		   cout<< "\n";
		   
#define p12(a,b)\
                   cout<< "\n\t compare \n\t";\
		   set(a); cout<<"\n\t";\
                   set(b);\
		   cout<<"\n\t  result:" ;\
                   com(a,b);\
		   cout << "\n"\
		   
#define p13(a,op,op2,b)\
                   cout<< "\n\t";\
		   set(a);\
                   cout<< "\n\t"<< op << "\n\t";\
		   set(b);\
		   cout<< "\n";\
		   (a  op2 b)==0 ? cout <<"\tresult:False\n" \
		                    : cout <<"\tresult:True\n" 

#define p14(op,op2,a)\
                   cout<< "\n\t" << op <<"\t" ;\
		   set(a);\
                   cout <<"\n\t result:" << a.op2() << "\n"
                  
    
#define p15(op,op2,a)\
                   cout<< "\n\t" << op <<"\t" ;\
		   set2(a);\
                   cout <<"\n\t result:" << a.op2() << "\n"
                  
    
#define p5(a,op,op2)\
                   cout<< "\n\t" << a <<"\t" << op <<"\n";\
		   cout <<"\t result:" << (a op2 )<< "\n"

#define p7(a,b)\
                   cout<<"\n\t"<<a<<"\t concat \t"<<b<<"\n";\
		   cout<<"\t result:" << concat(a,b) <<"\n"
		   
#define p8(f,f2,b,c)\
                   cout << "\n\t" << f;\
		   set(b);\
		   cout << "\n\t with \n\t";\
		   set(c);\
		   cout << "\t result:";\
		   set(f2(b,c));\
		   cout << "\n"

#define p9(f,f2,b)\
                   cout<<"\n\t"<<f<<"("<<b<<")\n";\
		   cout<<"\t result:" << f2(b) <<"\n"

inline void r3(char h)
{
  cout <<"\t result: ";
  switch (h)
      {
      case -1: cout << "< "; break;
      case  0: cout << "=="; break;
      case  1: cout << "> "; break;
      }
}

@


1.2
log
@updated for file name shortening (DblPoint, etc)
@
text
@d92 7
a98 2
                   cout<<"\n\t"<<f<<"("<< b<<","<<c<<")\n";\
		   cout<<"\t result:" << f2(b,c) <<"\n"
@


1.1
log
@Initial revision
@
text
@d2 4
a5 3
#include <FloatPoint.h>
#include <IntPoint.h>
#include "IntPointSet.h"
d7 1
a7 5
//#include <YoderIPSIter.h>
//#include <BoxyIPSIter.h>
#include "IPSIter.h"

IntPoint i11(-1),i12(1),i13(3),i4(4),
d10 1
a10 1
IntPointSet
d15 1
a15 1
void set ( IntPointSet a)
d18 1
a18 1
    IPSIter it;IntPoint po;
d23 8
a30 1
void com (IntPointSet a,IntPointSet b)
d72 8
a79 2
                   cout<< "\n\t" << op <<"\t" ;               \
		   set(a);                                    \
@
