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


1.7
date	94.12.08.04.41.53;	author monica;	state Exp;
branches;
next	1.6;

1.6
date	94.11.09.20.25.21;	author monica;	state Exp;
branches;
next	1.5;

1.5
date	94.10.06.01.07.08;	author monica;	state Exp;
branches;
next	1.4;

1.4
date	94.08.17.04.12.11;	author monica;	state Exp;
branches;
next	1.3;

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

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

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


desc
@a test of an image restriction utility.
@


1.7
log
@removed unneeded include to system files and tutil.h
@
text
@// Emacs: -*- C++ -*-
static char rcsid[] = "$Id: test011.c,v 1.6 1994/11/09 20:25:21 monica Exp monica $";

//
// $Log: test011.c,v $
// Revision 1.6  1994/11/09  20:25:21  monica
// removed include devfrags & any debugging calls to malloc
//
// Revision 1.5  1994/10/06  01:07:08  monica
// updated for DOS file naming
//
// Revision 1.4  1994/08/17  04:12:11  monica
// added int main & return 0
//
// Revision 1.3  1992/11/11  12:17:52  thoth
// test of new restriction utility.
//
// Revision 1.2  92/11/04  12:03:15  thoth
// test of new image extension support routines.
// 
// Revision 1.1  92/10/21  14:58:56  thoth
// Initial revision
// 
//

#include "IntPoint.h"
#include "IntPS.h"
#include "PSIter.h"

#include "gen-test.h"
#include "pt-util.h"
#include "ps-util.h"

extern "C" {
    double drand48();
}

double	density;

int bullshit(const IA_Point<int> &) {
    return drand48()<density;
}

int main(int argc, char**argv)
{
    unsigned size, width;
    unsigned idx=0;

    idx++; size = (argc<idx+1) ? 2 : atoi(argv[idx]);
    idx++; width = (argc<idx+1) ? 40 : atoi(argv[idx]);
    idx++; density = (argc<idx+1) ? 0.5 : atof(argv[idx]);

    IA_Point<int>	inf_(extend_to_point(0,size));
    IA_Point<int>	sup_(extend_to_point((int)width-1,(int)size));
    IA_Set<IA_Point<int> > ps(inf_,sup_);

    IA_Set<IA_Point<int> >	ps1(size,bullshit), ps2(size,bullshit);

    cout << "constructing " << flush;

    ps1 &= ps;
    ps2 &= ps;

    cout << "testing " << flush;
    test_restriction(ps1, ps2);
    cout << "testing " << flush;
    test_dualrestriction(ps1, ps2);
    cout << "testing " << flush;
    test_extension(ps1, ps2);
    cout << "done\n" << flush;

    return 0;

}
@


1.6
log
@removed include devfrags & any debugging calls to malloc
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test011.c,v 1.5 1994/10/06 01:07:08 monica Exp monica $";
d6 3
a25 4
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>

a32 1
#include "tutil.h"
@


1.5
log
@updated for DOS file naming
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test011.c,v 1.4 1994/08/17 04:12:11 monica Exp monica $";
d6 3
a26 1
#include "devfrags.h"
@


1.4
log
@added int main & return 0
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test011.c,v 1.3 1992/11/11 12:17:52 thoth Exp monica $";
d6 3
d24 1
a24 1
#include "dev-frags.h"
d29 3
a31 3
#include "generic-tests.h"
#include "point-utils.h"
#include "pointset-utils.h"
@


1.3
log
@test of new restriction utility.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test011.c,v 1.2 92/11/04 12:03:15 thoth Exp Locker: thoth $";
d5 4
a8 1
// $Log:	test011.c,v $
d23 2
a24 2
#include "IntPointSet.h"
#include "IPSIter.h"
d37 1
a37 1
int bullshit(const IntPoint &) {
d50 3
a52 3
    IntPoint	inf_(extend_to_point(0,size));
    IntPoint	sup_(extend_to_point(width-1,size));
    IntPointSet ps(inf_,sup_);
d54 1
a54 1
    IntPointSet	ps1(size,bullshit), ps2(size,bullshit);
d68 3
@


1.2
log
@test of new image extension support routines.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test011.c,v 1.1 92/10/21 14:58:56 thoth Exp Locker: thoth $";
d6 3
d60 2
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test009.c,v 1.1 92/10/07 22:46:07 thoth Exp $";
d5 4
a8 1
// $Log:	test009.c,v $
d57 2
@
