Class Distance
Defined in File Distance.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Types
public gwm::CRSDistance
(Class CRSDistance)public gwm::CRSSTDistance
(Class CRSSTDistance)public gwm::DMatDistance
(Class DMatDistance)public gwm::OneDimDistance
(Class OneDimDistance)
Class Documentation
-
class Distance
Abstract base class for calculating spatial distance.
Subclassed by gwm::CRSDistance, gwm::CRSSTDistance, gwm::DMatDistance, gwm::OneDimDistance
Public Types
Public Functions
-
virtual DistanceType type() = 0
Return the type of this object. Type of distance.
-
virtual void makeParameter(std::initializer_list<DistParamVariant> plist) = 0
Create Parameter for Caclulating Distance. This function is pure virtual. It would never be called directly. A list of parameters.
-
virtual arma::vec distance(arma::uword focus) = 0
Calculate distance vector for a focus point. Focused point’s index. Require focus < total Distance vector for the focused point.
-
virtual double maxDistance() = 0
Get maximum distance among all points. Maximum distance.
-
virtual double minDistance() = 0
Get minimum distance among all points Maximum distance.
Public Static Attributes
-
static std::unordered_map<DistanceType, std::string> TypeNameMapper
A mapper between types of distance and its names.
-
struct Parameter
Struct of parameters used in spatial distance calculating. Usually a pointer to object of its derived classes is passed to Distance::distance().
Subclassed by gwm::CRSDistance::Parameter, gwm::DMatDistance::Parameter, gwm::OneDimDistance::Parameter
Public Functions
-
inline Parameter()
Construct a new DistanceParameter object.
Public Members
-
arma::uword total
Total data points.
-
inline Parameter()
-
virtual DistanceType type() = 0