COPASI API  4.16.103
Public Member Functions | Private Attributes | Friends | List of all members
PQNode Class Reference

#include <CIndexedPriorityQueue.h>

Public Member Functions

 PQNode (size_t idx, C_FLOAT64 key)
 

Private Attributes

size_t mIndex
 
C_FLOAT64 mKey
 

Friends

class CIndexedPriorityQueue
 
std::ostream & operator<< (std::ostream &os, const PQNode &d)
 

Detailed Description

The PQNode class contains two members, an integer to represent the index, and a double to represent the key. The heap structure of the indexed priority queue class is implemented as a vector of PQNode.

Definition at line 33 of file CIndexedPriorityQueue.h.

Constructor & Destructor Documentation

PQNode::PQNode ( size_t  idx,
C_FLOAT64  key 
)
inline

Construct a PQNode with the given index and key

Parameters
idxThe index
keyThe key

Definition at line 43 of file CIndexedPriorityQueue.h.

43 : mIndex(idx), mKey(key) {}
C_FLOAT64 mKey

Friends And Related Function Documentation

friend class CIndexedPriorityQueue
friend

Definition at line 35 of file CIndexedPriorityQueue.h.

std::ostream& operator<< ( std::ostream &  os,
const PQNode d 
)
friend

insert operator

Definition at line 280 of file CIndexedPriorityQueue.cpp.

281 {
282  os << "(" << d.mIndex << ", " << d.mKey << ")";
283  return os;
284 }
C_FLOAT64 mKey

Member Data Documentation

size_t PQNode::mIndex
private

The index value

Definition at line 54 of file CIndexedPriorityQueue.h.

Referenced by operator<<().

C_FLOAT64 PQNode::mKey
private

The key value

Definition at line 58 of file CIndexedPriorityQueue.h.

Referenced by operator<<().


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