head	2.21;
access;
symbols
	bobbase:2.21
	bob:2.21.1
	r2_1:2.21
	r2_0:2.21
	r1_1_beta:2.19
	r1_1_alpha:2.18
	r1_0:2.18
	r0_11:2.18
	r0_10:2.15
	r0_9:2.15
	Eglin_alpha_1:2.13;
locks
	thoth:2.21; strict;
comment	@// @;


2.21
date	94.08.22.14.39.02;	author thoth;	state Exp;
branches
	2.21.1.1;
next	2.20;

2.20
date	94.08.16.20.59.00;	author fjsoria;	state Exp;
branches;
next	2.19;

2.19
date	94.07.25.16.42.26;	author thoth;	state Exp;
branches;
next	2.18;

2.18
date	94.04.27.04.05.55;	author jnw;	state Exp;
branches;
next	2.17;

2.17
date	94.03.14.18.44.44;	author jnw;	state Exp;
branches;
next	2.16;

2.16
date	94.03.14.18.16.38;	author jnw;	state Exp;
branches;
next	2.15;

2.15
date	93.11.16.13.27.10;	author thoth;	state Exp;
branches;
next	2.14;

2.14
date	93.09.15.12.26.01;	author thoth;	state Exp;
branches;
next	2.13;

2.13
date	93.05.26.16.59.41;	author rjj;	state Exp;
branches;
next	2.12;

2.12
date	93.04.29.21.51.17;	author rjj;	state Exp;
branches;
next	2.11;

2.11
date	93.04.06.22.25.39;	author rjj;	state Exp;
branches;
next	2.10;

2.10
date	93.04.05.23.00.56;	author rjj;	state Exp;
branches;
next	2.9;

2.9
date	92.12.11.01.11.57;	author rjj;	state Exp;
branches;
next	2.8;

2.8
date	92.09.02.14.50.44;	author rjj;	state Exp;
branches;
next	2.7;

2.7
date	92.09.01.20.45.29;	author rjj;	state Exp;
branches;
next	2.6;

2.6
date	92.08.28.11.55.11;	author jnw;	state Exp;
branches;
next	2.5;

2.5
date	92.08.27.12.11.27;	author jnw;	state Exp;
branches;
next	2.4;

2.4
date	92.08.23.13.35.47;	author thoth;	state Exp;
branches;
next	2.3;

2.3
date	92.07.29.23.41.37;	author fischer;	state Exp;
branches;
next	2.2;

2.2
date	92.07.28.07.10.08;	author fischer;	state Exp;
branches;
next	2.1;

2.1
date	92.07.27.06.25.59;	author fischer;	state Exp;
branches;
next	2.0;

2.0
date	92.07.19.05.25.30;	author fischer;	state Exp;
branches;
next	;

2.21.1.1
date	94.11.30.16.17.13;	author thoth;	state Exp;
branches;
next	;


desc
@Changed from cpp #defines to m4 defines()
@


2.21
log
@fixed conflict with system's abs.
@
text
@// Emacs: -*- C++ -*-

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

// $Log: Point_h.m4,v $
// Revision 2.20  1994/08/16  20:59:00  fjsoria
// added derange and enorm as non-member functions, keeping member versions
// added inorm, mnorm, abs, fabs as non-member functions
//
// Revision 2.19  1994/07/25  16:42:26  thoth
// FloatPoint is now either Point<double> or DoublePoint.
//
// Revision 2.18  1994/04/27  04:05:55  jnw
// added operator() for points
//
// Revision 2.17  1994/03/14  18:44:44  jnw
// Modified sum and product
//
// Revision 2.16  1994/03/14  18:16:38  jnw
// Added point reduce functions 'sum' and 'product'
//
// Revision 2.15  1993/11/16  13:27:10  thoth
// Pointcmp is now pointcmp
//
// Revision 2.14  1993/09/15  12:26:01  thoth
// Point is now a template with specializations only.
//
// Revision 2.13  93/05/26  16:59:41  rjj
// Added copyright notice
// 
// Revision 2.12  93/04/29  21:51:17  rjj
// Added missing  const  for  POINT op NUMBER.  See change in defines.m4 also.
// 
// Revision 2.11  93/04/06  22:25:39  rjj
// Removed const from "const int" and "const double"
// Changed bitwise unsigned parameters to int
// removed backwards compability with IntPoint and FloatPoint
// 
// Revision 2.10  93/04/05  23:00:56  rjj
// Many changes:
//   member size renamed to dimen
//   member dimensions() renamed as dim()
//   postfix members ++ and -- added
//   operator() changed into member derange() and extended with array version
//   member infimum() rename to inf()
//   member supremum() renamed to sup()
//   all references to IntPoint changed to IA_IntPoint
//   all references to FloatPoint changed to IA_FloatPoint
//   change to map IA_IntPoint to IntPoint now does the reverse
//   change to map IA_FloatPoint to FloatPoint now does the reverse
//   file reorganized to group related members as I saw fit
//   in general the interface as been mutated into the interface
//     reflected by newpoint, which spans Point.h, ArithPoint.h
//     LatticePoint.h, BitwisePoint.h and of course
//     IntPoint.h and FloatPoint.h
// 
// Revision 2.9  92/12/11  01:11:57  rjj
// Modified to support the IA_ prefix naming convention.
// Also put #ifdef IA_PRII around the #pragma stamt
// 
// Revision 2.8  92/09/02  14:50:44  rjj
// Corrected renameing of min to infimum and max to supremum
// 
// Revision 2.7  92/09/01  20:45:29  rjj
// Added support to ensure float op IntPoint and IntPoint op float
//  yield FloatPoint.
// 
// Revision 2.6  92/08/28  11:55:11  jnw
// Changed relation functions with POINT_TYPE& and float args
// to have POINT_TYPE& and double args to match current .C code
// 
// Revision 2.5  92/08/27  12:11:27  jnw
// Added C style comments around Log Messages to fixx gcc-cpp bug
// 
// Revision 2.4  92/08/23  13:35:47  thoth
// CFrontified
// throw changed to ia_throw.
// didn't hint to inline for loop stuff any more (braindead compiler).
// fixed const pass-by-value problem.
// 
// 

*/

ifdef(`DOUBLEPOINT', `
#ifndef IA_DoublePoint_h_
#define IA_DoublePoint_h_
')

ifdef(`INTPOINT', `
#ifndef IA_IntPoint_h_
#define IA_IntPoint_h_
')

#include "ia.h"

#ifdef IA_PRII
#pragma interface
#endif

#define SUPPRESS_INCLUDE
#include "Point.h"
#undef SUPPRESS_INCLUDE

ifdef(`DOUBLEPOINT', `#include "IntPoint.h"')


class POINT_TYPE {
    
  protected:  
    unsigned dimen;
    TYPE *coordinates;
    
  public:
    ////////////////////////////////////////////////////////////
    // C O N S T R U C T O R S
    ////////////////////////////////////////////////////////////
    
    POINT (const POINT_TYPE&);

    POINT () {coordinates = 0; dimen = 0; }
    
    POINT (TYPE c0) {
	coordinates = new TYPE[dimen = 1];
	coordinates[0] =  c0;
    }
    
    POINT (TYPE c0, TYPE c1) {
	coordinates = new TYPE[dimen = 2];
	coordinates[0] = c0;
	coordinates[1] = c1;
    }
    
    POINT (TYPE c0, TYPE c1, TYPE c2) {
	coordinates = new TYPE[dimen = 3];
	coordinates[0] = c0;
	coordinates[1] = c1;
	coordinates[2] = c2;
    }
    
    POINT (TYPE c0, TYPE c1, TYPE c2, TYPE c3) {
	coordinates = new TYPE[dimen = 4];
	coordinates[0] = c0;
	coordinates[1] = c1;
	coordinates[2] = c2;
	coordinates[3] = c3;
    }
    
    POINT (TYPE c0, TYPE c1, TYPE c2, TYPE c3, TYPE c4) {
	coordinates = new TYPE[dimen = 5];
	coordinates[0] = c0;
	coordinates[1] = c1;
	coordinates[2] = c2;
	coordinates[3] = c3;
	coordinates[4] = c4;
    }

ifdef(`DOUBLEPOINT',`
//  DoublePoint includes IntPoint.h so we can have a constructor from
//  IA_IntPoint to IA_DoublePoint: this gives us all
//  IA_DoublePoint/IA_IntPoint  operations for free.

    POINT (const IPOINT &ipt);
')

    POINT (TYPE *, unsigned, int =0);

  // derangment ROF
    friend POINT_TYPE    derange (const POINT_TYPE &, unsigned );
    friend POINT_TYPE    derange (const POINT_TYPE &, unsigned, unsigned);
    friend POINT_TYPE    derange (const POINT_TYPE &,unsigned, unsigned, unsigned);
    friend POINT_TYPE    derange (const POINT_TYPE &,unsigned, unsigned,
				  unsigned, unsigned);
    friend POINT_TYPE    derange (const POINT_TYPE &,unsigned, unsigned,
				  unsigned, unsigned, unsigned);
    friend POINT_TYPE    derange (const POINT_TYPE &, unsigned *, const unsigned);
  
  // derangment member functions
  POINT_TYPE  derange (unsigned i0) const { return ::derange(*this, i0);}

  POINT_TYPE  derange (unsigned i0, unsigned i1) const{
    return ::derange(*this, i0, i1);}
  POINT_TYPE  derange (unsigned i0, unsigned i1, unsigned i2) const {
    return ::derange(*this, i0, i1, i2);}
  POINT_TYPE  derange (unsigned i0, unsigned i1, unsigned i2, unsigned i3)
       const { return ::derange(*this, i0, i1, i2, i3);}
  POINT_TYPE  derange (unsigned i0, unsigned i1, unsigned i2, unsigned i3,
       unsigned i4) const { return ::derange(*this, i0, i1,i2, i3, i4);} 

  POINT_TYPE  derange (unsigned *vec , unsigned vecLen) const {
    return ::derange( *this, vec, vecLen);}

  
    friend POINT_TYPE    extend_to_point (TYPE, unsigned);
    friend POINT_TYPE    concat   (const POINT_TYPE&, const POINT_TYPE&);
    friend POINT_TYPE    concat   (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    concat   (TYPE, const POINT_TYPE&);

    friend POINT_TYPE    cdr      (const POINT_TYPE&, int =1);

  

    // The destructor for this class
    ~POINT () { delete[] coordinates; }  // OK even if coordinates NULL.


    ////////////////////////////////////////////////////////////
    // M I S C    O P E R A T I O N S
    ////////////////////////////////////////////////////////////

    POINT_TYPE& operator = (const POINT_TYPE&);

    unsigned            dim () const { return dimen; }

    friend POINT_TYPE	inf    (const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		min    (const POINT_TYPE&);
    friend POINT_TYPE	sup    (const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		max    (const POINT_TYPE&);

    friend ostream& operator << (ostream&, const POINT_TYPE&);


    ////////////////////////////////////////////////////////////
    // I N D E X I N G    O P E R A T I O N S
    ////////////////////////////////////////////////////////////

    TYPE&      operator[] (unsigned i)       { return coordinates[i]; }
    const TYPE operator[] (unsigned i) const { return coordinates[i]; }
    const TYPE operator() (unsigned i) const { return coordinates[i]; }


    ////////////////////////////////////////////////////////////
    // A R I T H M E T I C   O P E R A T I O N S
    ////////////////////////////////////////////////////////////

    POINT_TYPE&   operator +=  (const POINT_TYPE&);
    POINT_TYPE&   operator -=  (const POINT_TYPE&);
    POINT_TYPE&   operator *=  (const POINT_TYPE&);
    POINT_TYPE&   operator /=  (const POINT_TYPE&);

    POINT_TYPE&   operator +=  (TYPE);
    POINT_TYPE&   operator -=  (TYPE);
    POINT_TYPE&   operator *=  (TYPE);
    POINT_TYPE&   operator /=  (TYPE);
    
    POINT_TYPE    operator +  (const POINT_TYPE&) const;
    POINT_TYPE    operator -  (const POINT_TYPE&) const;
    POINT_TYPE    operator *  (const POINT_TYPE&) const;
    POINT_TYPE    operator /  (const POINT_TYPE&) const;
    
    POINT_TYPE    operator +  (TYPE) const;
    POINT_TYPE    operator -  (TYPE) const;
    POINT_TYPE    operator *  (TYPE) const;
    POINT_TYPE    operator /  (TYPE) const;
    
    friend POINT_TYPE    operator +  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator -  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator *  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator /  (TYPE, const POINT_TYPE&);

ifdef(`DOUBLEPOINT',`
//  Ensure that double args yield IA_DoublePoint answers.
    friend POINT_TYPE    operator +  (const IPOINT&, TYPE);
    friend POINT_TYPE    operator -  (const IPOINT&, TYPE);
    friend POINT_TYPE    operator *  (const IPOINT&, TYPE);
    friend POINT_TYPE    operator /  (const IPOINT&, TYPE);

    friend POINT_TYPE    operator +  (TYPE, const IPOINT&);
    friend POINT_TYPE    operator -  (TYPE, const IPOINT&);
    friend POINT_TYPE    operator *  (TYPE, const IPOINT&);
    friend POINT_TYPE    operator /  (TYPE, const IPOINT&);
')


    POINT_TYPE    operator -   () const;

    // Prefix operators
    POINT_TYPE&   operator ++  ();
    POINT_TYPE&   operator --  ();

    // Postfix operators
    POINT_TYPE    operator ++ (int);
    POINT_TYPE    operator -- (int);

    friend double enorm(const POINT_TYPE &p);   // Cartesian distance
    double enorm() const { return (double) ::enorm(*this);}
  
    // Point reduce operations
    friend TYPE sum     (const POINT_TYPE &);
    friend TYPE product (const POINT_TYPE &);

ifdef(`DOUBLEPOINT',`
    friend POINT_TYPE aint  (POINT_TYPE);
    friend POINT_TYPE anint (POINT_TYPE);
    friend POINT_TYPE ceil  (POINT_TYPE);
    friend POINT_TYPE floor (POINT_TYPE);
    friend POINT_TYPE rint  (POINT_TYPE);

    friend IPOINT   irint (const POINT_TYPE&);
    friend IPOINT   nint  (const POINT_TYPE&);
    friend IPOINT   trunc (const POINT_TYPE&);
')



    ////////////////////////////////////////////////////////////
    // L A T T I C E   O P E R A T I O N S
    ////////////////////////////////////////////////////////////

    int    operator <   (const POINT_TYPE&) const;
    int    operator <=  (const POINT_TYPE&) const;
    int    operator >   (const POINT_TYPE&) const;
    int    operator >=  (const POINT_TYPE&) const;
    int    operator ==  (const POINT_TYPE&) const;
    int    operator !=  (const POINT_TYPE&) const;

    int    operator <   (TYPE) const;
    int    operator <=  (TYPE) const;
    int    operator >   (TYPE) const;
    int    operator >=  (TYPE) const;
    int    operator ==  (TYPE) const;
    int    operator !=  (TYPE) const;

    friend  int    operator <   (TYPE, const POINT_TYPE&);
    friend  int    operator <=  (TYPE, const POINT_TYPE&);
    friend  int    operator >   (TYPE, const POINT_TYPE&);
    friend  int    operator >=  (TYPE, const POINT_TYPE&);
    friend  int    operator ==  (TYPE, const POINT_TYPE&);
    friend  int    operator !=  (TYPE, const POINT_TYPE&);

ifdef(`INTPOINT',`
    // Ensure that IntPoints and double arguments are compared
    // without rounding to int issues.
    int    operator <   (double) const;
    int    operator <=  (double) const;
    int    operator >   (double) const;
    int    operator >=  (double) const;
    int    operator ==  (double) const;
    int    operator !=  (double) const;

    friend  int    operator <   (double, const POINT_TYPE&);
    friend  int    operator <=  (double, const POINT_TYPE&);
    friend  int    operator >   (double, const POINT_TYPE&);
    friend  int    operator >=  (double, const POINT_TYPE&);
    friend  int    operator ==  (double, const POINT_TYPE&);
    friend  int    operator !=  (double, const POINT_TYPE&);
')

    friend  int    pointcmp (const POINT_TYPE&, const POINT_TYPE&);


ifdef(`INTPOINT',`
    ////////////////////////////////////////////////////////////
    // B I T W I S E   O P E R A T I O N S
    ////////////////////////////////////////////////////////////

    POINT_TYPE    operator ~  () const;

    POINT_TYPE&   operator %=  (const POINT_TYPE&);
    POINT_TYPE&   operator <<= (const POINT_TYPE&);
    POINT_TYPE&   operator >>= (const POINT_TYPE&);
    POINT_TYPE&   operator &=  (const POINT_TYPE&);
    POINT_TYPE&   operator ^=  (const POINT_TYPE&);
    POINT_TYPE&   operator |=  (const POINT_TYPE&);

    POINT_TYPE&   operator %=  (int);
    POINT_TYPE&   operator <<= (int);
    POINT_TYPE&   operator >>= (int);
    POINT_TYPE&   operator &=  (int);
    POINT_TYPE&   operator ^=  (int);
    POINT_TYPE&   operator |=  (int);

    POINT_TYPE    operator %  (const POINT_TYPE&) const;
    POINT_TYPE    operator << (const POINT_TYPE&) const;
    POINT_TYPE    operator >> (const POINT_TYPE&) const;
    POINT_TYPE    operator &  (const POINT_TYPE&) const;
    POINT_TYPE    operator ^  (const POINT_TYPE&) const;
    POINT_TYPE    operator |  (const POINT_TYPE&) const;

    POINT_TYPE    operator %  (int) const;
    POINT_TYPE    operator << (int) const;
    POINT_TYPE    operator >> (int) const;
    POINT_TYPE    operator &  (int) const;
    POINT_TYPE    operator ^  (int) const;
    POINT_TYPE    operator |  (int) const;

    friend POINT_TYPE    operator %  (int, const POINT_TYPE&);
    friend POINT_TYPE    operator << (int, const POINT_TYPE&);
    friend POINT_TYPE    operator >> (int, const POINT_TYPE&);
    friend POINT_TYPE    operator &  (int, const POINT_TYPE&);
    friend POINT_TYPE    operator ^  (int, const POINT_TYPE&);
    friend POINT_TYPE    operator |  (int, const POINT_TYPE&);
')

};




#endif



//below are the ROF or regular old functons, enorm was previously a member function
//it was decided that transducers, would become ROF

// abs will work with double points and int points, fabs will only work with
// double points, to extend the operation of fabs in math.h lib.

POINT_TYPE abs (const POINT_TYPE &p);

ifdef(`DOUBLEPOINT',`IA_Point<double> fabs (const IA_Point<double> &p);')

TYPE inorm(const POINT_TYPE &p);  
TYPE mnorm(const POINT_TYPE &p);


@


2.21.1.1
log
@Added cross product and dot product.
@
text
@a7 3
// Revision 2.21  1994/08/22  14:39:02  thoth
// fixed conflict with system's abs.
//
d419 1
a419 2
POINT_TYPE cross(const POINT_TYPE &a, const POINT_TYPE &b);
TYPE dot(const POINT_TYPE &a, const POINT_TYPE &b);
@


2.20
log
@added derange and enorm as non-member functions, keeping member versions
added inorm, mnorm, abs, fabs as non-member functions
@
text
@d7 5
a11 1
// $Log: Point.h.m4,v $
a407 3

// adds abs to points without running over namespace
inline static TYPE abs ( TYPE t);
@


2.19
log
@FloatPoint is now either Point<double> or DoublePoint.
@
text
@d8 3
d166 21
a186 8

    // Index-derangement functions.
    POINT_TYPE    derange (unsigned) const;
    POINT_TYPE    derange (unsigned, unsigned) const;
    POINT_TYPE    derange (unsigned, unsigned, unsigned) const;
    POINT_TYPE    derange (unsigned, unsigned, unsigned, unsigned) const;
    POINT_TYPE    derange (unsigned, unsigned, unsigned,
			   unsigned, unsigned) const;
d188 2
a189 2
    // Index-derangement, indices given by an array
    POINT_TYPE    derange (unsigned *, const unsigned) const;
d191 1
a192 1
    
d199 1
d283 3
a285 2
    double   enorm() const;   // Cartesian distance

d399 20
@


2.18
log
@added operator() for points
@
text
@d8 3
d80 3
a82 3
ifdef(`FLOATPOINT', `
#ifndef IA_FloatPoint_h_
#define IA_FloatPoint_h_
d100 1
a100 1
ifdef(`FLOATPOINT', `#include "IntPoint.h"')
d153 4
a156 4
ifdef(`FLOATPOINT',`
//  FloatPoint includes IntPoint.h so we can have a constructor from
//  IA_IntPoint to IA_FloatPoint: this gives us all
//  IA_FloatPoint/IA_IntPoint  operations for free.
d242 2
a243 2
ifdef(`FLOATPOINT',`
//  Ensure that float args yield IA_FloatPoint answers.
d272 1
a272 1
ifdef(`FLOATPOINT',`
d312 1
a312 1
    // Ensure that IntPoints and float arguments are compared
a376 4
typedef POINT_TYPE
ifdef(`INTPOINT', `IA_IntPoint')
ifdef(`FLOATPOINT', `IA_FloatPoint')
    ;
@


2.17
log
@Modified sum and product
@
text
@d8 3
d207 1
@


2.16
log
@Added point reduce functions 'sum' and 'product'
@
text
@d8 3
d262 2
a263 2
    friend POINT_TYPE sum     (const POINT_TYPE &);
    friend POINT_TYPE product (const POINT_TYPE &);
@


2.15
log
@Pointcmp is now pointcmp
@
text
@d8 3
d257 4
@


2.14
log
@Point is now a template with specializations only.
@
text
@d7 4
a10 1
// $Log:	Point.h.m4,v $
d312 1
a312 1
    friend  int    Pointcmp (const POINT_TYPE&, const POINT_TYPE&);
@


2.13
log
@Added copyright notice
@
text
@d8 3
d81 3
a84 1

d99 1
a99 1
    POINT_TYPE (const POINT_TYPE&);
d101 1
a101 1
    POINT_TYPE () {coordinates = 0; dimen = 0; }
d103 1
a103 1
    POINT_TYPE (TYPE c0) {
d108 1
a108 1
    POINT_TYPE (TYPE c0, TYPE c1) {
d114 1
a114 1
    POINT_TYPE (TYPE c0, TYPE c1, TYPE c2) {
d121 1
a121 1
    POINT_TYPE (TYPE c0, TYPE c1, TYPE c2, TYPE c3) {
d129 1
a129 1
    POINT_TYPE (TYPE c0, TYPE c1, TYPE c2, TYPE c3, TYPE c4) {
d143 1
a143 1
    IA_FloatPoint(const IA_IntPoint &ipt);
d146 1
a146 1
    POINT_TYPE (TYPE *, unsigned, int =0);
d170 1
a170 1
    ~POINT_TYPE () { delete[] coordinates; }  // OK even if coordinates NULL.
d228 4
a231 4
    friend IA_FloatPoint    operator +  (const IA_IntPoint&, TYPE);
    friend IA_FloatPoint    operator -  (const IA_IntPoint&, TYPE);
    friend IA_FloatPoint    operator *  (const IA_IntPoint&, TYPE);
    friend IA_FloatPoint    operator /  (const IA_IntPoint&, TYPE);
d233 4
a236 4
    friend IA_FloatPoint    operator +  (TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator -  (TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator *  (TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator /  (TYPE, const IA_IntPoint&);
d253 5
a257 5
    friend IA_FloatPoint aint  (IA_FloatPoint);
    friend IA_FloatPoint anint (IA_FloatPoint);
    friend IA_FloatPoint ceil  (IA_FloatPoint);
    friend IA_FloatPoint floor (IA_FloatPoint);
    friend IA_FloatPoint rint  (IA_FloatPoint);
d259 3
a261 3
    friend IA_IntPoint   irint (const IA_FloatPoint&);
    friend IA_IntPoint   nint  (const IA_FloatPoint&);
    friend IA_IntPoint   trunc (const IA_FloatPoint&);
d317 1
a317 1
    IA_IntPoint    operator ~  () const;
d319 6
a324 6
    IA_IntPoint&   operator %=  (const IA_IntPoint&);
    IA_IntPoint&   operator <<= (const IA_IntPoint&);
    IA_IntPoint&   operator >>= (const IA_IntPoint&);
    IA_IntPoint&   operator &=  (const IA_IntPoint&);
    IA_IntPoint&   operator ^=  (const IA_IntPoint&);
    IA_IntPoint&   operator |=  (const IA_IntPoint&);
d326 6
a331 6
    IA_IntPoint&   operator %=  (int);
    IA_IntPoint&   operator <<= (int);
    IA_IntPoint&   operator >>= (int);
    IA_IntPoint&   operator &=  (int);
    IA_IntPoint&   operator ^=  (int);
    IA_IntPoint&   operator |=  (int);
d333 6
a338 6
    IA_IntPoint    operator %  (const IA_IntPoint&) const;
    IA_IntPoint    operator << (const IA_IntPoint&) const;
    IA_IntPoint    operator >> (const IA_IntPoint&) const;
    IA_IntPoint    operator &  (const IA_IntPoint&) const;
    IA_IntPoint    operator ^  (const IA_IntPoint&) const;
    IA_IntPoint    operator |  (const IA_IntPoint&) const;
d340 6
a345 6
    IA_IntPoint    operator %  (int) const;
    IA_IntPoint    operator << (int) const;
    IA_IntPoint    operator >> (int) const;
    IA_IntPoint    operator &  (int) const;
    IA_IntPoint    operator ^  (int) const;
    IA_IntPoint    operator |  (int) const;
d347 6
a352 6
    friend IA_IntPoint    operator %  (int, const IA_IntPoint&);
    friend IA_IntPoint    operator << (int, const IA_IntPoint&);
    friend IA_IntPoint    operator >> (int, const IA_IntPoint&);
    friend IA_IntPoint    operator &  (int, const IA_IntPoint&);
    friend IA_IntPoint    operator ^  (int, const IA_IntPoint&);
    friend IA_IntPoint    operator |  (int, const IA_IntPoint&);
d356 7
@


2.12
log
@Added missing  const  for  POINT op NUMBER.  See change in defines.m4 also.
@
text
@d4 2
d8 3
@


2.11
log
@Removed const from "const int" and "const double"
Changed bitwise unsigned parameters to int
removed backwards compability with IntPoint and FloatPoint
@
text
@d6 5
d206 4
a209 4
    POINT_TYPE    operator +  (TYPE);
    POINT_TYPE    operator -  (TYPE);
    POINT_TYPE    operator *  (TYPE);
    POINT_TYPE    operator /  (TYPE);
@


2.10
log
@Many changes:
  member size renamed to dimen
  member dimensions() renamed as dim()
  postfix members ++ and -- added
  operator() changed into member derange() and extended with array version
  member infimum() rename to inf()
  member supremum() renamed to sup()
  all references to IntPoint changed to IA_IntPoint
  all references to FloatPoint changed to IA_FloatPoint
  define to map IA_IntPoint to IntPoint now does the reverse
  define to map IA_FloatPoint to FloatPoint now does the reverse
  file reorganized to group related members as I saw fit
  in general the interface as been mutated into the interface
    reflected by newpoint, which spans Point.h, ArithPoint.h
    LatticePoint.h, BitwisePoint.h and of course
    IntPoint.h and FloatPoint.h
@
text
@d6 18
d191 4
a194 4
    POINT_TYPE&   operator +=  (const TYPE);
    POINT_TYPE&   operator -=  (const TYPE);
    POINT_TYPE&   operator *=  (const TYPE);
    POINT_TYPE&   operator /=  (const TYPE);
d201 4
a204 4
    POINT_TYPE    operator +  (const TYPE);
    POINT_TYPE    operator -  (const TYPE);
    POINT_TYPE    operator *  (const TYPE);
    POINT_TYPE    operator /  (const TYPE);
d206 4
a209 4
    friend POINT_TYPE    operator +  (const TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator -  (const TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator *  (const TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator /  (const TYPE, const POINT_TYPE&);
d213 4
a216 4
    friend IA_FloatPoint    operator +  (const IA_IntPoint&, const TYPE);
    friend IA_FloatPoint    operator -  (const IA_IntPoint&, const TYPE);
    friend IA_FloatPoint    operator *  (const IA_IntPoint&, const TYPE);
    friend IA_FloatPoint    operator /  (const IA_IntPoint&, const TYPE);
d218 4
a221 4
    friend IA_FloatPoint    operator +  (const TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator -  (const TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator *  (const TYPE, const IA_IntPoint&);
    friend IA_FloatPoint    operator /  (const TYPE, const IA_IntPoint&);
d262 6
a267 6
    int    operator <   (const TYPE) const;
    int    operator <=  (const TYPE) const;
    int    operator >   (const TYPE) const;
    int    operator >=  (const TYPE) const;
    int    operator ==  (const TYPE) const;
    int    operator !=  (const TYPE) const;
d269 6
a274 6
    friend  int    operator <   (const TYPE, const POINT_TYPE&);
    friend  int    operator <=  (const TYPE, const POINT_TYPE&);
    friend  int    operator >   (const TYPE, const POINT_TYPE&);
    friend  int    operator >=  (const TYPE, const POINT_TYPE&);
    friend  int    operator ==  (const TYPE, const POINT_TYPE&);
    friend  int    operator !=  (const TYPE, const POINT_TYPE&);
d279 6
a284 6
    int    operator <   (const double) const;
    int    operator <=  (const double) const;
    int    operator >   (const double) const;
    int    operator >=  (const double) const;
    int    operator ==  (const double) const;
    int    operator !=  (const double) const;
d286 6
a291 6
    friend  int    operator <   (const double, const POINT_TYPE&);
    friend  int    operator <=  (const double, const POINT_TYPE&);
    friend  int    operator >   (const double, const POINT_TYPE&);
    friend  int    operator >=  (const double, const POINT_TYPE&);
    friend  int    operator ==  (const double, const POINT_TYPE&);
    friend  int    operator !=  (const double, const POINT_TYPE&);
d311 6
a316 6
    IA_IntPoint&   operator %=  (const unsigned);
    IA_IntPoint&   operator <<= (const unsigned);
    IA_IntPoint&   operator >>= (const unsigned);
    IA_IntPoint&   operator &=  (const unsigned);
    IA_IntPoint&   operator ^=  (const unsigned);
    IA_IntPoint&   operator |=  (const unsigned);
d325 6
a330 6
    IA_IntPoint    operator %  (const unsigned) const;
    IA_IntPoint    operator << (const unsigned) const;
    IA_IntPoint    operator >> (const unsigned) const;
    IA_IntPoint    operator &  (const unsigned) const;
    IA_IntPoint    operator ^  (const unsigned) const;
    IA_IntPoint    operator |  (const unsigned) const;
d332 6
a337 6
    friend IA_IntPoint    operator %  (const int, const IA_IntPoint&);
    friend IA_IntPoint    operator << (const int, const IA_IntPoint&);
    friend IA_IntPoint    operator >> (const int, const IA_IntPoint&);
    friend IA_IntPoint    operator &  (const int, const IA_IntPoint&);
    friend IA_IntPoint    operator ^  (const int, const IA_IntPoint&);
    friend IA_IntPoint    operator |  (const int, const IA_IntPoint&);
a340 8

ifdef(`FLOATPOINT', `
typedef  IA_FloatPoint  FloatPoint;
')

ifdef(`INTPOINT', `
typedef  IA_IntPoint  IntPoint;
')
@


2.9
log
@Modified to support the IA_ prefix naming convention.
Also put #ifdef IA_PRII around the #pragma stamt
@
text
@d6 4
d14 2
a15 1
// Added support to ensure float op IntPoint and IntPoint op float yield FloatPoint.
d35 2
a36 2
#ifndef FloatPoint_h_
#define FloatPoint_h_
d40 2
a41 2
#ifndef IntPoint_h_
#define IntPoint_h_
d57 2
a58 2
  private:  
    unsigned size;
d62 3
a64 1
    // Constructors:
a65 1
    POINT_TYPE () {coordinates = 0; size = 0; }
d67 2
a68 4
    POINT_TYPE (TYPE *, unsigned, int =0);
    POINT_TYPE& operator = (const POINT_TYPE&);
    ~POINT_TYPE () { delete[] coordinates; }  // OK even if coordinates NULL.
                                         
d71 1
a71 1
	coordinates = new TYPE[size = 1];
d76 1
a76 1
	coordinates = new TYPE[size = 2];
d82 1
a82 1
	coordinates = new TYPE[size = 3];
d89 1
a89 1
	coordinates = new TYPE[size = 4];
d97 1
a97 1
	coordinates = new TYPE[size = 5];
d105 4
a108 4
ifdef(`FLOATPOINT',`    
//  FloatPoint includes IntPoint.h so we can have a constructor
//  from IntPoint to FloatPoint: this gives us all FloatPoint/IntPoint
//  operations for free.
d110 2
a111 1
    FloatPoint(const IntPoint &ipt);
d113 1
a114 1
//  Ensure that float args yield FloatPoint answers.
d116 7
a122 4
    friend FloatPoint    operator +  (const IntPoint&, const TYPE);
    friend FloatPoint    operator -  (const IntPoint&, const TYPE);
    friend FloatPoint    operator *  (const IntPoint&, const TYPE);
    friend FloatPoint    operator /  (const IntPoint&, const TYPE);
d124 2
a125 5
    friend FloatPoint    operator +  (const TYPE, const IntPoint&);
    friend FloatPoint    operator -  (const TYPE, const IntPoint&);
    friend FloatPoint    operator *  (const TYPE, const IntPoint&);
    friend FloatPoint    operator /  (const TYPE, const IntPoint&);
')
d127 34
a160 2
    unsigned dimensions() const { return size; }
    TYPE& operator[] (unsigned i) { return coordinates[i]; }
d162 15
d178 4
a181 1
    friend  POINT_TYPE extend_to_point (TYPE, unsigned);
d183 4
a186 9
    const  POINT_TYPE&   operator +=  (const POINT_TYPE&);
    const  POINT_TYPE&   operator -=  (const POINT_TYPE&);
    const  POINT_TYPE&   operator *=  (const POINT_TYPE&);
    const  POINT_TYPE&   operator /=  (const POINT_TYPE&);

    const  POINT_TYPE&   operator +=  (TYPE);
    const  POINT_TYPE&   operator -=  (TYPE);
    const  POINT_TYPE&   operator *=  (TYPE);
    const  POINT_TYPE&   operator /=  (TYPE);
d188 4
a191 4
           POINT_TYPE    operator +  (const POINT_TYPE&) const;
           POINT_TYPE    operator -  (const POINT_TYPE&) const;
           POINT_TYPE    operator *  (const POINT_TYPE&) const;
           POINT_TYPE    operator /  (const POINT_TYPE&) const;
d193 6
a198 9
    friend POINT_TYPE    operator +  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator -  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator *  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator /  (const POINT_TYPE&, TYPE);
    
    friend POINT_TYPE    operator +  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator -  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator *  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator /  (TYPE, const POINT_TYPE&);
d200 5
a204 2
    const  POINT_TYPE&   operator ++  ();
    const  POINT_TYPE&   operator --  ();
a205 2
           POINT_TYPE    operator -   () const;
	   
d207 1
a207 7
ifdef(`INTPOINT',`
    const  IntPoint&   operator %=  (const IntPoint&);
    const  IntPoint&   operator <<= (const IntPoint&);
    const  IntPoint&   operator >>= (const IntPoint&);
    const  IntPoint&   operator &=  (const IntPoint&);
    const  IntPoint&   operator ^=  (const IntPoint&);
    const  IntPoint&   operator |=  (const IntPoint&);
d209 3
a211 6
    const  IntPoint&   operator %=  (unsigned);
    const  IntPoint&   operator <<= (unsigned);
    const  IntPoint&   operator >>= (unsigned);
    const  IntPoint&   operator &=  (unsigned);
    const  IntPoint&   operator ^=  (unsigned);
    const  IntPoint&   operator |=  (unsigned);
d213 3
a215 7
           IntPoint    operator %  (const IntPoint&) const;
           IntPoint    operator << (const IntPoint&) const;
           IntPoint    operator >> (const IntPoint&) const;
           IntPoint    operator &  (const IntPoint&) const;
           IntPoint    operator ^  (const IntPoint&) const;
           IntPoint    operator |  (const IntPoint&) const;
           IntPoint    operator ~  () const;
d217 1
a217 6
    friend IntPoint    operator %  (const IntPoint&, unsigned);
    friend IntPoint    operator << (const IntPoint&, unsigned);
    friend IntPoint    operator >> (const IntPoint&, unsigned);
    friend IntPoint    operator &  (const IntPoint&, unsigned);
    friend IntPoint    operator ^  (const IntPoint&, unsigned);
    friend IntPoint    operator |  (const IntPoint&, unsigned);
d219 10
a228 6
    friend IntPoint    operator %  (int, const IntPoint&);
    friend IntPoint    operator << (int, const IntPoint&);
    friend IntPoint    operator >> (int, const IntPoint&);
    friend IntPoint    operator &  (int, const IntPoint&);
    friend IntPoint    operator ^  (int, const IntPoint&);
    friend IntPoint    operator |  (int, const IntPoint&);
a230 6
                int    operator <   (const POINT_TYPE&) const;
                int    operator <=  (const POINT_TYPE&) const;
                int    operator >   (const POINT_TYPE&) const;
                int    operator >=  (const POINT_TYPE&) const;
                int    operator ==  (const POINT_TYPE&) const;
                int    operator !=  (const POINT_TYPE&) const;
a231 6
    friend      int    operator <   (const POINT_TYPE&, int);
    friend      int    operator <=  (const POINT_TYPE&, int);
    friend      int    operator >   (const POINT_TYPE&, int);
    friend      int    operator >=  (const POINT_TYPE&, int);
    friend      int    operator ==  (const POINT_TYPE&, int);
    friend      int    operator !=  (const POINT_TYPE&, int);
d233 3
a235 6
    friend      int    operator <   (int, const POINT_TYPE&);
    friend      int    operator <=  (int, const POINT_TYPE&);
    friend      int    operator >   (int, const POINT_TYPE&);
    friend      int    operator >=  (int, const POINT_TYPE&);
    friend      int    operator ==  (int, const POINT_TYPE&);
    friend      int    operator !=  (int, const POINT_TYPE&);
d237 6
a242 6
    friend      int    operator <   (const POINT_TYPE&, double);
    friend      int    operator <=  (const POINT_TYPE&, double);
    friend      int    operator >   (const POINT_TYPE&, double);
    friend      int    operator >=  (const POINT_TYPE&, double);
    friend      int    operator ==  (const POINT_TYPE&, double);
    friend      int    operator !=  (const POINT_TYPE&, double);
d244 6
a249 6
    friend      int    operator <   (double, const POINT_TYPE&);
    friend      int    operator <=  (double, const POINT_TYPE&);
    friend      int    operator >   (double, const POINT_TYPE&);
    friend      int    operator >=  (double, const POINT_TYPE&);
    friend      int    operator ==  (double, const POINT_TYPE&);
    friend      int    operator !=  (double, const POINT_TYPE&);
d251 6
a256 7
    // Index-derangement functions.
    
    POINT_TYPE      operator ()  (unsigned) const;
    POINT_TYPE      operator ()  (unsigned, unsigned) const;
    POINT_TYPE      operator ()  (unsigned, unsigned, unsigned) const;
    POINT_TYPE      operator ()  (unsigned, unsigned, unsigned, unsigned) const;
    POINT_TYPE      operator ()  (unsigned, unsigned, unsigned, unsigned, unsigned) const;
d258 9
a266 1
    friend ostream& operator << (ostream&, const POINT_TYPE&);
d268 7
a274 1
    // Distance measures
d276 1
a276 1
    double enorm() const;
a277 5
    // more construction functions
    
    friend POINT_TYPE    concat   (const POINT_TYPE&, const POINT_TYPE&);
    friend POINT_TYPE    concat   (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    concat   (TYPE, const POINT_TYPE&);
d279 4
a282 1
    friend POINT_TYPE    cdr(const POINT_TYPE&, int =1);
d284 1
a284 1
    friend int Pointcmp (const POINT_TYPE&, const POINT_TYPE&);
d286 6
a291 4
    friend POINT_TYPE	infimum		(const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		min		(const POINT_TYPE&);
    friend POINT_TYPE	supremum	(const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		max		(const POINT_TYPE&);
d293 6
a298 6
ifdef(`FLOATPOINT',`
    friend FloatPoint aint  (FloatPoint);
    friend FloatPoint anint (FloatPoint);
    friend FloatPoint ceil  (FloatPoint);
    friend FloatPoint floor (FloatPoint);
    friend FloatPoint rint  (FloatPoint);
d300 20
a319 3
    friend IntPoint   irint (const FloatPoint&);
    friend IntPoint   nint  (const FloatPoint&);
    friend IntPoint   trunc (const FloatPoint&);
d321 1
d325 1
a325 1
typedef  FloatPoint  IA_FloatPoint;
d329 1
a329 1
typedef  IntPoint  IA_IntPoint;
@


2.8
log
@Corrected renameing of min to infimum and max to supremum
@
text
@d6 3
d39 3
d43 1
d45 2
a46 1
#include "ia.h"
d273 8
@


2.7
log
@Added support to ensure float op IntPoint and IntPoint op float yield FloatPoint.
@
text
@d6 3
d248 4
a251 4
    friend POINT_TYPE	min   (const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		min   (const POINT_TYPE&);
    friend POINT_TYPE	max   (const POINT_TYPE&, const POINT_TYPE&);
    friend TYPE		max   (const POINT_TYPE&);
@


2.6
log
@Changed relation functions with POINT_TYPE& and float args
to have POINT_TYPE& and double args to match current .C code
@
text
@d6 4
d96 13
@


2.5
log
@Added C style comments around Log Messages to fixx gcc-cpp bug
@
text
@d6 3
d190 6
a195 6
    friend      int    operator <   (const POINT_TYPE&, float);
    friend      int    operator <=  (const POINT_TYPE&, float);
    friend      int    operator >   (const POINT_TYPE&, float);
    friend      int    operator >=  (const POINT_TYPE&, float);
    friend      int    operator ==  (const POINT_TYPE&, float);
    friend      int    operator !=  (const POINT_TYPE&, float);
d197 6
a202 6
    friend      int    operator <   (float, const POINT_TYPE&);
    friend      int    operator <=  (float, const POINT_TYPE&);
    friend      int    operator >   (float, const POINT_TYPE&);
    friend      int    operator >=  (float, const POINT_TYPE&);
    friend      int    operator ==  (float, const POINT_TYPE&);
    friend      int    operator !=  (float, const POINT_TYPE&);
@


2.4
log
@CFrontified
throw changed to ia_throw.
didn't hint to inline for loop stuff any more (braindead compiler).
fixed const pass-by-value problem.
@
text
@d3 2
d6 5
d12 3
@


2.3
log
@Changed relational operators to return int, Pointcmp as well.
@
text
@a3 7
// Revision 2.2  92/07/28  07:10:08  fischer
// removed max_dimensions static constant from Point classes.
// removed many checks for zero-length points, now that we 
// know "new foo[0]" gives us a pointer to one "foo" that can
// be safely deleted.  Did some more loop unrolling in functions
// like min.  A min-based test program showed 6% speedup 
// with g++ -O flag.
a4 27
// Revision 2.1  92/07/27  06:25:59  fischer
// fixed problem with nint/rint/trunc pointer.
// optimized constructors via loop unrolling.
// added min/max as binary (point,point) and
// unary (point) functions.
// 
// Revision 2.0  92/07/19  05:25:30  fischer
// Changed from cpp #defines to m4 defines().
// 
// Revision 1.5  92/07/18  04:57:10  fischer
// Added Pointcmp and (for FloatPoint) the rint(3M) family
// of math functions.
// 
// Revision 1.4  92/07/17  16:44:44  thoth
// copy constructor was missing.
// needed vector constructor to simplify some code
// 
// Revision 1.3  92/07/17  03:02:48  fischer
// Extended cdr to Rob's specifications.
// 
// Revision 1.2  92/07/17  01:25:05  fischer
// Added concat, derangement, cdr, enorm, unary -, ~, ++ and --.
// 
// Revision 1.1  92/07/16  18:23:36  fischer
// Initial revision
// 
// 
d16 2
d78 1
a78 24
    FloatPoint(IntPoint ipt) {

//  new float[0] will allocate a pointer to one float; we ignore it
//  to keep from having to insert an "if (size == 0) ..." everywhere.

    this->coordinates = new float[this->size = ipt.dimensions()];

#ifdef NO_LOOP_UNROLLING
   for (unsigned i = 0; i < this->size; i++)
	this->coordinates[i] = ipt[i];
#else
    switch (this->size) {
    case 5: this->coordinates[4] = ipt[4];
    case 4: this->coordinates[3] = ipt[3];
    case 3: this->coordinates[2] = ipt[2];
    case 2: this->coordinates[1] = ipt[1];
    case 1: this->coordinates[0] = ipt[0];
    case 0: break;     
    default:
	for (unsigned i = 0; i < this->size; i++)
	    this->coordinates[i] = ipt[i];
    }
#endif
}
d163 6
a168 6
    friend      int    operator <   (const POINT_TYPE&, const int);
    friend      int    operator <=  (const POINT_TYPE&, const int);
    friend      int    operator >   (const POINT_TYPE&, const int);
    friend      int    operator >=  (const POINT_TYPE&, const int);
    friend      int    operator ==  (const POINT_TYPE&, const int);
    friend      int    operator !=  (const POINT_TYPE&, const int);
d170 6
a175 6
    friend      int    operator <   (const int, const POINT_TYPE&);
    friend      int    operator <=  (const int, const POINT_TYPE&);
    friend      int    operator >   (const int, const POINT_TYPE&);
    friend      int    operator >=  (const int, const POINT_TYPE&);
    friend      int    operator ==  (const int, const POINT_TYPE&);
    friend      int    operator !=  (const int, const POINT_TYPE&);
@


2.2
log
@removed max_dimensions static constant from Point classes.
removed many checks for zero-length points, now that we 
know "new foo[0]" gives us a pointer to one "foo" that can
be safely deleted.  Did some more loop unrolling in functions
like min.  A min-based test program showed 6% speedup 
with g++ -O flag.
@
text
@d4 8
d211 6
a216 6
               char    operator <   (const POINT_TYPE&) const;
               char    operator <=  (const POINT_TYPE&) const;
               char    operator >   (const POINT_TYPE&) const;
               char    operator >=  (const POINT_TYPE&) const;
               char    operator ==  (const POINT_TYPE&) const;
               char    operator !=  (const POINT_TYPE&) const;
d218 6
a223 6
    friend     char    operator <   (const POINT_TYPE&, const int);
    friend     char    operator <=  (const POINT_TYPE&, const int);
    friend     char    operator >   (const POINT_TYPE&, const int);
    friend     char    operator >=  (const POINT_TYPE&, const int);
    friend     char    operator ==  (const POINT_TYPE&, const int);
    friend     char    operator !=  (const POINT_TYPE&, const int);
d225 6
a230 6
    friend     char    operator <   (const int, const POINT_TYPE&);
    friend     char    operator <=  (const int, const POINT_TYPE&);
    friend     char    operator >   (const int, const POINT_TYPE&);
    friend     char    operator >=  (const int, const POINT_TYPE&);
    friend     char    operator ==  (const int, const POINT_TYPE&);
    friend     char    operator !=  (const int, const POINT_TYPE&);
d232 6
a237 6
    friend     char    operator <   (const POINT_TYPE&, float);
    friend     char    operator <=  (const POINT_TYPE&, float);
    friend     char    operator >   (const POINT_TYPE&, float);
    friend     char    operator >=  (const POINT_TYPE&, float);
    friend     char    operator ==  (const POINT_TYPE&, float);
    friend     char    operator !=  (const POINT_TYPE&, float);
d239 6
a244 6
    friend     char    operator <   (float, const POINT_TYPE&);
    friend     char    operator <=  (float, const POINT_TYPE&);
    friend     char    operator >   (float, const POINT_TYPE&);
    friend     char    operator >=  (float, const POINT_TYPE&);
    friend     char    operator ==  (float, const POINT_TYPE&);
    friend     char    operator !=  (float, const POINT_TYPE&);
d268 1
a268 1
    friend char Pointcmp (const POINT_TYPE&, const POINT_TYPE&);
@


2.1
log
@fixed problem with nint/rint/trunc pointer.
optimized constructors via loop unrolling.
added min/max as binary (point,point) and
unary (point) functions.
@
text
@d4 6
a52 2
    static const unsigned int max_dimensions = 5;

d59 2
a60 1
    ~POINT_TYPE () { if (size != 0) delete[] coordinates; }
a61 1
    
d104 2
a105 1
    if (ipt.dimensions() == 0) return;
d119 1
a119 1
	break;
d138 5
d144 21
a171 1
')
a172 6
    const  POINT_TYPE&   operator +=  (TYPE);
    const  POINT_TYPE&   operator -=  (TYPE);
    const  POINT_TYPE&   operator *=  (TYPE);
    const  POINT_TYPE&   operator /=  (TYPE);
    
ifdef(`INTPOINT',`
a178 1
')
a179 6
           POINT_TYPE    operator +  (const POINT_TYPE&) const;
           POINT_TYPE    operator -  (const POINT_TYPE&) const;
           POINT_TYPE    operator *  (const POINT_TYPE&) const;
           POINT_TYPE    operator /  (const POINT_TYPE&) const;

ifdef(`INTPOINT',`
d186 1
a186 1
')
a187 6
    friend POINT_TYPE    operator +  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator -  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator *  (const POINT_TYPE&, TYPE);
    friend POINT_TYPE    operator /  (const POINT_TYPE&, TYPE);
    
ifdef(`INTPOINT',`
a193 1
')
a194 6
    friend POINT_TYPE    operator +  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator -  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator *  (TYPE, const POINT_TYPE&);
    friend POINT_TYPE    operator /  (TYPE, const POINT_TYPE&);
    
ifdef(`INTPOINT',`
d203 6
a208 6
           char     operator <   (const POINT_TYPE&) const;
           char     operator <=  (const POINT_TYPE&) const;
           char     operator >   (const POINT_TYPE&) const;
           char     operator >=  (const POINT_TYPE&) const;
           char     operator ==  (const POINT_TYPE&) const;
           char     operator !=  (const POINT_TYPE&) const;
d210 6
a215 6
    friend char     operator <   (const POINT_TYPE&, const int);
    friend char     operator <=  (const POINT_TYPE&, const int);
    friend char     operator >   (const POINT_TYPE&, const int);
    friend char     operator >=  (const POINT_TYPE&, const int);
    friend char     operator ==  (const POINT_TYPE&, const int);
    friend char     operator !=  (const POINT_TYPE&, const int);
d217 6
a222 6
    friend char     operator <   (const int, const POINT_TYPE&);
    friend char     operator <=  (const int, const POINT_TYPE&);
    friend char     operator >   (const int, const POINT_TYPE&);
    friend char     operator >=  (const int, const POINT_TYPE&);
    friend char     operator ==  (const int, const POINT_TYPE&);
    friend char     operator !=  (const int, const POINT_TYPE&);
d224 6
a229 6
    friend char     operator <   (const POINT_TYPE&, float);
    friend char     operator <=  (const POINT_TYPE&, float);
    friend char     operator >   (const POINT_TYPE&, float);
    friend char     operator >=  (const POINT_TYPE&, float);
    friend char     operator ==  (const POINT_TYPE&, float);
    friend char     operator !=  (const POINT_TYPE&, float);
d231 6
a236 6
    friend char     operator <   (float, const POINT_TYPE&);
    friend char     operator <=  (float, const POINT_TYPE&);
    friend char     operator >   (float, const POINT_TYPE&);
    friend char     operator >=  (float, const POINT_TYPE&);
    friend char     operator ==  (float, const POINT_TYPE&);
    friend char     operator !=  (float, const POINT_TYPE&);
a237 9
    const  POINT_TYPE&   operator ++  ();
    const  POINT_TYPE&   operator --  ();

           POINT_TYPE    operator -   () const;

ifdef(`INTPOINT',`
           IntPoint      operator ~   () const;
')

d240 5
a244 5
    POINT_TYPE           operator ()  (unsigned) const;
    POINT_TYPE           operator ()  (unsigned, unsigned) const;
    POINT_TYPE           operator ()  (unsigned, unsigned, unsigned) const;
    POINT_TYPE           operator ()  (unsigned, unsigned, unsigned, unsigned) const;
    POINT_TYPE           operator ()  (unsigned, unsigned, unsigned, unsigned, unsigned) const;
d263 1
a263 1
    friend TYPE	min   (const POINT_TYPE&);
d265 1
a265 1
    friend TYPE	max   (const POINT_TYPE&);
a277 1

a278 1

@


2.0
log
@Changed from cpp #defines to m4 defines().
@
text
@d3 4
a6 1
// $Log$
d99 18
a116 2
	this->coordinates = new float[this->size = ipt.dimensions()];
	for (unsigned i = 0; i < ipt.dimensions(); i++)
d119 2
d240 1
a240 1
           IntPoint    operator ~   () const;
a242 4
    // Distance measures

    double enorm() const;
    
d251 8
d265 7
a282 3

    friend ostream& operator << (ostream&, const POINT_TYPE&);
    friend char Pointcmp (const POINT_TYPE&, const POINT_TYPE&);
@
