head	1.13;
access;
symbols
	bobbase:1.13
	bob:1.13.1
	r2_1:1.12
	r2_0:1.12
	r1_1_beta:1.11
	r1_1_alpha:1.10
	r1_0:1.10
	r0_11:1.10
	r0_10:1.8
	r0_9:1.7
	Eglin_alpha_1:1.4;
locks; strict;
comment	@// @;


1.13
date	94.10.03.17.57.22;	author thoth;	state Exp;
branches
	1.13.1.1;
next	1.12;

1.12
date	94.08.22.15.10.59;	author thoth;	state Exp;
branches;
next	1.11;

1.11
date	94.07.25.16.45.35;	author thoth;	state Exp;
branches;
next	1.10;

1.10
date	94.04.26.18.08.17;	author thoth;	state Exp;
branches;
next	1.9;

1.9
date	94.03.14.15.36.05;	author thoth;	state Exp;
branches;
next	1.8;

1.8
date	94.01.31.16.35.07;	author thoth;	state Exp;
branches;
next	1.7;

1.7
date	93.11.17.17.58.49;	author thoth;	state Exp;
branches;
next	1.6;

1.6
date	93.09.15.12.28.54;	author thoth;	state Exp;
branches;
next	1.5;

1.5
date	93.08.18.16.56.25;	author thoth;	state Exp;
branches;
next	1.4;

1.4
date	93.06.10.17.10.05;	author thoth;	state Exp;
branches;
next	1.3;

1.3
date	93.05.26.16.32.09;	author thoth;	state Exp;
branches;
next	1.2;

1.2
date	93.05.26.13.49.04;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.04.17.20.16.48;	author thoth;	state Exp;
branches;
next	;

1.13.1.1
date	94.10.19.15.14.13;	author thoth;	state Exp;
branches;
next	1.13.1.2;

1.13.1.2
date	94.12.08.14.50.08;	author thoth;	state Exp;
branches;
next	;


desc
@force instantiation of various valuesets.
@


1.13
log
@Added iterators.
removed the binary ops between Sets and scalars since they were
inaccessible to users and unused by the IA_Set class.
@
text
@// Emacs: -*- C++ -*-

//
//	Copyright 1993, Center for Computer Vision and Visualization,
//	University of Florida.  All rights reserved.
//

static char copyright[] = "Copyright 1993, Center for Computer Vision and Visualization,\nUniversity of Florida.  All rights reserved.\n";

static char closure_c_rcsid[] = "$Id: closure.c,v 1.12 1994/08/22 15:10:59 thoth Exp thoth $";

//
// $Log: closure.c,v $
// Revision 1.12  1994/08/22  15:10:59  thoth
// DOS-inspired name rework
//
// Revision 1.11  1994/07/25  16:45:35  thoth
// Name sanitization.
//
// Revision 1.10  1994/04/26  18:08:17  thoth
// Added compare function between Sets.
//
// Revision 1.9  1994/03/14  15:36:05  thoth
// Set is now the primary entity in this package.
//
// Revision 1.8  1994/01/31  16:35:07  thoth
// We now have ValueSets of IA_Bits.
//
// Revision 1.7  1993/11/17  17:58:49  thoth
// added complex, removed char and double for now.
// Pointcmp is now pointcmp.
//
// Revision 1.6  1993/09/15  12:28:54  thoth
// ValueSet<double>
//
// Revision 1.5  93/08/18  16:56:25  thoth
// added support for ValueSet<char> so that bit image work can continue.
// 
// Revision 1.4  93/06/10  17:10:05  thoth
// more placebos for 3.0.1
// 
// Revision 1.3  93/05/26  16:32:09  thoth
// Copyright Notices
// 
// Revision 1.2  93/05/26  13:49:04  thoth
// add the ValueSet<FloatPoint> for FloatPointSet
// 
// Revision 1.1  93/04/17  20:16:48  thoth
// Initial revision
// 
//

#include <sys/types.h>
#include <iostream.h>
#include <complex.h>
#include "DblPoint.h"
#include "Bit.h"
#include "RGB.h"
#define SUPPRESS_INCLUDE
#include "Set.h"
#include "SetIter.h"
#include "ValueSet.h"

#define exercise_Set(T)				\
static void nothing(T *)			\
{						\
  IA_Set<T>	vs0,vs1(1),vs2(1,2);		\
  IA_Set<T>	vs3(1,2,3),vs4(1,2,3,4);	\
  IA_Set<T>	vs5(1,2,3,4,5);			\
  IA_SetIter<T>	iter1, iter2(vs2), iter3(iter2);\
  T	temp;					\
						\
  vs1=vs2;					\
  (void)vs1.contains(vs1.min());		\
  (void)vs2.contains(vs2.max());		\
  (void)vs2.empty();				\
						\
  (void)(vs1&vs2);				\
  (void)(vs1|vs2);				\
  (void)(vs1/vs2);				\
  (void)(vs1^vs2);				\
						\
  (void)(vs1&temp);				\
  (void)(vs1|temp);				\
  (void)(vs1/temp);				\
  (void)(vs1^temp);				\
						\
  (void)(temp&vs1);				\
  (void)(temp|vs1);				\
  (void)(temp/vs1);				\
  (void)(temp^vs1);				\
						\
  (void)compare(vs1,vs2);			\
						\
  (void) (vs1 <  vs2);				\
  (void) (vs1 <= vs2);				\
  (void) (vs1 == vs2);				\
  (void) (vs1 != vs2);				\
  (void) (vs1 >= vs2);				\
  (void) (vs1 >  vs2);				\
						\
  (void) (vs1 <  temp);				\
  (void) (vs1 <= temp);				\
  (void) (vs1 == temp);				\
  (void) (vs1 != temp);				\
  (void) (vs1 >= temp);				\
  (void) (vs1 >  temp);				\
						\
  (void) (temp <  vs2);				\
  (void) (temp <= vs2);				\
  (void) (temp == vs2);				\
  (void) (temp != vs2);				\
  (void) (temp >= vs2);				\
  (void) (temp >  vs2);				\
  /*cout << vs1;*/				\
						\
  iter1 = vs1;					\
  iter1 = iter2;				\
  iter1.domain();				\
  iter1(temp);					\
  iter1.reset();				\
}

#define exercise_VS(T)				\
static void nothing(T *)			\
{						\
  IA_ValueSet<T>	vs1,vs2(1,2,3,4,5);	\
  T	temp;					\
						\
  vs1=vs2;					\
  (void)vs1.contains(vs1.min());		\
  (void)vs2.contains(vs2.max());		\
  (void)vs2.empty();				\
  (void)vs2.iterator();				\
						\
  (void)(vs1&vs2);				\
  (void)(vs1|vs2);				\
  (void)(vs1/vs2);				\
  (void)(vs1^vs2);				\
				/*		\
  (void)(vs1&temp);				\
  (void)(vs1|temp);				\
  (void)(vs1/temp);				\
  (void)(vs1^temp);				\
						\
  (void)(temp&vs1);				\
  (void)(temp|vs1);				\
  (void)(temp/vs1);				\
  (void)(temp^vs1);		*/		\
						\
  /*(void)compare(vs1,vs2);*/			\
						\
  (void) (vs1 <  vs2);				\
  (void) (vs1 <= vs2);				\
  (void) (vs1 == vs2);				\
  (void) (vs1 != vs2);				\
  (void) (vs1 >= vs2);				\
  (void) (vs1 >  vs2);				\
/*						\
  (void) (vs1 <  temp);				\
  (void) (vs1 <= temp);				\
  (void) (vs1 == temp);				\
  (void) (vs1 != temp);				\
  (void) (vs1 >= temp);				\
  (void) (vs1 >  temp);				\
						\
  (void) (temp <  vs2);				\
  (void) (temp <= vs2);				\
  (void) (temp == vs2);				\
  (void) (temp != vs2);				\
  (void) (temp >= vs2);				\
  (void) (temp >  vs2);		*/		\
  cout << vs1;					\
}

exercise_Set(int)
exercise_Set(IA_Bit)
exercise_Set(u_char)
//exercise_Set(char)
exercise_Set(float)
//exercise_Set(double)
exercise_VS(IA_Point<double>)
exercise_Set(complex)
exercise_Set(IA_RGB)

void dummy()
{
  nothing((int*)0);
  nothing((IA_Bit*)0);
  nothing((u_char*)0);
//  nothing((char*)0);
  nothing((float*)0);
  nothing((IA_Point<double>*)0);
//  nothing((double*)0);
  nothing((complex*)0);
  nothing((IA_RGB*)0);
}

// pacify the cowardly template instantiator

ostream &operator<<(ostream&o,const IA_Point<double>&)
{
    return o;
}


IA_Point<double>::IA_Point(const IA_Point<double>&) { }


int pointcmp(const IA_Point<double>&, const IA_Point<double>&) {
  return 0;
}

int IA_Point<double>::operator< (const IA_Point<double>&) const { return 0; }
int IA_Point<double>::operator> (const IA_Point<double>&) const { return 0; }
IA_Point<double>& IA_Point<double>::operator= (const IA_Point<double>&) { return *this; }
int IA_Point<double>::operator!= (const IA_Point<double>&) const { return 0; }
int IA_Point<double>::operator== (const IA_Point<double>&) const { return 0; }

ostream & operator<<(ostream&o, complex) {
    return o;
}

void ia_throw(IA::Error, char*, int) { }
void ia_throw(const IA::Exception&) { }
void IA::not_yet_implemented(char*, int) { }

ostream&
GenericException::diagnose ( ostream&o ) const { return o; }

int main()
{
    return 0;
}
@


1.13.1.1
log
@Instantiate new Function and Closure sets.
Instantiate iterators.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.13 1994/10/03 17:57:22 thoth Exp thoth $";
a13 5
// Revision 1.13  1994/10/03  17:57:22  thoth
// Added iterators.
// removed the binary ops between Sets and scalars since they were
// inaccessible to users and unused by the IA_Set class.
//
a62 11
#include "ClosureSet.h"

template <class T>
class spam: public IA_ClosureSet<T> {
public:
    IA_ClosureSet<T> *clone_self() const {
	return new spam<T>(*this);
    }
    int contains(T) const { return 0; }
    IA::Type type() const { return 0; }
};
d70 1
a70 3
  IA_Set<T>	vs6((int(*)(T))0);		\
  IA_Set<T>	vs7((int(*)(const T&))0);	\
  IA_Set<T>	vs8(spam<T>());	\
a116 1
  IA_SetIter<T>	iter1, iter2(vs2), iter3(iter2);\
@


1.13.1.2
log
@individual comparators are gone from Valueset.
throw of enumerated type is obsolete.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.13.1.1 1994/10/19 15:14:13 thoth Exp $";
a13 4
// Revision 1.13.1.1  1994/10/19  15:14:13  thoth
// Instantiate new Function and Closure sets.
// Instantiate iterators.
//
d170 1
a170 1
  (void)compare(vs1,vs2);			\
d172 1
a172 1
  /*(void) (vs1 <  vs2);				\
d178 1
a178 1
						\
d243 1
a243 1
//void ia_throw(IA::Error, char*, int) { }
@


1.12
log
@DOS-inspired name rework
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.11 1994/07/25 16:45:35 thoth Exp thoth $";
d14 3
d61 1
d67 4
a70 1
  IA_Set<T>	vs1,vs2(1,2,3,4,5);	\
d116 6
d134 1
d140 1
a140 1
						\
d149 1
a149 1
  (void)(temp^vs1);				\
d159 1
a159 1
						\
d172 1
a172 1
  (void) (temp >  vs2);				\
d225 10
@


1.11
log
@Name sanitization.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.10 1994/04/26 18:08:17 thoth Exp thoth $";
d14 3
d53 1
a53 1
#include "DoublePoint.h"
@


1.10
log
@Added compare function between Sets.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.9 1994/03/14 15:36:05 thoth Exp thoth $";
d14 3
d50 1
a50 1
#include "FloatPoint.h"
d165 1
a165 1
exercise_VS(IA_FloatPoint)
d176 1
a176 1
  nothing((IA_FloatPoint*)0);
d179 1
d184 1
a184 1
ostream &operator<<(ostream&o,const IA_FloatPoint&)
a188 3
#define FP IA_Point<double>
#define PT IA_Point
// #define PT IA_FloatPoint
d190 1
a190 1
FP::PT(const FP&) { }
d193 1
a193 1
int pointcmp(const FP&, const FP&) {
d197 5
a201 5
int FP::operator< (const FP&) const { return 0; }
int FP::operator> (const FP&) const { return 0; }
FP& FP::operator= (const FP&) { return *this; }
int FP::operator!= (const FP&) const { return 0; }
int FP::operator== (const FP&) const { return 0; }
@


1.9
log
@Set is now the primary entity in this package.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.8 1994/01/31 16:35:07 thoth Exp thoth $";
d14 3
d80 1
a80 1
  /*(void)compare(vs1,vs2);*/			\
@


1.8
log
@We now have ValueSets of IA_Bits.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.7 1993/11/17 17:58:49 thoth Exp thoth $";
d14 3
d41 1
d46 3
d51 51
d128 1
a128 1
  (void)compare(vs1,vs2);			\
d153 6
a158 6
exercise_VS(int)
exercise_VS(IA_Bit)
exercise_VS(u_char)
//exercise_VS(char)
exercise_VS(float)
//exercise_VS(double)
d160 2
a161 1
exercise_VS(complex)
@


1.7
log
@added complex, removed char and double for now.
Pointcmp is now pointcmp.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.6 1993/09/15 12:28:54 thoth Exp thoth $";
d14 4
d41 1
d96 1
d107 1
@


1.6
log
@ValueSet<double>
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.5 93/08/18 16:56:25 thoth Exp Locker: thoth $";
d13 4
a16 1
// $Log:	closure.c,v $
d35 1
d92 1
a92 1
exercise_VS(char)
d94 1
a94 1
exercise_VS(double)
d96 1
d102 1
a102 1
  nothing((char*)0);
d105 2
d123 1
a123 1
int Pointcmp(const FP&, const FP&) {
d132 4
@


1.5
log
@added support for ValueSet<char> so that bit image work can continue.
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.4 93/06/10 17:10:05 thoth Exp Locker: thoth $";
d14 3
d90 1
@


1.4
log
@more placebos for 3.0.1
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.3 93/05/26 16:32:09 thoth Exp $";
d14 3
d85 1
d93 1
d105 3
a107 1
IA_FloatPoint::IA_FloatPoint(const IA_FloatPoint&) { }
d109 4
a112 1
int Pointcmp(const IA_FloatPoint&, const IA_FloatPoint&) {
d116 5
a120 5
int IA_FloatPoint::operator< (const IA_FloatPoint&) const { return 0; }
int IA_FloatPoint::operator> (const IA_FloatPoint&) const { return 0; }
IA_FloatPoint& IA_FloatPoint::operator= (const IA_FloatPoint&) { return *this; }
int IA_FloatPoint::operator!= (const IA_FloatPoint&) const { return 0; }
int IA_FloatPoint::operator== (const IA_FloatPoint&) const { return 0; }
@


1.3
log
@Copyright Notices
@
text
@d10 1
a10 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.2 93/05/26 13:49:04 thoth Exp Locker: thoth $";
d14 3
d93 2
d99 14
@


1.2
log
@add the ValueSet<FloatPoint> for FloatPointSet
@
text
@a1 1
static char closure_c_rcsid[] = "$Id: closure.c,v 1.1 93/04/17 20:16:48 thoth Exp Locker: thoth $";
d4 9
d14 3
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char closure_c_rcsid[] = "$Id: test100.c,v 1.1 92/11/14 09:45:50 jnw Exp Locker: jnw $";
d5 4
a8 1
// $Log:	test100.c,v $
d12 1
d69 1
d76 6
@
