Loading...
Searching...
No Matches
FunctionalProxy.h
Go to the documentation of this file.
//# FunctionFactory.h: a class for creating Function objects from Records
//# Copyright (C) 2002
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef SCIMATH_FUNCTIONALSPROXY_H
#define SCIMATH_FUNCTIONALSPROXY_H
#include <casacore/casa/aips.h>
#include <casacore/casa/Arrays/Vector.h>
#include <casacore/casa/BasicSL/String.h>
#include <casacore/casa/Containers/Record.h>
#include <casacore/casa/BasicSL/Complex.h>
#include <casacore/scimath/Functionals/FunctionHolder.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
class FunctionalProxy {
public:
FunctionalProxy() {;}
// type 0==Double, other == DComplex
FunctionalProxy(const Record& rec, Int type=0);
virtual ~FunctionalProxy();
Vector<Double> f(const Vector<Double>& val);
Vector<Double> fdf(const Vector<Double>& val);
void add(const FunctionalProxy& func);
Vector<DComplex> fc(const Vector<DComplex>& val);
Vector<DComplex> fdfc(const Vector<Double>& val);
void addc(const FunctionalProxy& func);
Record asrecord();
Int npar() const;
uInt ndim() const;
void setparameters(const Vector<Double>& val);
void setparametersc(const Vector<DComplex>& val);
void setmasks(const Vector<Bool>& val);
void setmask(Int i, Bool val);
void setpar(Int i, Double val);
void setparc(Int i, DComplex val);
Vector<Bool> masks() const;
Vector<Double> parameters() const;
Vector<DComplex> parametersc() const;
private:
Record fhd2rec();
Record fhdc2rec();
void rec2fhdc(const Record& rec);
void rec2fhd(const Record& rec);
Int type_;
FunctionHolder<Double> fhd_;
FunctionHolder<DComplex> fhdc_;
};
}
#endif
casacore::type
casacore::FunctionHolder
Definition FunctionHolder.h:89
casacore::FunctionalProxy::setparc
void setparc(Int i, DComplex val)
casacore::FunctionalProxy::npar
Int npar() const
casacore::FunctionalProxy::asrecord
Record asrecord()
casacore::FunctionalProxy::fhdc2rec
Record fhdc2rec()
casacore::FunctionalProxy::type_
Int type_
Definition FunctionalProxy.h:70
casacore::FunctionalProxy::fdfc
Vector< DComplex > fdfc(const Vector< Double > &val)
casacore::FunctionalProxy::fhdc_
FunctionHolder< DComplex > fhdc_
Definition FunctionalProxy.h:72
casacore::FunctionalProxy::rec2fhdc
void rec2fhdc(const Record &rec)
casacore::FunctionalProxy::f
Vector< Double > f(const Vector< Double > &val)
casacore::FunctionalProxy::setmasks
void setmasks(const Vector< Bool > &val)
casacore::FunctionalProxy::rec2fhd
void rec2fhd(const Record &rec)
casacore::FunctionalProxy::masks
Vector< Bool > masks() const
casacore::FunctionalProxy::~FunctionalProxy
virtual ~FunctionalProxy()
casacore::FunctionalProxy::ndim
uInt ndim() const
casacore::FunctionalProxy::fhd2rec
Record fhd2rec()
casacore::FunctionalProxy::setmask
void setmask(Int i, Bool val)
casacore::FunctionalProxy::setparametersc
void setparametersc(const Vector< DComplex > &val)
casacore::FunctionalProxy::setpar
void setpar(Int i, Double val)
casacore::FunctionalProxy::FunctionalProxy
FunctionalProxy(const Record &rec, Int type=0)
type 0==Double, other == DComplex
casacore::FunctionalProxy::setparameters
void setparameters(const Vector< Double > &val)
casacore::FunctionalProxy::parametersc
Vector< DComplex > parametersc() const
casacore::FunctionalProxy::add
void add(const FunctionalProxy &func)
casacore::FunctionalProxy::fc
Vector< DComplex > fc(const Vector< DComplex > &val)
casacore::FunctionalProxy::FunctionalProxy
FunctionalProxy()
Definition FunctionalProxy.h:40
casacore::FunctionalProxy::parameters
Vector< Double > parameters() const
casacore::FunctionalProxy::fdf
Vector< Double > fdf(const Vector< Double > &val)
casacore::FunctionalProxy::addc
void addc(const FunctionalProxy &func)
casacore::FunctionalProxy::fhd_
FunctionHolder< Double > fhd_
Definition FunctionalProxy.h:71
casacore::Vector
Definition Vector.h:82
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::Double
double Double
Definition aipstype.h:53