Go to the SVN repository for this file.
1 #ifndef ALGO_COBALT___LINKS__HPP 2 #define ALGO_COBALT___LINKS__HPP 78: m_NumElements(num_elements),
95 voidAddLink(
int first,
intsecond,
double weight);
103 boolIsLink(
int first,
intsecond)
const;
114 boolIsLink(
constvector<int>&
first,
constvector<int>& second,
115 double& dist)
const;
159 voidx_InitLinkPtrs(
void);
166 boolx_IsLinkPtr(
int first,
intsecond)
const;
Exceptions for CLinks class.
@ eInvalidNode
Invalid node index.
NCBI_EXCEPTION_DEFAULT(CLinksException, CException)
Set of edges with weights between nodes represented by zero-based positive integers.
double m_MaxWeight
Maximym weight in the list.
CLinks & operator=(const CLinks &links)
Forbid assignment operator.
vector< SLink * > m_LinkPtrs
Pointers to links in m_Links sorted according to node indexes; used for checks whether a link exists.
list< SLink > m_Links
Links.
CLinks(Uint4 num_elements)
Constructor.
Uint4 GetNumElements(void) const
Get number of nodes.
Uint4 m_NumElements
Number of nodes.
bool m_IsSorted
Is list of links sorted.
list< SLink >::const_iterator SLink_CI
SLink_CI begin(void) const
Get iterator pointing to the first link.
SLink_CI end(void) const
Get iterator pointing behind the last link.
bool IsSorted(void) const
Check whether the links are sorted according to weights.
CLinks(const CLinks &links)
Forbid copy constructor.
Uint4 GetNumLinks(void) const
Get number of links.
Uint4 m_NumLinks
Number of links.
double GetMaxWeight(void) const
Get maximum weight over all links.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
uint32_t Uint4
4-byte (32-bit) unsigned integer
#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
Compressed bitset (entry point to bm.h)
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double weight
Edge weight.
SLink(int f, int s, double w)
Constructor.
bool operator<(const SLink &link) const
Less then operator for sorting links by weights.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4