head	1.4;
access
	monica
	thoth;
symbols;
locks; strict;
comment	@// @;


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

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

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

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


desc
@Simple visual check of basic image operations.
@


1.4
log
@updated type names
@
text
@// Emacs: -*- C++ -*-
static char test104_rcsid[] = "$Id: test104.c,v 1.3 1994/08/24 00:30:59 monica Exp monica $";

//
// $Log: test104.c,v $
// Revision 1.3  1994/08/24  00:30:59  monica
// int main & exit(0)
//
//Revision 1.2  1994/08/18  22:17:06  thoth
//incomplete updating.
//
// Revision 1.1  93/03/10  13:56:15  thoth
// Initial revision
// 

#include "IntPS.h"
#include "IntDI.h"
//#include "OtherI.h"
#include "test-ops.h"

IA_Point<int> make_random_IntPoint(unsigned dim, int mag)
{
  int	*d = new int[dim];
  for (unsigned i=0; i<dim; i++) {
    d[i] = (int)(lrand48()%mag);
  }
  return IA_Point<int> (d,dim);
}

typedef IA_Image<IA_Point<int>, int> IntDI;

int main()
{
  IA_Set<IA_Point<int> >	ps(IA_Point<int>(0,0), IA_Point<int>(3,3));
  IntDI	i1(RandomDI<int>(ps,-2,2)), i2(RandomDI<int>(ps,1,4));

  // this congeals the random values
  i1 = i1.restrict(ps);
  i2 = i2.restrict(ps);

  cout << "i1:\n" << i1;
  cout << "i2:\n" << i2;

  cout << "i1+i2:\n" << i1+i2;
  cout << "i1-i2:\n" << i1-i2;
  cout << "i1*i2:\n" << i1*i2;
  cout << "i1/i2:\n" << i1/i2;

  exit(0);
}
@


1.3
log
@int main & exit(0)
@
text
@d2 1
a2 1
static char test104_rcsid[] = "$Id: test104.c,v 1.2 1994/08/18 22:17:06 thoth Exp monica $";
d6 3
d16 1
a16 1
#include "IntPointSet.h"
d18 1
a18 1
#include "OtherI.h"
d21 1
a21 1
IA_IntPoint make_random_IntPoint(unsigned dim, int mag)
d27 1
a27 1
  return IA_IntPoint(d,dim);
d30 1
a30 1
typedef IA_IntDiscreteImage	IntDI;
d34 1
a34 1
  IA_IntPointSet	ps(IA_IntPoint(0,0), IA_IntPoint(3,3));
@


1.2
log
@incomplete updating.
@
text
@d2 1
a2 1
static char test104_rcsid[] = "$Id: test104.c,v 1.1 93/03/10 13:56:15 thoth Exp Locker: thoth $";
d5 4
a8 1
// $Log:	test104.c,v $
d45 2
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char test104_rcsid[] = "$Id: test103.c,v 1.1 93/02/20 16:49:59 thoth Exp $";
d5 4
a8 1
// $Log:	test103.c,v $
d11 2
a12 2
#include "IntDiscreteImage.h"
#include "OtherDI.h"
d15 1
a15 1
IntPoint make_random_IntPoint(unsigned dim, int mag)
d21 1
a21 1
  return IntPoint(d,dim);
d28 1
a28 1
  IA_IntPointSet	ps(IntPoint(0,0), IntPoint(3,3));
@
