1 #ifndef ALGO_COBALT___HITLIST__HPP
2 #define ALGO_COBALT___HITLIST__HPP
57 typedef vector<TListEntry>
TList;
75 int Size()
const {
return m_List.size(); }
79 bool Empty() {
return m_List.empty(); }
96 return m_List[index].second;
106 return m_List[index].second;
118 return m_List[index].first;
129 m_List[index].first = keep;
137 for (
i = j = 0;
i < Size();
i++) {
138 if (m_List[
i].
first ==
false)
139 delete m_List[
i].second;
141 m_List[j++] = m_List[
i];
150 for (
int i = 0;
i < Size();
i++)
151 delete m_List[
i].second;
171 void SortByStartOffset();
181 void MakeCanonical();
190 void MatchOverlappingSubHits(
CHitList& matched_list);
Interface for CHit class, used to encapsulate operations involving pairwise alignments.
Definitions used by all COBALT aligner components.
An ordered collection of CHit objects.
int Size() const
Retrieve number of hits in list.
void SetKeepHit(int index, bool keep)
Set whether a hit in the hitlist will be scheduled for deletion.
~CHitList()
destructor (deletes all hits stored)
void PurgeAllHits()
Delete all hits unconditionally.
bool Empty()
Determine whether a list contains no hits.
pair< bool, CHit * > TListEntry
add a reminder of whether a hit should be kept
CHit * GetHit(int index)
Retrieve a hit from the hitlist.
const CHit * GetHit(int index) const
Retrieve a hit from the hitlist.
void ResetList()
Empty out the list without deleting the hits in it.
void PurgeUnwantedHits()
Delete all hits scheduled to be deleted.
bool GetKeepHit(int index)
Determine whether a hit in the hitlist has been scheduled for deletion.
vector< TListEntry > TList
base type of hitlist
TList m_List
current list of hits
void AddToHitList(CHit *hit)
Append a hit to the hitlist.
A generalized representation of a pairwise alignment.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_COBALT_EXPORT