VTK
|
compute dot-product similarity metrics. More...
#include <vtkDotProductSimilarity.h>
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.
Definition at line 69 of file vtkDotProductSimilarity.h.
Reimplemented from vtkTableAlgorithm.
Definition at line 73 of file vtkDotProductSimilarity.h.
vtkDotProductSimilarity::vtkDotProductSimilarity | ( | ) | [protected] |
vtkDotProductSimilarity::~vtkDotProductSimilarity | ( | ) | [protected] |
static vtkDotProductSimilarity* vtkDotProductSimilarity::New | ( | ) | [static] |
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.
static vtkDotProductSimilarity* vtkDotProductSimilarity::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
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.
virtual vtkIdType vtkDotProductSimilarity::GetVectorDimension | ( | ) | [virtual] |
Controls whether to compute similarities for row-vectors or column-vectors. 0 = rows, 1 = columns.
virtual void vtkDotProductSimilarity::SetVectorDimension | ( | vtkIdType | ) | [virtual] |
Controls whether to compute similarities for row-vectors or column-vectors. 0 = rows, 1 = columns.
virtual int vtkDotProductSimilarity::GetUpperDiagonal | ( | ) | [virtual] |
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.
virtual int vtkDotProductSimilarity::GetDiagonal | ( | ) | [virtual] |
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.
virtual int vtkDotProductSimilarity::GetLowerDiagonal | ( | ) | [virtual] |
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.
virtual int vtkDotProductSimilarity::GetFirstSecond | ( | ) | [virtual] |
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.
virtual int vtkDotProductSimilarity::GetSecondFirst | ( | ) | [virtual] |
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.
virtual double vtkDotProductSimilarity::GetMinimumThreshold | ( | ) | [virtual] |
Specifies a minimum threshold that a similarity must exceed to be included in the output.
virtual void vtkDotProductSimilarity::SetMinimumThreshold | ( | double | ) | [virtual] |
Specifies a minimum threshold that a similarity must exceed to be included in the output.
virtual vtkIdType vtkDotProductSimilarity::GetMinimumCount | ( | ) | [virtual] |
Specifies a minimum number of edges to include for each vector.
virtual void vtkDotProductSimilarity::SetMinimumCount | ( | vtkIdType | ) | [virtual] |
Specifies a minimum number of edges to include for each vector.
virtual vtkIdType vtkDotProductSimilarity::GetMaximumCount | ( | ) | [virtual] |
Specifies a maximum number of edges to include for each vector.
virtual void vtkDotProductSimilarity::SetMaximumCount | ( | vtkIdType | ) | [virtual] |
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.