.. _program_listing_file_include_gwmodelpp_BandwidthSelector.h: Program Listing for File BandwidthSelector.h ============================================ |exhale_lsh| :ref:`Return to documentation for file ` (``include/gwmodelpp/BandwidthSelector.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef BANDWIDTHSELECTOR_H #define BANDWIDTHSELECTOR_H #include #include #include #include "Status.h" #include "IBandwidthSelectable.h" #include "spatialweight/BandwidthWeight.h" namespace gwm { class BandwidthSelector { public: BandwidthSelector(const BandwidthWeight& bandwidth): mBandwidth(bandwidth), mOptimisedBandwidth(bandwidth) {} BandwidthSelector(const BandwidthWeight& bandwidth, double lower, double upper) : mBandwidth(bandwidth), mOptimisedBandwidth(bandwidth), mLower(lower) , mUpper(upper) {} ~BandwidthSelector() {} public: // const BandwidthWeight *bandwidth() const { return mBandwidth; } const BandwidthWeight& result() const { return mOptimisedBandwidth; } // void setBandwidth(BandwidthWeight *bandwidth) { mBandwidth = bandwidth; } double lower() const { return mLower; } void setLower(double lower) { mLower = lower; } double upper() const { return mUpper; } void setUpper(double upper) { mUpper = upper; } BandwidthCriterionList bandwidthCriterion() const; public: Status optimize(IBandwidthSelectable* instance); private: const BandwidthWeight& mBandwidth; BandwidthWeight mOptimisedBandwidth; double mLower; double mUpper; std::unordered_map mBandwidthCriterion; }; } #endif // BANDWIDTHSELECTOR_H