CSeqClusters Class Reference

## Public Types

typedef std::vector< std::unique_ptr< CSeqGroup > > | groups_vector_type

## Public Member Functions

| CSeqClusters ()
| CSeqClusters (const CSeqClusters &)=delete
void | add_group (CSeqGroup *sg)
void | take_group (bm::bvector<> &bv_members)
| memebers moved into their own group
void | merge_from (CSeqClusters &sc)
| Acquire all groups from another cluster collection.
void | clear_empty_groups ()
| Remove groups which turned empty after clusterization.
const bm::bvector & | union_all_groups ()
| Compute union of all cluster group members.
void | resolve_duplicates (const CSequenceColl &seq_coll)
| Resolve duplicate membership between groups.
void | elect_leaders (const CSequenceColl &seq_coll, unsigned concurrency)
| Find the best representatives in all cluster groups the criteria is maximum absolute similarity to all members.
bm::id64_t | compute_avg_count () const
| calculate avg cluster population count
size_t | groups_size () const
CSeqGroup * | get_group (size_t idx)
void | print_summary (const char *title) const
| print clusterization report

## Detailed Description

Examples
  xsample07a.cpp.

Definition at line 757 of file xsample07a.cpp.

## Member Typedef Documentation

## groups_vector_type

typedef std::vector<std::unique_ptr<CSeqGroup> > CSeqClusters::groups_vector_type

Examples
  xsample07a.cpp.

Definition at line 760 of file xsample07a.cpp.

## Constructor & Destructor Documentation

## CSeqClusters() [1/2]

CSeqClusters::CSeqClusters | ( |  | ) |

inline

Examples
  xsample07a.cpp.

Definition at line 762 of file xsample07a.cpp.

Referenced by CSeqClusters(), and merge_from().

## CSeqClusters() [2/2]

CSeqClusters::CSeqClusters | ( | const CSeqClusters & |  | ) |

delete

References CSeqClusters().

## Member Function Documentation

## add_group()

void CSeqClusters::add_group | ( | CSeqGroup * | sg | ) |

inline

Examples
  xsample07a.cpp.

Definition at line 766 of file xsample07a.cpp.

Referenced by compute_random_clusters(), and take_group().

## clear_empty_groups()

void CSeqClusters::clear_empty_groups | ( |  | ) |

Remove groups which turned empty after clusterization.

Examples
  xsample07a.cpp.

Definition at line 807 of file xsample07a.cpp.

References bm::bvector< Alloc >::count(), and CSeqGroup::get_members().

Referenced by compute_jaccard_clusters().

## compute_avg_count()

bm::id64_t CSeqClusters::compute_avg_count | ( |  | ) | const

calculate avg cluster population count

Examples
  xsample07a.cpp.

Definition at line 847 of file xsample07a.cpp.

References bm::bvector< Alloc >::count(), and CSeqGroup::get_members().

Referenced by compute_jaccard_clusters().

## elect_leaders()

void CSeqClusters::elect_leaders | ( | const CSequenceColl & | seq_coll,
|  | unsigned | concurrency )

Find the best representatives in all cluster groups the criteria is maximum absolute similarity to all members.

Examples
  xsample07a.cpp.

Definition at line 994 of file xsample07a.cpp.

References bm::bvector< Alloc >::clear(), compute_and_sim(), compute_seq_group_union(), bm::bvector< Alloc >::count(), bm::bvector< Alloc >::count_range(), bm::deserialize(), bm::bvector< Alloc >::first(), CSequenceColl::get_buf(), CSeqGroup::get_lead(), CSeqGroup::get_members(), CSeqGroup::get_rep(), bm::random_subset< BV >::sample(), bm::bvector< Alloc >::set(), CSeqGroup::set_lead(), bm::bvector< Alloc >::test(), and bm::bvector< Alloc >::iterator_base::valid().

Referenced by compute_jaccard_clusters().

## get_group()

CSeqGroup * CSeqClusters::get_group | ( | size_t | idx | ) |

inline

Examples
  xsample07a.cpp.

Definition at line 796 of file xsample07a.cpp.

Referenced by assign_to_best_cluster(), and assign_to_best_cluster_union().

## groups_size()

size_t CSeqClusters::groups_size | ( |  | ) | const

inline

Examples
  xsample07a.cpp.

Definition at line 795 of file xsample07a.cpp.

Referenced by assign_to_best_cluster(), and assign_to_best_cluster_union().

## merge_from()

void CSeqClusters::merge_from | ( | CSeqClusters & | sc | ) |

Acquire all groups from another cluster collection.

Examples
  xsample07a.cpp.

Definition at line 861 of file xsample07a.cpp.

References CSeqClusters().

Referenced by compute_jaccard_clusters().

## print_summary()

void CSeqClusters::print_summary | ( | const char * | title | ) | const

print clusterization report

Examples
  xsample07a.cpp.

Definition at line 1087 of file xsample07a.cpp.

References bm::bvector< Alloc >::count(), CSeqGroup::get_lead(), and CSeqGroup::get_members().

Referenced by compute_jaccard_clusters().

## resolve_duplicates()

void CSeqClusters::resolve_duplicates | ( | const CSequenceColl & | seq_coll | ) |

Resolve duplicate membership between groups.

Examples
  xsample07a.cpp.

Definition at line 873 of file xsample07a.cpp.

References resolve_duplicates().

Referenced by compute_jaccard_clusters(), and resolve_duplicates().

## take_group()

void CSeqClusters::take_group | ( | bm::bvector<> & | bv_members | ) |

memebers moved into their own group

Examples
  xsample07a.cpp.

Definition at line 822 of file xsample07a.cpp.

References add_group(), bm::bvector< Alloc >::get_first(), CSeqGroup::get_members(), and bm::bvector< Alloc >::swap().

Referenced by compute_jaccard_clusters().

## union_all_groups()

const bm::bvector & CSeqClusters::union_all_groups | ( |  | ) |

Compute union of all cluster group members.

Examples
  xsample07a.cpp.

Definition at line 830 of file xsample07a.cpp.

References bm::bvector< Alloc >::clear(), and CSeqGroup::get_members().

Referenced by compute_jaccard_clusters().

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

- xsample07a.cpp