head	1.13;
access;
symbols
	r2_1:1.10
	r2_0:1.10
	r1_1_beta:1.9
	r1_1_alpha:1.8
	r1_0:1.8
	r0_11:1.8
	r0_10:1.7
	r0_9:1.6
	Eglin_alpha_1:1.2;
locks; strict;
comment	@// @;


1.13
date	94.12.07.20.45.22;	author ljr;	state Exp;
branches;
next	1.12;

1.12
date	94.12.01.15.55.04;	author fjsoria;	state Exp;
branches;
next	1.11;

1.11
date	94.10.06.17.37.52;	author fjsoria;	state Exp;
branches;
next	1.10;

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

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

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

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

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

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

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

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

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

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


desc
@Set of points whose coordinates are floats.
@


1.13
log
@added pragma and typedefs to force IA_BasePS<IA_Point<double> > and
IA_PSIter<IA_Point<double> > to be public references for BC++ template
instantiation scheme.
@
text
@// Emacs: -*- C++ -*-

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


// 
// $Log: DblPS.h,v $
// Revision 1.12  1994/12/01  15:55:04  fjsoria
// changed gaurd __NO_INLINE_DESTRUCTORS to
// __NO_OUTLINE_DESTRUCTORS
//
// Revision 1.11  1994/10/06  17:37:52  fjsoria
// commented rcsid[]
//
// Revision 1.10  1994/08/18  23:39:28  thoth
// DOS-inspired filename rework
//
// Revision 1.9  1994/07/25  16:58:52  thoth
// \Name sanitization
//
// Revision 1.8  1994/04/26  18:10:49  thoth
// White and Black Hole have been renamed to universal and empty _pset
//
// Revision 1.7  1994/01/31  16:36:28  thoth
// Resurrected the int(*)(Point) constructor.
// Added static member functions to construct white and black holes.
//
// Revision 1.6  1993/11/17  18:02:03  thoth
// extensivep() is now extensive()
//
// Revision 1.5  1993/10/20  15:48:39  thoth
// New naming scheme.  Closures are named Closure.
//
// Revision 1.4  1993/09/15  12:31:34  thoth
// Certain functions are necessary for Continuous images,
// we will implement them later.
//
// Revision 1.3  93/08/08  13:14:35  thoth
// Parametrization of the pointsets on the point type using
// template specialization.
// 
// Revision 1.2  93/05/26  16:51:16  thoth
// Copyright Notices
// 
// Revision 1.1  93/05/10  08:33:25  thoth
// Initial revision
// 

#ifndef DoublePointSet_h_
#define DoublePointSet_h_

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

#include "DblPoint.h"
#include "BasePS.h"
#include "SetStructure.h"

template <class P> class IA_ClosurePS;
template <class P> class IA_PSIter;

#ifdef IA_BCPP_TMPLINST_PUBLIC_REFERENCES
#pragma option -Jgd
typedef IA_BasePS<IA_Point<double> > IA_bps_dp_bcpp_tmplinst;
typedef IA_PSIter<IA_Point<double> > IA_psi_dp_bcpp_tmplinst;
#pragma option -Jgx
#endif

class IA_Set<IA_Point<double> > {
  private:
    
    IA_BasePS<IA_Point<double> >	*ps;

    void associate(IA_BasePS<IA_Point<double> > *);
    void disassociate();

    IA_Set(IA_BasePS<IA_Point<double> > *fps) { associate(fps); }
    IA_Set(IA::Type t, unsigned dim);
  public:
    IA_Set();
    IA_Set(const IA_Point<double>&p);
    IA_Set(unsigned dimen, int(*f)(const IA_Point<double>&));
    IA_Set(unsigned dimen, int(*f)(IA_Point<double>));
    IA_Set(const IA_ClosurePS<IA_Point<double> >&);
    IA_Set(unsigned dimen, const IA_Point<double> *afp, unsigned len);
    IA_Set(const IA_Set<IA_Point<double> > &fps);
//    IA_Set(const IA_Set<IA_Point<int> > &ips);
#ifdef __NO_OUTLINE_DESTRUCTORS
    ~IA_Set() { disassociate();}
#else
    ~IA_Set();
#endif

    IA_Set<IA_Point<double> > & operator=(const IA_Set<IA_Point<double> >&);

    int operator==(const IA_Set<IA_Point<double> >&fps) const ;
    int operator!=(const IA_Set<IA_Point<double> >&fps) const ;

    // This block NYI
    friend IA_Set<IA_Point<double> > operator|
    (const IA_Set<IA_Point<double> > &,const IA_Set<IA_Point<double> > &);
    friend IA_Set<IA_Point<double> > operator&
    (const IA_Set<IA_Point<double> > &,const IA_Set<IA_Point<double> > &);
    friend IA_Set<IA_Point<double> > operator^
    (const IA_Set<IA_Point<double> > &,const IA_Set<IA_Point<double> > &);
    friend IA_Set<IA_Point<double> > operator/
    (const IA_Set<IA_Point<double> > &,const IA_Set<IA_Point<double> > &);
    //
    friend IA_Set<IA_Point<double> > operator+
    (const IA_Set<IA_Point<double> > &,const IA_Point<double> &);
    //
    friend IA_Set<IA_Point<double> > intersect_with_structure
    (const IA_Set<IA_Point<double> > &lhs, const IA_Set<IA_Point<double> > &rhs,
     IA_SetStructure *s_struct);
    friend IA_Set<IA_Point<double> > union_with_structure
    (const IA_Set<IA_Point<double> > &lhs, const IA_Set<IA_Point<double> > &rhs, IA_SetStructure *s_struct);
    //

#if 0
    int operator==(const IA_Set<IA_Point<double> >&fps) const;
    int operator!=(const IA_Set<IA_Point<double> >&fps) const
    { return !(*this==fps); }
#endif
    unsigned dim() const { return ps->dim(); }

    int contains(const IA_Point<double> &ip) const { return ps->contains(ip); }
    unsigned index(const IA_Point<double> &fp) const { return ps->index(fp); }
    IA_Point<double> index(unsigned idx) const { return ps->index(idx); }

    unsigned card() const { return ps->card(); }
    int empty() const { return ps->empty(); }
    int extensive() const { return ps->extensive(); }

    // he has to know how to get at the underlying IA_BasePS<IA_Point<double> >*
    friend class IA_PSIter<IA_Point<double> >;

    friend IA_Set<IA_Point<double> > IA_empty_fpset(unsigned dim);
    friend IA_Set<IA_Point<double> > IA_universal_fpset(unsigned dim);

    static IA_Set<IA_Point<double> > WhiteHole(unsigned dim) {
	return IA_universal_fpset(dim);
    }
    static IA_Set<IA_Point<double> > BlackHole(unsigned dim) {
	return IA_empty_fpset(dim);
    }
};


inline IA_Set<IA_Point<double> > IA_CWhiteHole(unsigned dim) {
    return IA_universal_fpset(dim);
}
inline IA_Set<IA_Point<double> > IA_CBlackHole(unsigned dim) {
    return IA_empty_fpset(dim);
}

#include "IntPS.h"	// for the intersection

IA_Set<IA_Point<int> > operator&(const IA_Set<IA_Point<int> >&,
			      const IA_Set<IA_Point<double> >&);
inline IA_Set<IA_Point<int> > operator&(const IA_Set<IA_Point<double> >&lhs,
			      const IA_Set<IA_Point<int> >&rhs) {
    return rhs&lhs;
}

void SortDoublePointArray(IA_Point<double> *afp, unsigned len);

#endif
@


1.12
log
@changed gaurd __NO_INLINE_DESTRUCTORS to
__NO_OUTLINE_DESTRUCTORS
@
text
@d11 4
d66 6
@


1.11
log
@commented rcsid[]
@
text
@d11 3
d82 1
a82 1
#ifdef __NO_INLINE_DESTRUCTORS
@


1.10
log
@DOS-inspired filename rework
@
text
@d11 3
d79 3
a81 1

d83 1
@


1.9
log
@\Name sanitization
@
text
@d10 4
a13 1
// $Log: DoublePointSet.h,v $
d49 1
a49 1
#include "DoublePoint.h"
d141 1
a141 1
#include "IntPointSet.h"	// for the intersection
@


1.8
log
@White and Black Hole have been renamed to universal and empty _pset
@
text
@d10 4
a13 1
// $Log: FloatPointSet.h,v $
d39 2
a40 2
#ifndef FloatPointSet_h_
#define FloatPointSet_h_
d46 1
a46 1
#include "FloatPoint.h"
d54 1
a54 1
class IA_Set<IA_FloatPoint> {
d57 1
a57 1
    IA_BasePS<IA_FloatPoint>	*ps;
d59 1
a59 1
    void associate(IA_BasePS<IA_FloatPoint> *);
d62 2
a63 2
    IA_Set(IA_BasePS<IA_FloatPoint> *fps) { associate(fps); }
    IA_Set(IA_PointSetType t, unsigned dim);
d66 7
a72 7
    IA_Set(const IA_FloatPoint&p);
    IA_Set(unsigned dimen, int(*f)(const IA_FloatPoint&));
    IA_Set(unsigned dimen, int(*f)(IA_FloatPoint));
    IA_Set(const IA_ClosurePS<IA_FloatPoint>&);
    IA_Set(unsigned dimen, const IA_FloatPoint *afp, unsigned len);
    IA_Set(const IA_Set<IA_FloatPoint> &fps);
//    IA_Set(const IA_IntPointSet &ips);
d76 1
a76 1
    IA_Set<IA_FloatPoint> & operator=(const IA_Set<IA_FloatPoint>&);
d78 2
a79 2
    int operator==(const IA_Set<IA_FloatPoint>&fps) const ;
    int operator!=(const IA_Set<IA_FloatPoint>&fps) const ;
d82 8
a89 8
    friend IA_Set<IA_FloatPoint> operator|
    (const IA_Set<IA_FloatPoint> &,const IA_Set<IA_FloatPoint> &);
    friend IA_Set<IA_FloatPoint> operator&
    (const IA_Set<IA_FloatPoint> &,const IA_Set<IA_FloatPoint> &);
    friend IA_Set<IA_FloatPoint> operator^
    (const IA_Set<IA_FloatPoint> &,const IA_Set<IA_FloatPoint> &);
    friend IA_Set<IA_FloatPoint> operator/
    (const IA_Set<IA_FloatPoint> &,const IA_Set<IA_FloatPoint> &);
d91 2
a92 2
    friend IA_Set<IA_FloatPoint> operator+
    (const IA_Set<IA_FloatPoint> &,const IA_FloatPoint &);
d94 2
a95 2
    friend IA_Set<IA_FloatPoint> intersect_with_structure
    (const IA_Set<IA_FloatPoint> &lhs, const IA_Set<IA_FloatPoint> &rhs,
d97 2
a98 2
    friend IA_Set<IA_FloatPoint> union_with_structure
    (const IA_Set<IA_FloatPoint> &lhs, const IA_Set<IA_FloatPoint> &rhs, IA_SetStructure *s_struct);
d102 2
a103 2
    int operator==(const IA_Set<IA_FloatPoint>&fps) const;
    int operator!=(const IA_Set<IA_FloatPoint>&fps) const
d108 3
a110 3
    int contains(const IA_FloatPoint &ip) const { return ps->contains(ip); }
    unsigned index(const IA_FloatPoint &fp) const { return ps->index(fp); }
    IA_FloatPoint index(unsigned idx) const { return ps->index(idx); }
d116 2
a117 2
    // he has to know how to get at the underlying IA_BasePS<IA_FloatPoint>*
    friend class IA_PSIter<IA_FloatPoint>;
d119 2
a120 2
    friend IA_Set<IA_FloatPoint> IA_empty_fpset(unsigned dim);
    friend IA_Set<IA_FloatPoint> IA_universal_fpset(unsigned dim);
d122 1
a122 1
    static IA_Set<IA_FloatPoint> WhiteHole(unsigned dim) {
d125 1
a125 1
    static IA_Set<IA_FloatPoint> BlackHole(unsigned dim) {
a129 1
typedef IA_Set<IA_FloatPoint> IA_FloatPointSet;
d131 1
a131 1
inline IA_Set<IA_FloatPoint> IA_CWhiteHole(unsigned dim) {
d134 1
a134 1
inline IA_Set<IA_FloatPoint> IA_CBlackHole(unsigned dim) {
d140 4
a143 4
IA_Set<IA_IntPoint> operator&(const IA_Set<IA_IntPoint>&,
			      const IA_FloatPointSet&);
inline IA_Set<IA_IntPoint> operator&(const IA_FloatPointSet&lhs,
			      const IA_Set<IA_IntPoint>&rhs) {
d147 1
a147 1
void SortFloatPointArray(IA_FloatPoint *afp, unsigned len);
@


1.7
log
@Resurrected the int(*)(Point) constructor.
Added static member functions to construct white and black holes.
@
text
@d11 4
d116 2
a117 2
    friend IA_Set<IA_FloatPoint> IA_CBlackHole(unsigned dim);
    friend IA_Set<IA_FloatPoint> IA_CWhiteHole(unsigned dim);
d120 1
a120 1
	return IA_CWhiteHole(dim);
d123 1
a123 1
	return IA_CBlackHole(dim);
d128 7
@


1.6
log
@extensivep() is now extensive()
@
text
@d11 3
d61 1
d114 7
@


1.5
log
@New naming scheme.  Closures are named Closure.
@
text
@d11 3
d103 1
a103 1
    int extensivep() const { return ps->extensivep(); }
@


1.4
log
@Certain functions are necessary for Continuous images,
we will implement them later.
@
text
@d10 5
a14 1
// $Log:	FloatPointSet.h,v $
d37 1
a37 1
template <class P> class IA_PSPred;
d55 1
a55 1
    IA_Set(const IA_PSPred<IA_FloatPoint>&);
@


1.3
log
@Parametrization of the pointsets on the point type using
template specialization.
@
text
@d11 4
d31 1
d60 23
d91 2
d94 1
d105 11
a116 2

typedef IA_Set<IA_FloatPoint> IA_FloatPointSet;
@


1.2
log
@Copyright Notices
@
text
@d11 3
d21 4
d29 1
a30 1
class IA_IntPointSet;
d32 1
a32 1
class IA_FloatPointSet {
d40 2
a41 2
    IA_FloatPointSet(IA_BasePS<IA_FloatPoint> *fps) { associate(fps); }
    IA_FloatPointSet(IA_PointSetType t, unsigned dim);
d43 7
a49 7
    IA_FloatPointSet();
    IA_FloatPointSet(const IA_FloatPoint&p);
    IA_FloatPointSet(unsigned dimen, int(*f)(const IA_FloatPoint&));
    IA_FloatPointSet(const IA_PSPred<IA_FloatPoint>&);
//    IA_FloatPointSet(unsigned dimen, const IA_FloatPoint *afp, unsigned len);
    IA_FloatPointSet(const IA_FloatPointSet &fps);
//    IA_FloatPointSet(const IA_IntPointSet &ips);
d51 1
a51 1
    ~IA_FloatPointSet();
d53 1
a53 1
    IA_FloatPointSet & operator=(const IA_FloatPointSet&);
d56 2
a57 2
    int operator==(const IA_FloatPointSet&fps) const;
    int operator!=(const IA_FloatPointSet&fps) const
d67 5
a71 2
    friend IA_FloatPointSet IA_CBlackHole(unsigned dim);
    friend IA_FloatPointSet IA_CWhiteHole(unsigned dim);
d74 3
a76 1
//void SortFloatPointArray(IA_FloatPoint *afp, unsigned len);
@


1.1
log
@Initial revision
@
text
@d3 6
d10 4
a13 1
// $Log:	IntPointSet.h,v $
@
