Program Listing for File BandwidthSelector.h

Return to documentation for file (include/gwmodelpp/BandwidthSelector.h)

#ifndef BANDWIDTHSELECTOR_H
#define BANDWIDTHSELECTOR_H

#include <map>
#include <vector>
#include <utility>
#include "IBandwidthSelectable.h"
#include "spatialweight/BandwidthWeight.h"

namespace gwm
{

class BandwidthSelector
{
public:

    BandwidthSelector() {}

    BandwidthSelector(BandwidthWeight* bandwidth, double lower, double upper) : mBandwidth(bandwidth) , mLower(lower) , mUpper(upper) {}

    ~BandwidthSelector() {}

public:

    BandwidthWeight *bandwidth() const { return mBandwidth; }

    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:

    BandwidthWeight* optimize(IBandwidthSelectable* instance);

private:
    BandwidthWeight* mBandwidth;
    double mLower;
    double mUpper;
    std::unordered_map<double, double> mBandwidthCriterion;
};

}

#endif  // BANDWIDTHSELECTOR_H