GClasses
|
Returns 1 minus the cosine of the angle between the two vectors with the origin.
#include <GDistance.h>
Public Member Functions | |
GKernelDistance (GKernel *pKernel, bool own) | |
GKernelDistance (GDomNode *pNode) | |
virtual | ~GKernelDistance () |
virtual void | init (const GRelation *pRelation, bool own) |
See the comment for GDistanceMetric::init. More... | |
virtual const char * | name () const |
Returns the name of this class. More... | |
virtual GDomNode * | serialize (GDom *pDoc) const |
See the comment for GDistanceMetric::serialize. More... | |
virtual double | squaredDistance (const GVec &a, const GVec &b) const |
Returns the distance (using the norm passed to the constructor) between pA and pB. More... | |
Public Member Functions inherited from GClasses::GDistanceMetric | |
GDistanceMetric () | |
GDistanceMetric (GDomNode *pNode) | |
virtual | ~GDistanceMetric () |
double | operator() (const GVec &a, const GVec &b) const |
Return squaredDistance(pA, pB). Allows dissimilarity metrics to be used as function objects. Do not override. Override squaredDistance(pA,pB) instead. See GDistanceMetric::squaredDistance(const GVec&, const GVec&) More... | |
const GRelation * | relation () const |
Returns the relation that specifies the meaning of the vector elements. More... | |
virtual GVec & | scaleFactors () |
Returns a reference to the vector of attribute scalars. More... | |
Protected Attributes | |
bool | m_ownKernel |
GKernel * | m_pKernel |
Protected Attributes inherited from GClasses::GDistanceMetric | |
bool | m_ownRelation |
const GRelation * | m_pRelation |
GVec | m_scaleFactors |
Additional Inherited Members | |
Static Public Member Functions inherited from GClasses::GDistanceMetric | |
static GDistanceMetric * | deserialize (GDomNode *pNode) |
Deserializes a distance metric. More... | |
static void | test () |
Protected Member Functions inherited from GClasses::GDistanceMetric | |
GDomNode * | baseDomNode (GDom *pDoc) const |
void | setRelation (const GRelation *pRelation, bool own) |
Sets the relation to use with this metric. Takes ownership of the relation iff own is true. More... | |
GClasses::GKernelDistance::GKernelDistance | ( | GKernel * | pKernel, |
bool | own | ||
) |
GClasses::GKernelDistance::GKernelDistance | ( | GDomNode * | pNode | ) |
|
virtual |
|
virtual |
See the comment for GDistanceMetric::init.
Implements GClasses::GDistanceMetric.
|
inlinevirtual |
Returns the name of this class.
Implements GClasses::GDistanceMetric.
See the comment for GDistanceMetric::serialize.
Implements GClasses::GDistanceMetric.
|
virtual |
Returns the distance (using the norm passed to the constructor) between pA and pB.
Implements GClasses::GDistanceMetric.
|
protected |
|
protected |