Program Listing for File SpatialAlgorithm.h

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

#ifndef SPATIALALGORITHM_H
#define SPATIALALGORITHM_H

#include "Algorithm.h"
#include "armadillo_config.h"

namespace gwm
{

class SpatialAlgorithm : public Algorithm
{
public:

    SpatialAlgorithm() {}

    SpatialAlgorithm(const arma::mat& coords) : mCoords(coords) {};

    virtual ~SpatialAlgorithm() { mCoords.clear(); }

public:

    const arma::mat& coords() const
    {
        return mCoords;
    }

    void setCoords(const arma::mat& coords)
    {
        mCoords = coords;
    }

    virtual bool isValid() override;

protected:

    arma::mat mCoords;
};

}

#endif  // SPATIALALGORITHM_H