Main Page   Class Hierarchy   Compound List   File List   Compound Members  

EdgeVector< EdgeType, blockSize, noOfPages, pageSize > Class Template Reference

Represents a weighted graph by a list of Edges. More...

#include <edgeVector.h>

Inheritance diagram for EdgeVector< EdgeType, blockSize, noOfPages, pageSize >:

List of all members.

Public Methods

 EdgeVector (NodeCount noOfNodes, EdgeCount noOfEdges)
 Constructs an EdgeVector.

EdgeCount noOfEdges () const
 Returns the number of edges of the graph.

NodeCount noOfNodes () const
 Returns the number of nodes of the graph.

bool empty () const
 Returns true iff this list is empty, i.e.

void sortByWeight ()
 Sorts the edges of the graph by weight.


Private Attributes

NodeCount _noOfNodes

Friends

std::ostream & operator<< (std::ostream &os, EdgeVector< EdgeType, blockSize, noOfPages, pageSize > &el)
 Writes a string representation of the edge list to an output stream.


Detailed Description

template<typename EdgeType = Edge, unsigned int blockSize = DS_DEFAULT_BLOCK_SIZE, unsigned int noOfPages = DS_DEFAULT_NO_OF_PAGES, unsigned int pageSize = DS_DEFAULT_PAGE_SIZE>
class EdgeVector< EdgeType, blockSize, noOfPages, pageSize >

Represents a weighted graph by a list of Edges.

Definition at line 32 of file edgeVector.h.


Constructor & Destructor Documentation

template<typename EdgeType = Edge, unsigned int blockSize = DS_DEFAULT_BLOCK_SIZE, unsigned int noOfPages = DS_DEFAULT_NO_OF_PAGES, unsigned int pageSize = DS_DEFAULT_PAGE_SIZE>
EdgeVector< EdgeType, blockSize, noOfPages, pageSize >::EdgeVector NodeCount    noOfNodes,
EdgeCount    noOfEdges
[inline]
 

Constructs an EdgeVector.

The number of nodes is stored and space for the edges is reserved, but the edges aren't created. In order to add the edges of the graph, use methods like "push_back".

Parameters:
noOfNodes  the number of nodes in the graph
noOfEdges  the number of edges which space is reserved for

Definition at line 53 of file edgeVector.h.


Member Function Documentation

template<typename EdgeType = Edge, unsigned int blockSize = DS_DEFAULT_BLOCK_SIZE, unsigned int noOfPages = DS_DEFAULT_NO_OF_PAGES, unsigned int pageSize = DS_DEFAULT_PAGE_SIZE>
bool EdgeVector< EdgeType, blockSize, noOfPages, pageSize >::empty   const [inline]
 

Returns true iff this list is empty, i.e.

it contains no edges.

Definition at line 64 of file edgeVector.h.


The documentation for this class was generated from the following files:
Generated on Thu Aug 14 15:13:28 2003 for External Memory Minimum Spanning Trees by doxygen1.2.17