VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkDotProductSimilarity Class Reference

compute dot-product similarity metrics. More...

#include <vtkDotProductSimilarity.h>

Inheritance diagram for vtkDotProductSimilarity:
Inheritance graph
[legend]
Collaboration diagram for vtkDotProductSimilarity:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkTableAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkDotProductSimilarityNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkIdType GetVectorDimension ()
virtual void SetVectorDimension (vtkIdType)
virtual int GetUpperDiagonal ()
virtual void SetUpperDiagonal (int)
virtual int GetDiagonal ()
virtual void SetDiagonal (int)
virtual int GetLowerDiagonal ()
virtual void SetLowerDiagonal (int)
virtual int GetFirstSecond ()
virtual void SetFirstSecond (int)
virtual int GetSecondFirst ()
virtual void SetSecondFirst (int)
virtual double GetMinimumThreshold ()
virtual void SetMinimumThreshold (double)
virtual vtkIdType GetMinimumCount ()
virtual void SetMinimumCount (vtkIdType)
virtual vtkIdType GetMaximumCount ()
virtual void SetMaximumCount (vtkIdType)

Static Public Member Functions

static vtkDotProductSimilarityNew ()
static int IsTypeOf (const char *type)
static vtkDotProductSimilaritySafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkDotProductSimilarity ()
 ~vtkDotProductSimilarity ()
int FillInputPortInformation (int, vtkInformation *)
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Detailed Description

compute dot-product similarity metrics.

Treats matrices as collections of vectors and computes dot-product similarity metrics between vectors.

The results are returned as an edge-table that lists the index of each vector and their computed similarity. The output edge-table is typically used with vtkTableToGraph to create a similarity graph.

This filter can be used with one or two input matrices. If you provide a single matrix as input, every vector in the matrix is compared with every other vector. If you provide two matrices, every vector in the first matrix is compared with every vector in the second matrix.

Note that this filter only computes the dot-product between each pair of vectors; if you want to compute the cosine of the angles between vectors, you will need to normalize the inputs yourself.

Inputs: Input port 0: (required) A vtkDenseArray<double> with two dimensions (a matrix). Input port 1: (optional) A vtkDenseArray<double> with two dimensions (a matrix).

Outputs: Output port 0: A vtkTable containing "source", "target", and "similarity" columns.

Warning:
Note that the complexity of this filter is quadratic! It also requires dense arrays as input, in the future it should be generalized to accept sparse arrays.
Thanks:
Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.
Events:
vtkCommand::ProgressEvent
Tests:
vtkDotProductSimilarity (Tests)

Definition at line 69 of file vtkDotProductSimilarity.h.


Member Typedef Documentation

Reimplemented from vtkTableAlgorithm.

Definition at line 73 of file vtkDotProductSimilarity.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkTableAlgorithm.

static int vtkDotProductSimilarity::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 vtkTableAlgorithm.

virtual int vtkDotProductSimilarity::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 vtkTableAlgorithm.

Reimplemented from vtkTableAlgorithm.

virtual vtkObjectBase* vtkDotProductSimilarity::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkTableAlgorithm.

Reimplemented from vtkTableAlgorithm.

void vtkDotProductSimilarity::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 vtkTableAlgorithm.

Controls whether to compute similarities for row-vectors or column-vectors. 0 = rows, 1 = columns.

Controls whether to compute similarities for row-vectors or column-vectors. 0 = rows, 1 = columns.

When computing similarities for a single input matrix, controls whether the results will include the upper diagonal of the similarity matrix. Default: true.

virtual void vtkDotProductSimilarity::SetUpperDiagonal ( int  ) [virtual]

When computing similarities for a single input matrix, controls whether the results will include the upper diagonal of the similarity matrix. Default: true.

When computing similarities for a single input matrix, controls whether the results will include the diagonal of the similarity matrix. Default: false.

virtual void vtkDotProductSimilarity::SetDiagonal ( int  ) [virtual]

When computing similarities for a single input matrix, controls whether the results will include the diagonal of the similarity matrix. Default: false.

When computing similarities for a single input matrix, controls whether the results will include the lower diagonal of the similarity matrix. Default: false.

virtual void vtkDotProductSimilarity::SetLowerDiagonal ( int  ) [virtual]

When computing similarities for a single input matrix, controls whether the results will include the lower diagonal of the similarity matrix. Default: false.

When computing similarities for two input matrices, controls whether the results will include comparisons from the first matrix to the second matrix.

virtual void vtkDotProductSimilarity::SetFirstSecond ( int  ) [virtual]

When computing similarities for two input matrices, controls whether the results will include comparisons from the first matrix to the second matrix.

When computing similarities for two input matrices, controls whether the results will include comparisons from the second matrix to the first matrix.

virtual void vtkDotProductSimilarity::SetSecondFirst ( int  ) [virtual]

When computing similarities for two input matrices, controls whether the results will include comparisons from the second matrix to the first matrix.

Specifies a minimum threshold that a similarity must exceed to be included in the output.

Specifies a minimum threshold that a similarity must exceed to be included in the output.

Specifies a minimum number of edges to include for each vector.

Specifies a minimum number of edges to include for each vector.

Specifies a maximum number of edges to include for each vector.

Specifies a maximum number of edges to include for each vector.

int vtkDotProductSimilarity::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkTableAlgorithm.

int vtkDotProductSimilarity::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkTableAlgorithm.


The documentation for this class was generated from the following file: