Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::SortRowsVMatrix Class Reference

Sort the samples of a VMatrix according to one (or more) given columns. More...

#include <SortRowsVMatrix.h>

Inheritance diagram for PLearn::SortRowsVMatrix:

Inheritance graph
[legend]
Collaboration diagram for PLearn::SortRowsVMatrix:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SortRowsVMatrix ()
 PLEARN_DECLARE_OBJECT (SortRowsVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.


Static Public Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Public Attributes

int increasing_order
 Public build options.

TVec< intsort_columns

Private Types

typedef SelectRowsVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Static Private Member Functions

void sortRows (VMat &m, TVec< int > &indices, TVec< int > &sort_columns, int istart, int iend, int colstart, bool increasing_order)
 This function returns in indices the sorting of the rows of a VMat m, according to the columns specified by sort_columns[colstart, ...], where m is viewed as ordered by the indices given at calling time.


Detailed Description

Sort the samples of a VMatrix according to one (or more) given columns.

Definition at line 52 of file SortRowsVMatrix.h.


Member Typedef Documentation

typedef SelectRowsVMatrix PLearn::SortRowsVMatrix::inherited [private]
 

Reimplemented from PLearn::SelectRowsVMatrix.

Definition at line 57 of file SortRowsVMatrix.h.


Constructor & Destructor Documentation

PLearn::SortRowsVMatrix::SortRowsVMatrix  ) 
 

Definition at line 55 of file SortRowsVMatrix.cc.

References PLearn::TVec< int >::resize(), and sort_columns.


Member Function Documentation

void PLearn::SortRowsVMatrix::build  )  [virtual]
 

Should call simply inherited::build(), then this class's build_().

This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::SelectRowsVMatrix.

Definition at line 82 of file SortRowsVMatrix.cc.

References build_().

void PLearn::SortRowsVMatrix::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::SelectRowsVMatrix.

Definition at line 91 of file SortRowsVMatrix.cc.

References increasing_order, PLearn::TVec< int >::isNotEmpty(), PLearn::VMat::length(), PLearn::TVec< int >::length(), PLERROR, sort_columns, and PLearn::sortRows().

Referenced by build().

void PLearn::SortRowsVMatrix::declareOptions OptionList ol  )  [static]
 

Declares this class' options.

Reimplemented from PLearn::SelectRowsVMatrix.

Definition at line 62 of file SortRowsVMatrix.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::SortRowsVMatrix::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::SelectRowsVMatrix.

Definition at line 73 of file SortRowsVMatrix.cc.

References PLearn::deepCopyField(), and sort_columns.

PLearn::SortRowsVMatrix::PLEARN_DECLARE_OBJECT SortRowsVMatrix   ) 
 

void PLearn::SortRowsVMatrix::sortRows VMat m,
TVec< int > &  indices,
TVec< int > &  sort_columns,
int  istart,
int  iend,
int  colstart,
bool  increasing_order
[static, private]
 

This function returns in indices the sorting of the rows of a VMat m, according to the columns specified by sort_columns[colstart, ...], where m is viewed as ordered by the indices given at calling time.

Only the samples between istart and iend are considered.

Definition at line 114 of file SortRowsVMatrix.cc.

References PLearn::TVec< T >::size(), PLearn::sortRows(), and val.


Member Data Documentation

int PLearn::SortRowsVMatrix::increasing_order
 

Public build options.

Definition at line 62 of file SortRowsVMatrix.h.

Referenced by build_().

TVec<int> PLearn::SortRowsVMatrix::sort_columns
 

Definition at line 63 of file SortRowsVMatrix.h.

Referenced by build_(), makeDeepCopyFromShallowCopy(), and SortRowsVMatrix().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:26:44 2004 for PLearn by doxygen 1.3.7