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

#include <vnl_index_sort.h>

List of all members.

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.
typedef vnl_vector< TIndex > SortVectorIndexType
typedef vnl_matrix< TValue > SortMatrixType
 typedefs for matrix sorting.
typedef vnl_matrix< TIndex > SortMatrixIndexType

Public Member Functions

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

Public Attributes

enum vnl_index_sort::DirectionType Direction

Private Member Functions

void sortIndices (const SortVectorType &v, SortVectorIndexType &s)
 sort the indices of a vector.
void reindexValues (const SortVectorType &values, const SortVectorIndexType &indices, SortVectorType &sorted_values)
 reorder values from sorted indices.
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.
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.

Detailed Description

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

Definition at line 15 of file vnl_index_sort.h.


Member Typedef Documentation

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

Definition at line 25 of file vnl_index_sort.h.

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

typedefs for matrix sorting.

Definition at line 24 of file vnl_index_sort.h.

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

Definition at line 21 of file vnl_index_sort.h.

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

typedefs for vector sorting.

Definition at line 20 of file vnl_index_sort.h.


Member Enumeration Documentation

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

matrix sort along rows or columns?.

Enumerator:
ByRow 
ByColumn 

Definition at line 28 of file vnl_index_sort.h.


Member Function Documentation

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 
) [inline, private]

get specified vector from matrix depending on direction.

Definition at line 125 of file vnl_index_sort.h.

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 64 of file vnl_index_sort.h.

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 
) [inline, private]

put specified vector to matrix depending on direction.

Definition at line 147 of file vnl_index_sort.h.

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::reindexValues ( const SortVectorType values,
const SortVectorIndexType indices,
SortVectorType sorted_values 
) [inline, private]

reorder values from sorted indices.

Definition at line 113 of file vnl_index_sort.h.

template<class TValue , class TIndex >
void vnl_index_sort< TValue, TIndex >::sortIndices ( const SortVectorType v,
SortVectorIndexType s 
) [inline, private]

sort the indices of a vector.

Author - Ian Scott

Definition at line 101 of file vnl_index_sort.h.

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 31 of file vnl_index_sort.h.

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 39 of file vnl_index_sort.h.

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 51 of file vnl_index_sort.h.


Member Data Documentation

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: