head	1.7;
access;
symbols
	r0_10:1.7
	Eglin_alpha_1:1.7;
locks; strict;
comment	@// @;


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

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

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

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

1.3
date	93.01.19.14.56.22;	author jnw;	state Exp;
branches;
next	1.2;

1.2
date	92.11.14.09.37.18;	author jnw;	state Exp;
branches;
next	1.1;

1.1
date	92.10.05.11.44.50;	author jnw;	state Exp;
branches;
next	;


desc
@Initial revision
@


1.7
log
@Copyright Notices
@
text
@// Emacs: -*- C++ -*-

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


// $Log:	FunctionRefDI.h,v $
// Revision 1.6  93/04/08  13:12:21  thoth
// new restriction method.
// 
// Revision 1.5  93/02/23  14:24:16  thoth
// we don't need other iterators.
// We can use the default clone_self_extensively.
// 
// Revision 1.4  93/02/08  13:02:47  thoth
// static dummy member belongs in the .c file.
// 
// Revision 1.3  93/01/19  14:56:22  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/14  09:37:18  jnw
// Modified to support new iterator classes
// 
// Revision 1.1  92/10/05  11:44:50  jnw
// Initial revision
// 

#ifndef FunctionRefDI_h_
#define FunctionRefDI_h_

#include "ia.h"
#include "BaseDI.h"

template <class T>
class IA_FunctionRefDI: public IA_BaseDI<T>{
private:
    T (*func)(const IA_IntPoint&);

    static char dummy;
public:
    IA_FunctionRefDI(const IA_IntPointSet& p, T (*fp)(const IA_IntPoint&))
    : IA_BaseDI<T>(p){
	this->func = fp;
    }

    int extensivep() const { return 0; }

    T operator ()(const IA_IntPoint&) const;

    static IA_DiscreteImageType s_type() { return &dummy; }
    IA_DiscreteImageType type() const { return &dummy; }

    //IA_BaseDI<T>* clone_self_extensively() const;

    IA_BaseDI<T>* restricted_to(const IA_IntPointSet &ips) const {
	return new IA_FunctionRefDI(this->domain() & ips, this->func);
    }


    ostream& print_this(ostream&) const;
};

#endif
@


1.6
log
@new restriction method.
@
text
@d3 6
d10 3
@


1.5
log
@we don't need other iterators.
We can use the default clone_self_extensively.
@
text
@d4 4
d47 5
@


1.4
log
@static dummy member belongs in the .c file.
@
text
@d4 3
a22 4
template <class T> class IA_FunctionRefDIPIter;

template <class T> class IA_FunctionRefDIVIter;

d30 1
a30 1
    IA_FunctionRefDI(T (*fp)(const IA_IntPoint&), const IA_IntPointSet& p)
d42 1
a42 1
    int equal(const IA_BaseDI<T>* other) const;
a43 2
    IA_BaseDI<T>* clone_self_extensively() const;

a44 3

    friend class IA_FunctionRefDIPIter<T>;
    friend class IA_FunctionRefDIVIter<T>;
@


1.3
log
@Modified to support IA_ naming convention
@
text
@d4 3
d20 1
a20 2
template <class T>
class IA_FunctionRefDIPIter;
d22 1
a22 2
template <class T>
class IA_FunctionRefDIVIter;
a51 3

template <class T>
char IA_FunctionRefDI<T>::dummy = 0;
@


1.2
log
@Modified to support new iterator classes
@
text
@d4 3
d18 1
a18 1
class FunctionRefDIPIter;
d21 1
a21 1
class FunctionRefDIVIter;
d24 1
a24 1
class FunctionRefDI: public BaseDI<T>{
d26 1
a26 1
    T (*func)(const IntPoint&);
d30 2
a31 2
    FunctionRefDI(T (*fp)(const IntPoint&), const IntPointSet& p)
    : BaseDI<T>(p){
d37 1
a37 1
    T operator ()(const IntPoint&) const;
d39 2
a40 2
    static DiscreteImageType s_type() { return &dummy; }
    DiscreteImageType type() const { return &dummy; }
d42 1
a42 1
    int equal(const BaseDI<T>* other) const;
d44 1
a44 1
    BaseDI<T>* clone_self_extensively() const;
d48 2
a49 2
    friend class FunctionRefDIPIter<T>;
    friend class FunctionRefDIVIter<T>;
d53 1
a53 1
char FunctionRefDI<T>::dummy = 0;
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d15 1
a15 1
class FunctionRefDIIter;
d18 3
d45 2
a46 1
    friend class FunctionRefDIIter<T>;
@
