Class MinkwoskiDistance

Inheritance Relationships

Base Type

Class Documentation

class MinkwoskiDistance : public gwm::CRSDistance

Minkwoski distnace.

Public Functions

inline MinkwoskiDistance()
MinkwoskiDistance(double p, double theta)

Construct a new MinkwoskiDistance object Polynomial number Angle.

MinkwoskiDistance(const MinkwoskiDistance &distance)

Copy construct a new MinkwoskiDistance object The MinkwoskiDistance object to be copied.

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.

inline double poly() const

Get the polynomial number. Polynomial number.

inline void setPoly(double poly)

Set the polynomial number. Polynomial number.

inline double theta() const

Get the angle. Angle.

inline void setTheta(double theta)

Set the angle. Angle.

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

Calculate distance vector for a focus point. Focused point’s index. Require focus < total Distance vector for the focused point.

Public Static Functions

static arma::mat CoordinateRotate(const arma::mat &coords, double theta)

Rotate coordiantes. Coordiantes Angle Rotated coordinates.

static inline arma::vec ChessDistance(const arma::rowvec &out_loc, const arma::mat &in_locs)

Chess distance. Coordinate of focus point Coordinates of data poitnts Distance vector from the focus point to data points.

static inline arma::vec ManhattonDist(const arma::rowvec &out_loc, const arma::mat &in_locs)

Manhatton distance. Coordinate of focus point Coordinates of data poitnts Distance vector from the focus point to data points.

static inline arma::vec MinkwoskiDist(const arma::rowvec &out_loc, const arma::mat &in_locs, double p)

Minkwoski distnace Coordinate of focus point Coordinates of data poitnts Polynomial number Distance vector from the focus point to data points.