hatrees< T > Class Template Reference

#include <hatrees.h>

List of all members.

Public Types

typedef map< T, node< T >
* >::iterator 
niterator
typedef map< T, node< T >
* >::const_iterator 
const_niterator

Public Member Functions

 hatrees ()
 hatrees (const std::multimap< T, T > &mm)
 ~hatrees ()
void clear ()
void readFromMap (const std::multimap< T, T > &m)
void readFromFile (const string &file)
void showStore (ostream &os) const
int getNodeCount () const
void showCluster (ostream &os, bool reverse=true)
void showClusterIntId (ostream &ous, int &id)
int showClusterByLine (ostream &os)
set< Tkeyset () const
vector< Tkeyarray () const
void clusterArray (vector< set< T > > &vecset)
std::multimap< T, T > & getCluster ()

Private Member Functions

void transform ()

Private Attributes

map< T, node< T > * > nodes
std::multimap< T, Tresult


Detailed Description

template<class T>
class hatrees< T >

this class provides simple file output methods. No database table output is defined in this class bedause it will require different database drivers. The getCluster() method will produce a relational table.

Member Typedef Documentation

template<class T>
typedef map<T, node<T>* >::iterator hatrees< T >::niterator

template<class T>
typedef map<T, node<T>* >::const_iterator hatrees< T >::const_niterator


Constructor & Destructor Documentation

template<class T>
hatrees< T >::hatrees (  )  [inline]

template<class T>
hatrees< T >::hatrees ( const std::multimap< T, T > &  mm  )  [inline]

build a cluster object directly from multimap Save the call to readFromMap()

template<class T>
hatrees< T >::~hatrees (  )  [inline]

References hatrees< T >::nodes.


Member Function Documentation

template<class T>
void hatrees< T >::clear (  )  [inline]

Referenced by breakonecl().

template<class T>
void hatrees< T >::readFromMap ( const std::multimap< T, T > &  m  )  [inline]

template<class T>
void hatrees< T >::readFromFile ( const string &  file  )  [inline]

References ifstream(), join(), hatrees< T >::nodes, and T.

Referenced by clusterFromFile(), and main().

template<class T>
void hatrees< T >::showStore ( ostream &  os  )  const [inline]

using representative as cluster id, results inserted into tab changes the parent pointer of the nodes

References getRoot(), node< T >::key, and hatrees< T >::nodes.

Referenced by clusterFromFile(), and main().

template<class T>
int hatrees< T >::getNodeCount (  )  const [inline]

number of unique members

Referenced by clumpModelIntoGene(), clusterFromFile(), clusterFromTable(), clustergene(), main(), and qual().

template<class T>
void hatrees< T >::showCluster ( ostream &  os,
bool  reverse = true 
) [inline]

in a table format: (cluster_id(representative), members)

References hatrees< T >::result, and hatrees< T >::transform().

Referenced by clusterFromFile(), and main().

template<class T>
void hatrees< T >::showClusterIntId ( ostream &  ous,
int &  id 
) [inline]

an initial id is given, the program will auto_increment this id. This should work with either string or int type of idtype.

References hatrees< T >::result, T, and hatrees< T >::transform().

Referenced by breakonecl(), and main().

template<class T>
int hatrees< T >::showClusterByLine ( ostream &  os  )  [inline]

return the number of clusters

Display one cluster per line, with all members on the same line

References hatrees< T >::result, T, and hatrees< T >::transform().

Referenced by clusterFromFile(), main(), and qual().

template<class T>
set< T > hatrees< T >::keyset (  )  const [inline]

return all the keys as a set<T> it is all the members in the input. Useful for finding singleton clusters.

References hatrees< T >::nodes.

Referenced by clumpModelIntoGene(), clustergene(), and qual().

template<class T>
vector< T > hatrees< T >::keyarray (  )  const [inline]

References hatrees< T >::nodes.

template<class T>
void hatrees< T >::clusterArray ( vector< set< T > > &  vecset  )  [inline]

produce an array of clusters, used call by reference to avoid creating tmp and copying. The result could be used for further analysis. This is one of the output methods.

References hatrees< T >::result, T, and hatrees< T >::transform().

Referenced by breakonecl(), clumpModelIntoGene(), and clustergene().

template<class T>
std::multimap<T,T>& hatrees< T >::getCluster (  )  [inline]

Return a relational table with two columns: | representative | member | Use this method to load into database tables. Singletons are not included in the output.

Referenced by buildGeneCluster(), and loadIntoTable().

template<class T>
void hatrees< T >::transform (  )  [inline, private]


Member Data Documentation

template<class T>
map<T, node<T>* > hatrees< T >::nodes [private]

template<class T>
std::multimap<T, T> hatrees< T >::result [private]


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

Generated on Wed Aug 10 11:57:11 2011 for Softwares from Orpara by  doxygen 1.5.6