SparseLibrary  Version 1.6.0
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BlockOrderer< T > Class Template Referenceabstract

Induces a block order by fully traversing an SBDTree. More...

#include <BlockOrderer.hpp>

Inheritance diagram for BlockOrderer< T >:
Inheritance graph
[legend]
Collaboration diagram for BlockOrderer< T >:
Collaboration graph
[legend]

Public Member Functions

 BlockOrderer ()
 Base constructor.
 
virtual ~BlockOrderer ()
 Base destructor.
 
std::vector< std::vector
< Triplet< T > > > 
induce (const std::vector< Triplet< T > > &input, std::vector< unsigned long int > &r_hierarchy, std::vector< unsigned long int > &c_hierarchy, std::vector< unsigned long int > &r_bounds, std::vector< unsigned long int > &c_bounds, std::vector< signed char > *datatype)
 Induces this ordering on a set of nonzeroes.
 

Protected Member Functions

void prefix (const unsigned long int index)
 Prefix operation during SBD tree traversal. More...
 
void infix (const unsigned long int index)
 Infix operation during SBD tree traversal. More...
 
void postfix (const unsigned long int index)
 Postfix operation during SBD tree traversal. More...
 
void traverse ()
 Traverses the SBD tree, makes call to prefix, infix, and postfix during traversal. More...
 
void pre_height (const unsigned long int index)
 Prefix code for height-determining traversal. More...
 
void in_height (const unsigned long int index)
 Infix code for height-determining traversal. More...
 
void post_height (const unsigned long int index)
 Postfix code for height-determining traversal. More...
 
virtual void pre_readout (const unsigned long int index)=0
 Prefix traversal code. More...
 
virtual void in_readout (const unsigned long int index)=0
 Infix traversal code. More...
 
virtual void post_readout (const unsigned long int index)=0
 Postfix traversal code. More...
 
bool left_horizontal (const unsigned long int index, const Triplet< T > triplet)
 Helper function for determining place of a nonzero within a separator cross.
 
bool right_horizontal (const unsigned long int index, const Triplet< T > triplet)
 Helper function for determining place of a nonzero within a separator cross.
 
bool upper_vertical (const unsigned long int index, const Triplet< T > triplet)
 Helper function for determining place of a nonzero within a separator cross.
 
bool lower_vertical (const unsigned long int index, const Triplet< T > triplet)
 Helper function for determining place of a nonzero within a separator cross.
 
bool middle (const unsigned long int index, const Triplet< T > triplet)
 Helper function for determining place of a nonzero within a separator cross.
 

Protected Attributes

SBDTreetree
 The SBD tree to order the blocks of. More...
 
std::vector< char > leftpass
 Stores whether a node has been traversed from the left. More...
 
std::vector< char > rightpass
 Stores whether a node has been traversed from the right. More...
 
char traverse_mode
 Sets the traversal mode. More...
 
unsigned long int * height
 Stores the height of a SBD node. More...
 
unsigned long int cur_height
 The current height at the traversal position. More...
 
std::vector< Triplet< T > > * items
 Nonzero storage at each node. More...
 
std::vector< std::vector
< Triplet< T > > > * 
output
 Output structure after SBD readout (series of blocks in the correct order). More...
 
std::vector< signed char > * datatype
 The data type of each block. More...
 

Static Protected Attributes

static const char TRAVERSE_HEIGHT = 0
 Mode flag for height-determining traversal. More...
 
static const char READOUT = 1
 Mode flag for SBD tree readouts. More...
 

Detailed Description

template<typename T>
class BlockOrderer< T >

Induces a block order by fully traversing an SBDTree.

Member Function Documentation

template<typename T>
void BlockOrderer< T >::in_height ( const unsigned long int  index)
protected

Infix code for height-determining traversal.

template<typename T>
virtual void BlockOrderer< T >::in_readout ( const unsigned long int  index)
protectedpure virtual

Infix traversal code.

Implemented in MinCCS< T >, MinCRS< T >, BlockCRS< T >, U2< T >, Duck< T >, and SepLast< T >.

Referenced by BlockOrderer< T >::infix().

template<typename T>
void BlockOrderer< T >::infix ( const unsigned long int  index)
inlineprotected
template<typename T>
void BlockOrderer< T >::post_height ( const unsigned long int  index)
protected

Postfix code for height-determining traversal.

template<typename T>
virtual void BlockOrderer< T >::post_readout ( const unsigned long int  index)
protectedpure virtual

Postfix traversal code.

Implemented in MinCCS< T >, MinCRS< T >, BlockCRS< T >, U2< T >, Duck< T >, and SepLast< T >.

Referenced by BlockOrderer< T >::postfix().

template<typename T>
void BlockOrderer< T >::postfix ( const unsigned long int  index)
inlineprotected
template<typename T>
void BlockOrderer< T >::pre_height ( const unsigned long int  index)
protected

Prefix code for height-determining traversal.

template<typename T>
virtual void BlockOrderer< T >::pre_readout ( const unsigned long int  index)
protectedpure virtual

Prefix traversal code.

Implemented in BlockCRS< T >, MinCCS< T >, MinCRS< T >, U2< T >, Duck< T >, and SepLast< T >.

Referenced by BlockOrderer< T >::prefix().

template<typename T>
void BlockOrderer< T >::prefix ( const unsigned long int  index)
inlineprotected
template<typename T>
void BlockOrderer< T >::traverse ( )
inlineprotected

Member Data Documentation

template<typename T>
unsigned long int BlockOrderer< T >::cur_height
protected

The current height at the traversal position.

Referenced by BlockOrderer< T >::induce(), BlockOrderer< T >::infix(), BlockOrderer< T >::postfix(), and BlockOrderer< T >::prefix().

template<typename T>
std::vector< signed char >* BlockOrderer< T >::datatype
protected
template<typename T>
unsigned long int* BlockOrderer< T >::height
protected

Stores the height of a SBD node.

Referenced by BlockOrderer< T >::induce(), and BlockOrderer< T >::infix().

template<typename T>
std::vector< Triplet< T > >* BlockOrderer< T >::items
protected
template<typename T>
std::vector< char > BlockOrderer< T >::leftpass
protected

Stores whether a node has been traversed from the left.

Referenced by BlockOrderer< T >::traverse().

template<typename T>
std::vector< std::vector< Triplet< T > > >* BlockOrderer< T >::output
protected
template<typename T>
const char BlockOrderer< T >::READOUT = 1
staticprotected
template<typename T>
std::vector< char > BlockOrderer< T >::rightpass
protected

Stores whether a node has been traversed from the right.

Referenced by BlockOrderer< T >::traverse().

template<typename T>
const char BlockOrderer< T >::TRAVERSE_HEIGHT = 0
staticprotected
template<typename T>
char BlockOrderer< T >::traverse_mode
protected
template<typename T>
SBDTree* BlockOrderer< T >::tree
protected

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