VTK
|
measure distance from k-means cluster centers using a user-specified expression More...
#include <vtkKMeansDistanceFunctorCalculator.h>
Public Types | |
typedef vtkKMeansDistanceFunctor | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkKMeansDistanceFunctorCalculator * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | operator() (double &, vtkVariantArray *, vtkVariantArray *) |
virtual void | SetDistanceExpression (const char *) |
virtual char * | GetDistanceExpression () |
virtual void | SetFunctionParser (vtkFunctionParser *) |
virtual vtkFunctionParser * | GetFunctionParser () |
Static Public Member Functions | |
static vtkKMeansDistanceFunctorCalculator * | New () |
static int | IsTypeOf (const char *type) |
static vtkKMeansDistanceFunctorCalculator * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkKMeansDistanceFunctorCalculator () | |
virtual | ~vtkKMeansDistanceFunctorCalculator () |
Protected Attributes | |
char * | DistanceExpression |
int | TupleSize |
vtkFunctionParser * | FunctionParser |
measure distance from k-means cluster centers using a user-specified expression
This is a subclass of the default k-means distance functor that allows the user to specify a distance function as a string. The provided expression is evaluated whenever the parenthesis operator is invoked but this is much slower than the default distance calculation.
User-specified distance expressions should be written in terms of two vector variables named "x" and "y". The length of the vectors will be determined by the k-means request and all columns of interest in the request must contain values that may be converted to a floating point representation. (Strings and vtkObject pointers are not allowed.) An example distance expression is "sqrt( (x0-y0)^2 + (x1-y1)^2 )" which computes Euclidian distance in a plane defined by the first 2 coordinates of the vectors specified.
Definition at line 32 of file vtkKMeansDistanceFunctorCalculator.h.
Reimplemented from vtkKMeansDistanceFunctor.
Definition at line 36 of file vtkKMeansDistanceFunctorCalculator.h.
virtual vtkKMeansDistanceFunctorCalculator::~vtkKMeansDistanceFunctorCalculator | ( | ) | [protected, virtual] |
static vtkKMeansDistanceFunctorCalculator* vtkKMeansDistanceFunctorCalculator::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkKMeansDistanceFunctor.
static int vtkKMeansDistanceFunctorCalculator::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkKMeansDistanceFunctor.
virtual int vtkKMeansDistanceFunctorCalculator::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkKMeansDistanceFunctor.
static vtkKMeansDistanceFunctorCalculator* vtkKMeansDistanceFunctorCalculator::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkKMeansDistanceFunctor.
virtual vtkObjectBase* vtkKMeansDistanceFunctorCalculator::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkKMeansDistanceFunctor.
Reimplemented from vtkKMeansDistanceFunctor.
virtual void vtkKMeansDistanceFunctorCalculator::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkKMeansDistanceFunctor.
virtual void vtkKMeansDistanceFunctorCalculator::operator() | ( | double & | , |
vtkVariantArray * | , | ||
vtkVariantArray * | |||
) | [virtual] |
Compute the distance from one observation to another, returning the distance in the first argument.
Reimplemented from vtkKMeansDistanceFunctor.
virtual void vtkKMeansDistanceFunctorCalculator::SetDistanceExpression | ( | const char * | ) | [virtual] |
Set/get the distance function expression.
virtual char* vtkKMeansDistanceFunctorCalculator::GetDistanceExpression | ( | ) | [virtual] |
Set/get the distance function expression.
virtual void vtkKMeansDistanceFunctorCalculator::SetFunctionParser | ( | vtkFunctionParser * | ) | [virtual] |
Set/get the string containing an expression which evaluates to the distance metric used for k-means computation. The scalar variables "x0", "x1", ... "xn" and "y0", "y1", ..., "yn" refer to the coordinates involved in the computation.
virtual vtkFunctionParser* vtkKMeansDistanceFunctorCalculator::GetFunctionParser | ( | ) | [virtual] |
Set/get the string containing an expression which evaluates to the distance metric used for k-means computation. The scalar variables "x0", "x1", ... "xn" and "y0", "y1", ..., "yn" refer to the coordinates involved in the computation.
char* vtkKMeansDistanceFunctorCalculator::DistanceExpression [protected] |
Definition at line 62 of file vtkKMeansDistanceFunctorCalculator.h.
int vtkKMeansDistanceFunctorCalculator::TupleSize [protected] |
Definition at line 63 of file vtkKMeansDistanceFunctorCalculator.h.
Definition at line 64 of file vtkKMeansDistanceFunctorCalculator.h.