casacore
scimath
Functionals
Function1D.h
Go to the documentation of this file.
1
//# Function1D.h: Numerical functional interface class for 1 dimension
2
//# Copyright (C) 2001,2002,2005
3
//# Associated Universities, Inc. Washington DC, USA.
4
//#
5
//# This library is free software; you can redistribute it and/or modify it
6
//# under the terms of the GNU Library General Public License as published by
7
//# the Free Software Foundation; either version 2 of the License, or (at your
8
//# option) any later version.
9
//#
10
//# This library is distributed in the hope that it will be useful, but WITHOUT
11
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13
//# License for more details.
14
//#
15
//# You should have received a copy of the GNU Library General Public License
16
//# along with this library; if not, write to the Free Software Foundation,
17
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18
//#
19
//# Correspondence concerning AIPS++ should be addressed as follows:
20
//# Internet email: aips2-request@nrao.edu.
21
//# Postal address: AIPS++ Project Office
22
//# National Radio Astronomy Observatory
23
//# 520 Edgemont Road
24
//# Charlottesville, VA 22903-2475 USA
25
//#
26
//# $Id$
27
28
#ifndef SCIMATH_FUNCTION1D_H
29
#define SCIMATH_FUNCTION1D_H
30
31
//# Includes
32
#include <casacore/casa/aips.h>
33
#include <casacore/scimath/Functionals/Function.h>
34
35
namespace
casacore
{
//# NAMESPACE CASACORE - BEGIN
36
37
//# Forward declarations
38
39
// <summary> Numerical functional interface class for 1 dimension
40
// </summary>
41
42
// <use visibility=export>
43
44
// <reviewed reviewer="tcornwel" date="1996/02/22" tests="tGaussian1D"
45
// demos="">
46
// </reviewed>
47
48
// <prerequisite>
49
// <li> <linkto class="Function">Function</linkto>
50
// </prerequisite>
51
//
52
// <synopsis>
53
// A <src>Function1D</src> is used for classes which map a
54
// scalar or n-dimensional Vector of type <src>T</src> into a <src>T</src>.
55
// The object also has one parameter which can be masked
56
// if necessary, and be used in the <src>Fitting</src> module, and, implicitly,
57
// in the <linkto class=AutoDiff>AutoDiff</linkto> differentiation module.
58
//
59
// The only method implemented in <src>Function1D</src> is the
60
// <src>ndim()</src> method. The rest is inhereted from
61
// <linkto class="Function">Function</linkto>.
62
// </synopsis>
63
64
// <example>
65
// See <linkto class=Function>Function</linkto>.
66
// </example>
67
//
68
// <templating arg=T>
69
// <li> Besides the requirements set by the
70
// <linkto class="Functional">Functional</linkto> base class, it must be
71
// possible to form a <src>Vector<T></src>.
72
// </templating>
73
74
75
template
<
class
T,
class
U=T>
class
Function1D
:
public
Function
<T,U> {
76
public
:
77
//# Typedefs
78
typedef
const
T*
FunctionArg
;
79
80
//# Constructors
81
// Constructors
82
// <group>
83
Function1D
() :
Function
<T,U>() {}
84
explicit
Function1D
(
const
uInt
n) :
Function
<T,U>(n) {}
85
explicit
Function1D
(
const
Vector<T>
&in) :
Function
<T,U>(in) {}
86
Function1D
(
const
FunctionParam<T>
&other) :
Function
<T,U>(other) {}
87
Function1D
(
const
Function1D<T,U>
&other) :
Function
<T,U>(other) {}
88
template
<
class
W,
class
X>
89
Function1D
(
const
Function1D<W,X>
&other) :
Function
<T,U>(other) {}
90
// </group>
91
92
// Destructor
93
virtual
~Function1D
() {}
94
95
// Returns the number of dimensions of function
96
virtual
uInt
ndim
()
const
{
return
1; }
97
98
//# Make members of parent classes known.
99
protected
:
100
using
Function<T,U>::param_p
;
101
public
:
102
using
Function<T,U>::nparameters
;
103
using
Function<T,U>::setMode
;
104
};
105
106
107
}
//# NAMESPACE CASACORE - END
108
109
#endif
casacore::Function1D::ndim
virtual uInt ndim() const
Returns the number of dimensions of function.
Definition:
Function1D.h:96
casacore::Function1D::~Function1D
virtual ~Function1D()
Destructor.
Definition:
Function1D.h:93
casacore::Function1D::Function1D
Function1D(const Function1D< T, U > &other)
Definition:
Function1D.h:87
casacore::Function1D::Function1D
Function1D(const uInt n)
Definition:
Function1D.h:84
casacore::Function1D::FunctionArg
const T * FunctionArg
Definition:
Function1D.h:78
casacore::uInt
unsigned int uInt
Definition:
aipstype.h:51
casacore::Function1D::Function1D
Function1D(const Function1D< W, X > &other)
Definition:
Function1D.h:89
casacore::Function1D::Function1D
Function1D(const Vector< T > &in)
Definition:
Function1D.h:85
casacore
this file contains all the compiler specific defines
Definition:
mainpage.dox:28
casacore::FunctionParam
Definition:
FunctionParam.h:87
casacore::Function
Definition:
Function.h:202
casacore::Function1D::Function1D
Function1D()
Constructors.
Definition:
Function1D.h:83
casacore::Function1D
Definition:
Function1D.h:75
casacore::Vector
Definition:
Vector.h:89
casacore::Function1D::Function1D
Function1D(const FunctionParam< T > &other)
Definition:
Function1D.h:86
Generated by
1.8.20