casacore
FunctionalProxy.h
Go to the documentation of this file.
1 //# FunctionFactory.h: a class for creating Function objects from Records
2 //# Copyright (C) 2002
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 //#
27 //# $Id$
28 
29 #ifndef SCIMATH_FUNCTIONALSPROXY_H
30 #define SCIMATH_FUNCTIONALSPROXY_H
31 
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Vector.h>
34 #include <casacore/casa/BasicSL/String.h>
35 #include <casacore/casa/Containers/Record.h>
36 #include <casacore/casa/BasicSL/Complex.h>
37 #include <casacore/scimath/Functionals/FunctionHolder.h>
38 
39 namespace casacore { //# NAMESPACE CASACORE - BEGIN
40 
42 public:
44  // type 0==Double, other == DComplex
45  FunctionalProxy(const Record& rec, Int type=0);
46  virtual ~FunctionalProxy();
49  void add(const FunctionalProxy& func);
52  void addc(const FunctionalProxy& func);
54  Int npar() const;
55  uInt ndim() const;
56  void setparameters(const Vector<Double>& val);
57  void setparametersc(const Vector<DComplex>& val);
58  void setmasks(const Vector<Bool>& val);
59 
60  void setmask(Int i, Bool val);
61  void setpar(Int i, Double val);
62  void setparc(Int i, DComplex val);
63 
67 
68 private:
71  void rec2fhdc(const Record& rec);
72  void rec2fhd(const Record& rec);
76 
77 
78 };
79 }
80 #endif
void setparc(Int i, DComplex val)
Vector< Bool > masks() const
FunctionHolder< DComplex > fhdc_
void rec2fhdc(const Record &rec)
Vector< Double > parameters() const
void setmasks(const Vector< Bool > &val)
void rec2fhd(const Record &rec)
void setmask(Int i, Bool val)
Vector< DComplex > parametersc() const
void setparametersc(const Vector< DComplex > &val)
void setpar(Int i, Double val)
FunctionalProxy(const Record &rec, Int type=0)
type 0==Double, other == DComplex
void setparameters(const Vector< Double > &val)
Vector< DComplex > fdfc(const Vector< Double > &val)
Vector< Double > f(const Vector< Double > &val)
void add(const FunctionalProxy &func)
Vector< Double > fdf(const Vector< Double > &val)
Vector< DComplex > fc(const Vector< DComplex > &val)
void addc(const FunctionalProxy &func)
FunctionHolder< Double > fhd_
this file contains all the compiler specific defines
Definition: mainpage.dox:28
unsigned int uInt
Definition: aipstype.h:51
int Int
Definition: aipstype.h:50
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
double Double
Definition: aipstype.h:55