Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::graphs::OfflineGraph Class Reference

#include <OfflineGraph.h>

Public Types

typedef
boost::counting_iterator
< uint64_t > 
iterator
 
typedef
boost::counting_iterator
< uint64_t > 
edge_iterator
 
typedef uint64_t GraphNode
 
typedef std::pair< iterator,
iterator
NodeRange
 
typedef std::pair
< edge_iterator, edge_iterator
EdgeRange
 
typedef std::pair< NodeRange,
EdgeRange
GraphRange
 

Public Member Functions

 OfflineGraph (const std::string &name)
 
uint64_t num_seeks ()
 
uint64_t num_bytes_read ()
 
void reset_seek_counters ()
 
 OfflineGraph (OfflineGraph &&)=default
 
size_t size () const
 
size_t sizeEdges () const
 
size_t edgeSize () const
 
iterator begin ()
 
iterator end ()
 
edge_iterator edge_begin (GraphNode N)
 
edge_iterator edge_end (GraphNode N)
 
GraphNode getEdgeDst (edge_iterator ni)
 
runtime::iterable
< NoDerefIterator
< edge_iterator > > 
edges (GraphNode N)
 
template<typename T >
getEdgeData (edge_iterator ni)
 
uint64_t operator[] (uint64_t n)
 Accesses the prefix sum on disk. More...
 
auto divideByNode (size_t nodeWeight, size_t edgeWeight, size_t id, size_t total, std::vector< unsigned > scaleFactor=std::vector< unsigned >()) -> GraphRange
 Returns 2 ranges (one for nodes, one for edges) for a particular division. More...
 

Member Typedef Documentation

typedef boost::counting_iterator<uint64_t> galois::graphs::OfflineGraph::edge_iterator
typedef boost::counting_iterator<uint64_t> galois::graphs::OfflineGraph::iterator

Constructor & Destructor Documentation

galois::graphs::OfflineGraph::OfflineGraph ( const std::string &  name)
inline
galois::graphs::OfflineGraph::OfflineGraph ( OfflineGraph &&  )
default

Member Function Documentation

iterator galois::graphs::OfflineGraph::begin ( )
inline
auto galois::graphs::OfflineGraph::divideByNode ( size_t  nodeWeight,
size_t  edgeWeight,
size_t  id,
size_t  total,
std::vector< unsigned >  scaleFactor = std::vector<unsigned>() 
) -> GraphRange
inline

Returns 2 ranges (one for nodes, one for edges) for a particular division.

The ranges specify the nodes/edges that a division is responsible for. The function attempts to split them evenly among threads given some kind of weighting

Parameters
nodeWeightweight to give to a node in division
edgeWeightweight to give to an edge in division
idDivision number you want the ranges for
totalTotal number of divisions
scaleFactorVector specifying if certain divisions should get more than other divisions
edge_iterator galois::graphs::OfflineGraph::edge_begin ( GraphNode  N)
inline
edge_iterator galois::graphs::OfflineGraph::edge_end ( GraphNode  N)
inline
runtime::iterable<NoDerefIterator<edge_iterator> > galois::graphs::OfflineGraph::edges ( GraphNode  N)
inline
size_t galois::graphs::OfflineGraph::edgeSize ( ) const
inline
iterator galois::graphs::OfflineGraph::end ( )
inline
template<typename T >
T galois::graphs::OfflineGraph::getEdgeData ( edge_iterator  ni)
inline
GraphNode galois::graphs::OfflineGraph::getEdgeDst ( edge_iterator  ni)
inline
uint64_t galois::graphs::OfflineGraph::num_bytes_read ( )
inline
uint64_t galois::graphs::OfflineGraph::num_seeks ( )
inline
uint64_t galois::graphs::OfflineGraph::operator[] ( uint64_t  n)
inline

Accesses the prefix sum on disk.

Parameters
nIndex into edge prefix sum
Returns
The value located at index n in the edge prefix sum array
void galois::graphs::OfflineGraph::reset_seek_counters ( )
inline
size_t galois::graphs::OfflineGraph::size ( ) const
inline
size_t galois::graphs::OfflineGraph::sizeEdges ( ) const
inline

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