Table of Contents

Class: SortedView compClust/mlx/views/SortedView.py

Allows for a dataset to be sorted in multiple, flexible ways

Base Classes   
SubsetView
Methods   
__init__
permuteCols
permuteRows
reset
sort
sortColsByFunction
sortRowsByFunction
  __init__ 
__init__ ( self,  dataset )

  permuteCols 
permuteCols ( self,  plist )

Set the columns in the view to a particular permutation.

The plist contains the order in which the data should appear. It needs to have numCols() elements with each element in the range [0:numCols-1]. Duplicates are not allowed.

  permuteRows 
permuteRows ( self,  plist )

Set the rows in the view to a particular permutation.

The plist contains the order in which the data should appear. It needs to have numRows() elements with each element in the range [0:numRows-1]. Duplicates are not allowed.

  reset 
reset ( self )

Places the dataset back in its original order.

  sort 
sort ( self,  func )

  sortColsByFunction 
sortColsByFunction ( self,  func )

Sort the data column-wise using a numeric fuction.

The function should take in a Numeric vector and produce a scalar value which can be sorted using the python built-in sort() method. Thus, valid return types are strings, integers, or floats.

If this subroutine becomes a bottleneck, the permuted order of the data can be computed externally and the view sorted via the permute() methods.

  sortRowsByFunction 
sortRowsByFunction ( self,  func )

Sort the data row-wise using a numeric fuction.

The function should take in a Numeric vector and produce a scalar value which can be sorted using the python built-in sort() method. Thus, valid return types are strings, integers, or floats.

If this subroutine becomes a bottleneck, the permuted order of the data can be computed externally and the view sorted via the permute() methods.


Table of Contents

This document was automatically generated on Wed Aug 27 14:24:57 2003 by HappyDoc version 2.1