Classes | Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
vnl_index_sort< TValue, TIndex > Class Template Reference

#include <vnl_index_sort.h>

Classes

struct  sort_index_compare_functor
 Implementation class - Do Not Use. More...
 

Public Types

enum  DirectionType { ByRow, ByColumn }
 matrix sort along rows or columns?. More...
 
typedef vnl_vector< TValue > SortVectorType
 typedefs for vector sorting. More...
 
typedef vnl_vector< TIndex > SortVectorIndexType
 
typedef vnl_matrix< TValue > SortMatrixType
 typedefs for matrix sorting. More...
 
typedef vnl_matrix< TIndex > SortMatrixIndexType
 

Public Member Functions

void vector_sort (const SortVectorType &values, SortVectorIndexType &indices)
 just sort indices. More...
 
void vector_sort (const SortVectorType &values, SortVectorType &sorted_values, SortVectorIndexType &indices)
 sort indices and values. More...
 
void vector_sort_in_place (SortVectorType &values, SortVectorIndexType &indices)
 sort indices, return sorted values in place. More...
 
void matrix_sort (DirectionType direction, const SortMatrixType &values, SortMatrixType &sorted_values, SortMatrixIndexType &indices)
 matrix sort. More...
 

Public Attributes

enum vnl_index_sort::DirectionType Direction
 

Private Member Functions

void sortIndices (const SortVectorType &v, SortVectorIndexType &s)
 sort the indices of a vector. More...
 
void reindexValues (const SortVectorType &values, const SortVectorIndexType &indices, SortVectorType &sorted_values)
 reorder values from sorted indices. More...
 
template<class T >
void getVector (const vnl_matrix< T > &fromMat, DirectionType direction, int whichVect, vnl_vector< T > &toVect)
 get specified vector from matrix depending on direction. More...
 
template<class T >
void putVector (const vnl_vector< T > &fromVect, DirectionType direction, int whichVect, vnl_matrix< T > &toMat)
 put specified vector to matrix depending on direction. More...
 

Detailed Description

template<class TValue, class TIndex>
class vnl_index_sort< TValue, TIndex >

Definition at line 18 of file vnl_index_sort.h.

Member Typedef Documentation

◆ SortMatrixIndexType

template<class TValue , class TIndex >
typedef vnl_matrix<TIndex> vnl_index_sort< TValue, TIndex >::SortMatrixIndexType

Definition at line 28 of file vnl_index_sort.h.

◆ SortMatrixType

template<class TValue , class TIndex >
typedef vnl_matrix<TValue> vnl_index_sort< TValue, TIndex >::SortMatrixType

typedefs for matrix sorting.

Definition at line 27 of file vnl_index_sort.h.

◆ SortVectorIndexType

template<class TValue , class TIndex >
typedef vnl_vector<TIndex> vnl_index_sort< TValue, TIndex >::SortVectorIndexType

Definition at line 24 of file vnl_index_sort.h.

◆ SortVectorType

template<class TValue , class TIndex >
typedef vnl_vector<TValue> vnl_index_sort< TValue, TIndex >::SortVectorType

typedefs for vector sorting.

Definition at line 23 of file vnl_index_sort.h.

Member Enumeration Documentation

◆ DirectionType

template<class TValue , class TIndex >
enum vnl_index_sort::DirectionType

matrix sort along rows or columns?.

Enumerator
ByRow 
ByColumn 

Definition at line 31 of file vnl_index_sort.h.

Member Function Documentation

◆ getVector()

template<class TValue , class TIndex >
template<class T >
void vnl_index_sort< TValue, TIndex >::getVector ( const vnl_matrix< T > &  fromMat,
DirectionType  direction,
int  whichVect,
vnl_vector< T > &  toVect 
)
inlineprivate

get specified vector from matrix depending on direction.

Definition at line 128 of file vnl_index_sort.h.

◆ matrix_sort()

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::matrix_sort ( DirectionType  direction,
const SortMatrixType values,
SortMatrixType sorted_values,
SortMatrixIndexType indices 
)
inline

matrix sort.

specify along rows or columns

Definition at line 67 of file vnl_index_sort.h.

◆ putVector()

template<class TValue , class TIndex >
template<class T >
void vnl_index_sort< TValue, TIndex >::putVector ( const vnl_vector< T > &  fromVect,
DirectionType  direction,
int  whichVect,
vnl_matrix< T > &  toMat 
)
inlineprivate

put specified vector to matrix depending on direction.

Definition at line 150 of file vnl_index_sort.h.

◆ reindexValues()

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::reindexValues ( const SortVectorType values,
const SortVectorIndexType indices,
SortVectorType sorted_values 
)
inlineprivate

reorder values from sorted indices.

Definition at line 116 of file vnl_index_sort.h.

◆ sortIndices()

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::sortIndices ( const SortVectorType v,
SortVectorIndexType s 
)
inlineprivate

sort the indices of a vector.

Author - Ian Scott

Definition at line 104 of file vnl_index_sort.h.

◆ vector_sort() [1/2]

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::vector_sort ( const SortVectorType values,
SortVectorIndexType indices 
)
inline

just sort indices.

Definition at line 34 of file vnl_index_sort.h.

◆ vector_sort() [2/2]

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::vector_sort ( const SortVectorType values,
SortVectorType sorted_values,
SortVectorIndexType indices 
)
inline

sort indices and values.

Definition at line 42 of file vnl_index_sort.h.

◆ vector_sort_in_place()

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::vector_sort_in_place ( SortVectorType values,
SortVectorIndexType indices 
)
inline

sort indices, return sorted values in place.

Definition at line 54 of file vnl_index_sort.h.

Member Data Documentation

◆ Direction

template<class TValue , class TIndex >
enum vnl_index_sort::DirectionType vnl_index_sort< TValue, TIndex >::Direction

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