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


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

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

1.1
date	94.10.18.19.44.25;	author monica;	state Exp;
branches;
next	;


desc
@@


1.3
log
@added log
@
text
@// $Log$
#include "IntPoint.h"
#include "DblPoint.h"
#include <iostream.h>
#define REPORT_SUM(n,p) {cout << "expected\t" << n  << "\tgot\t "<< sum(p) << endl;}
#define REPORT_PROD(n,p) { cout << "expected\t" << n  << "\tgot\t "<< product(p) << endl;}
int vector[]={ 4, 1, 3, 2, 5, 6 };
double dvector[] = {4.0, 1.0, 3.0, 2.0, 6.0, 5.5};
int main()
{
    IA_Point<int>   ip;
    IA_Point<double> fp;

    ip = IA_Point<int>(1);
    REPORT_SUM(1,ip);
    ip = IA_Point<int>(0,1);
    REPORT_SUM(1,ip);
    ip = IA_Point<int>(0,1,2);
    REPORT_SUM(3,ip);
    ip = IA_Point<int>(0,1,2,3);
    REPORT_SUM(6,ip);
    ip = IA_Point<int>(4,0,1,2,3);
    REPORT_SUM(10,ip);
    ip = IA_Point<int>(&vector[0],6);
    REPORT_SUM(21,ip);


    ip = IA_Point<int>(1);
    REPORT_PROD(1,ip);
    ip = IA_Point<int>(1,2);
    REPORT_PROD(2,ip);
    ip = IA_Point<int>(1,2,3);
    REPORT_PROD(6,ip);
    ip = IA_Point<int>(4,1,2,3);
    REPORT_PROD(24,ip);
    ip = IA_Point<int>(4,1,2,3,5);
    REPORT_PROD(120,ip);
    ip = IA_Point<int>(&vector[0],6);
    REPORT_PROD(720,ip);
    
    fp = IA_Point<double>(1);
    REPORT_SUM(1.0,fp);
    fp = IA_Point<double>(0.0,1);
    REPORT_SUM(1.0,fp);
    fp = IA_Point<double>(1,2);
    REPORT_SUM(3.0,fp);
    fp = IA_Point<double>(0.0,1,2,3);
    REPORT_SUM(6.0,fp);
    fp = IA_Point<double>(4,0.0,1,2,3);
    REPORT_SUM(10.0,fp);
    fp = IA_Point<double>(&dvector[0], 6);
    REPORT_SUM(21.5,fp);

    fp = IA_Point<double>(1);
    REPORT_PROD(1,fp);
    fp = IA_Point<double>(1);
    REPORT_PROD(1,fp);
    fp = IA_Point<double>(1,2);
    REPORT_PROD(2,fp);
    fp = IA_Point<double>(1,2,3);
    REPORT_PROD(6,fp);
    fp = IA_Point<double>(4,1,2,3);
    REPORT_PROD(24,fp);
    fp = IA_Point<double>(&dvector[0], 6);
    REPORT_PROD(792,fp);
}

@


1.2
log
@*** empty log message ***
@
text
@d1 1
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
#include "FloatPoint.h"
@
