Class CRSSTDistance

Inheritance Relationships

Base Type

Class Documentation

class CRSSTDistance : public gwm::Distance

Class for calculating spatial temporal distance.

Public Types

typedef arma::vec (*CalculatorType)(Distance*, gwm::OneDimDistance*, arma::uword, double, double)

parameters used in calculating.

Public Functions

CRSSTDistance()

Construct.

explicit CRSSTDistance(Distance *spatialDistance, gwm::OneDimDistance *temporalDistance, double lambda)
explicit CRSSTDistance(Distance *spatialDistance, gwm::OneDimDistance *temporalDistance, double lambda, double angle)
CRSSTDistance(const CRSSTDistance &distance)

Copy construct.

Parameters:

distance – Refernce to object for copying.

inline virtual Distance *clone() const override

Clone this Distance object. Newly created pointer.

inline virtual DistanceType type() override

Return the type of this object. Type of distance.

virtual void makeParameter(std::initializer_list<DistParamVariant> plist) override

make the input data, initialize mParameter. need to contain 4 items, mat, mat, vec, vec

inline virtual arma::vec distance(arma::uword focus) override

calculate distance focus * already initialized OrthogonalSTDistance or ObliqueSTDistance

virtual double minDistance() override

bandwidth calculation.

virtual double maxDistance() override

Get maximum distance among all points. Maximum distance.

inline const Distance *spatialDistance() const
inline const gwm::OneDimDistance *temporalDistance() const
inline void setLambda(const double lambda)

Public Static Functions

static arma::vec OrthogonalSTDistance(Distance *spatial, gwm::OneDimDistance *temporal, arma::uword focus, double lambda, double angle)

Calculate temporal and spatial distance, Orthogonal Distance spatial distance of class gwm::Distance temporal distance of class gwm::Distance the number of data to calculate lambda angle Distance vector.

static arma::vec ObliqueSTDistance(Distance *spatial, gwm::OneDimDistance *temporal, arma::uword focus, double lambda, double angle)

Calculate temporal and spatial distance with angle, Oblique Distance spatial distance of class gwm::Distance temporal distance of class gwm::Distance the number of data to calculate lambda angle Distance vector.

Protected Attributes

Distance *mSpatialDistance = nullptr

Pointer to instance for spatial distance.

gwm::OneDimDistance *mTemporalDistance = nullptr

Pointer to instance for temporal distance.

double mLambda = 0.0

Weight of temporal distance.

double mAngle = arma::datum::pi / 2

Angle of spatial distance and temporal distance.