Ignore:
Timestamp:
10/04/16 18:20:50 (8 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes/No?

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/components/SpectralComponents/SpectralElement.h

    r3029 r3106  
    3434#include <casa/Arrays/Vector.h>
    3535#include <casa/Containers/RecordInterface.h>
     36
     37using namespace casacore;
    3638
    3739namespace casa { //# NAMESPACE CASA - BEGIN
     
    105107
    106108        // Evaluate the value of the element at x
    107         virtual Double operator()(const Double x) const;
    108 
    109         Bool operator==(const SpectralElement& other) const;
     109        virtual casacore::Double operator()(const casacore::Double x) const;
     110
     111        casacore::Bool operator==(const SpectralElement& other) const;
    110112
    111113        // Get parameter n
     
    113115        //  <li> AipsError if illegal n
    114116        // </thrown>
    115         virtual Double operator[](const uInt n) const;
    116 
    117         // Get all the types available as String and codes, and number available
    118         static const String* allTypes(Int &nall,
     117        virtual casacore::Double operator[](const uInt n) const;
     118
     119        // Get all the types available as casacore::String and codes, and number available
     120        static const casacore::String* allTypes(Int &nall,
    119121                        const SpectralElement::Types *&typ);
    120122        // Get a string from the type
    121         static const String &fromType(SpectralElement::Types tp);
    122         // Get a type from a (non-case sensitive; minimum match) String
    123         static Bool toType(SpectralElement::Types &tp,
    124                         const String &typName);
     123        static const casacore::String &fromType(SpectralElement::Types tp);
     124        // Get a type from a (non-case sensitive; minimum match) casacore::String
     125        static casacore::Bool toType(SpectralElement::Types &tp,
     126                        const casacore::String &typName);
    125127
    126128        // Get type of this element
     
    128130
    129131        // Get all parameters
    130         void get(Vector<Double>& params) const;
    131 
    132         Vector<Double> get() const;
     132        void get(casacore::Vector<casacore::Double>& params) const;
     133
     134        casacore::Vector<casacore::Double> get() const;
    133135
    134136        // Get error estimates of parameters
    135         void getError(Vector<Double> &err) const;
    136         Vector<Double> getError() const;
     137        void getError(casacore::Vector<casacore::Double> &err) const;
     138        casacore::Vector<casacore::Double> getError() const;
    137139
    138140        // Get the order (i.e. the number of parameters)
     
    140142
    141143        // Set the error fields
    142         virtual void setError(const Vector<Double> &err);
     144        virtual void setError(const casacore::Vector<casacore::Double> &err);
    143145
    144146        // Set fixed parameters (True) or unset them (False)
     
    148150
    149151        // Fix/unfix all in one go
    150         virtual void fix(const Vector<Bool>& fix);
     152        virtual void fix(const casacore::Vector<casacore::Bool>& fix);
    151153
    152154        // Get the fix state[s]
    153         const Vector<Bool> &fixed() const;
     155        const casacore::Vector<casacore::Bool> &fixed() const;
    154156
    155157        // Save to a record.
    156         virtual Bool toRecord(RecordInterface& out) const;
     158        virtual casacore::Bool toRecord(RecordInterface& out) const;
    157159
    158160        // set parameters
    159         virtual void set(const Vector<Double>& params);
     161        virtual void set(const casacore::Vector<casacore::Double>& params);
    160162
    161163protected:
     
    163165        SpectralElement() {}
    164166
    165         SpectralElement(Types type, const Vector<Double>& parms=Vector<Double>(0));
     167        SpectralElement(Types type, const casacore::Vector<casacore::Double>& parms=casacore::Vector<casacore::Double>(0));
    166168
    167169        SpectralElement(const SpectralElement& other);
     
    169171        SpectralElement &operator=(const SpectralElement& other);
    170172
    171         void _set(const Vector<Double>& params);
     173        void _set(const casacore::Vector<casacore::Double>& params);
    172174
    173175        void _setType(const Types type);
    174176
    175         void _setFunction(const SHARED_PTR<Function<Double, Double> >& f);
    176 
    177         virtual SHARED_PTR<Function<Double, Double> > _getFunction() const {
     177        void _setFunction(const SHARED_PTR<Function<casacore::Double, casacore::Double> >& f);
     178
     179        virtual SHARED_PTR<Function<casacore::Double, casacore::Double> > _getFunction() const {
    178180                return _function;
    179181        }
     
    186188        // The parameters of the function. I.e. the polynomial coefficients;
    187189        // amplitude, center and sigma of a Gaussian.
    188         Vector<Double> _params;
     190        casacore::Vector<casacore::Double> _params;
    189191        // The errors of the parameters
    190         Vector<Double> _errors;
     192        casacore::Vector<casacore::Double> _errors;
    191193        // The indication if the parameter has to be fixed (True) or solved (False).
    192194        // Solved is the default.
    193         Vector<Bool> _fixed;
    194 
    195         SHARED_PTR<Function<Double, Double> > _function;
     195        casacore::Vector<casacore::Bool> _fixed;
     196
     197        SHARED_PTR<Function<casacore::Double, casacore::Double> > _function;
    196198
    197199};
     
    199201ostream &operator<<(ostream& os, const SpectralElement& elem);
    200202
    201 Bool near(const SpectralElement& s1, const SpectralElement& s2, const Double tol);
    202 
    203 Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, const Double tol);
     203casacore::Bool near(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol);
     204
     205casacore::Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol);
    204206
    205207
Note: See TracChangeset for help on using the changeset viewer.