Galois::Graph::FileGraph Class Reference

Graph serialized to a file. More...

#include <FileGraph.h>

Inheritance diagram for Galois::Graph::FileGraph:
Galois::Graph::FileGraphParser Galois::Graph::LC_FileGraph< NodeTy, EdgeTy > Galois::Graph::LC_FileGraph< NodeTy, void > Galois::Graph::LC_FileGraph< void, EdgeTy > Galois::Graph::LC_FileGraph< void, void >

List of all members.

Classes

struct  Convert32
struct  Convert64

Public Types

typedef uint32_t GraphNode
typedef
boost::counting_iterator
< uint64_t > 
edge_iterator
typedef
boost::transform_iterator
< Convert32, uint32_t * > 
neighbor_iterator
typedef
boost::transform_iterator
< Convert32, uint32_t * > 
node_id_iterator
typedef
boost::transform_iterator
< Convert64, uint64_t * > 
edge_id_iterator
typedef
boost::counting_iterator
< uint64_t > 
iterator

Public Member Functions

bool containsNode (const GraphNode n) const
 Check if a node is in the graph (already added).
template<typename EdgeTy >
EdgeTy & getEdgeData (GraphNode src, GraphNode dst)
edge_iterator edge_begin (GraphNode N) const
edge_iterator edge_end (GraphNode N) const
template<typename EdgeTy >
EdgeTy & getEdgeData (edge_iterator it) const
GraphNode getEdgeDst (edge_iterator it) const
neighbor_iterator neighbor_begin (GraphNode N) const
neighbor_iterator neighbor_end (GraphNode N) const
node_id_iterator node_id_begin () const
node_id_iterator node_id_end () const
edge_id_iterator edge_id_begin () const
edge_id_iterator edge_id_end () const
template<typename EdgeTy >
EdgeTy & getEdgeData (neighbor_iterator it)
template<typename EdgeTy >
EdgeTy * edge_data_begin () const
template<typename EdgeTy >
EdgeTy * edge_data_end () const
bool hasNeighbor (GraphNode N1, GraphNode N2) const
iterator begin () const
 Iterate over nodes in graph (not thread safe).
iterator end () const
unsigned int size () const
 The number of nodes in the graph.
unsigned int sizeEdges () const
 The number of edges in the graph.
 FileGraph ()
 ~FileGraph ()
void structureFromFile (const std::string &filename)
 Read graph connectivity information from file.
void structureFromMem (void *mem, size_t len, bool clone)
 Read graph connectivity information from memory.
char * structureFromArrays (uint64_t *outIdxs, uint64_t numNodes, uint32_t *outs, uint64_t numEdges, size_t sizeofEdgeData)
 Read graph connectivity information from arrays.
void structureToFile (const char *file)
 Write graph connectivity information to file.
void swap (FileGraph &other)
void clone (FileGraph &other)

Protected Member Functions

uint64_t getEdgeIdx (GraphNode src, GraphNode dst) const
uint32_t * raw_neighbor_begin (GraphNode N) const
uint32_t * raw_neighbor_end (GraphNode N) const
void parse (void *m)
 Initialize graph from block of memory.

Protected Attributes

void *volatile masterMapping
size_t masterLength
uint64_t sizeEdgeTy
int masterFD
uint64_t * outIdx
uint32_t * outs
char * edgeData
uint64_t numEdges
uint64_t numNodes

Detailed Description

Graph serialized to a file.


Member Typedef Documentation

typedef boost::transform_iterator<Convert64, uint64_t*> Galois::Graph::FileGraph::edge_id_iterator
typedef boost::counting_iterator<uint64_t> Galois::Graph::FileGraph::edge_iterator
typedef boost::counting_iterator<uint64_t> Galois::Graph::FileGraph::iterator
typedef boost::transform_iterator<Convert32, uint32_t*> Galois::Graph::FileGraph::neighbor_iterator
typedef boost::transform_iterator<Convert32, uint32_t*> Galois::Graph::FileGraph::node_id_iterator

Constructor & Destructor Documentation

FileGraph::FileGraph (  ) 
FileGraph::~FileGraph (  ) 

Member Function Documentation

FileGraph::iterator FileGraph::begin (  )  const

Iterate over nodes in graph (not thread safe).

void FileGraph::clone ( FileGraph other  ) 
bool FileGraph::containsNode ( const GraphNode  n  )  const

Check if a node is in the graph (already added).

FileGraph::edge_iterator FileGraph::edge_begin ( GraphNode  N  )  const
template<typename EdgeTy >
EdgeTy* Galois::Graph::FileGraph::edge_data_begin (  )  const [inline]
template<typename EdgeTy >
EdgeTy* Galois::Graph::FileGraph::edge_data_end (  )  const [inline]
FileGraph::edge_iterator FileGraph::edge_end ( GraphNode  N  )  const
FileGraph::edge_id_iterator FileGraph::edge_id_begin (  )  const
FileGraph::edge_id_iterator FileGraph::edge_id_end (  )  const
FileGraph::iterator FileGraph::end (  )  const
template<typename EdgeTy >
EdgeTy& Galois::Graph::FileGraph::getEdgeData ( neighbor_iterator  it  )  [inline]
template<typename EdgeTy >
EdgeTy& Galois::Graph::FileGraph::getEdgeData ( edge_iterator  it  )  const [inline]
template<typename EdgeTy >
EdgeTy& Galois::Graph::FileGraph::getEdgeData ( GraphNode  src,
GraphNode  dst 
) [inline]
FileGraph::GraphNode FileGraph::getEdgeDst ( edge_iterator  it  )  const
uint64_t FileGraph::getEdgeIdx ( GraphNode  src,
GraphNode  dst 
) const [protected]
bool FileGraph::hasNeighbor ( GraphNode  N1,
GraphNode  N2 
) const
neighbor_iterator Galois::Graph::FileGraph::neighbor_begin ( GraphNode  N  )  const [inline]
neighbor_iterator Galois::Graph::FileGraph::neighbor_end ( GraphNode  N  )  const [inline]
FileGraph::node_id_iterator FileGraph::node_id_begin (  )  const
FileGraph::node_id_iterator FileGraph::node_id_end (  )  const
void FileGraph::parse ( void *  m  )  [protected]

Initialize graph from block of memory.

uint32_t * FileGraph::raw_neighbor_begin ( GraphNode  N  )  const [protected]
uint32_t * FileGraph::raw_neighbor_end ( GraphNode  N  )  const [protected]
unsigned int FileGraph::size (  )  const

The number of nodes in the graph.

unsigned int FileGraph::sizeEdges (  )  const

The number of edges in the graph.

char * FileGraph::structureFromArrays ( uint64_t *  outIdxs,
uint64_t  numNodes,
uint32_t *  outs,
uint64_t  numEdges,
size_t  sizeofEdgeData 
)

Read graph connectivity information from arrays.

If sizeof_edge_data != 0, return a pointer to array to populate with edge data.

void FileGraph::structureFromFile ( const std::string &  filename  ) 

Read graph connectivity information from file.

void FileGraph::structureFromMem ( void *  mem,
size_t  len,
bool  clone 
)

Read graph connectivity information from memory.

void FileGraph::structureToFile ( const char *  file  ) 

Write graph connectivity information to file.

void FileGraph::swap ( FileGraph other  ) 

Member Data Documentation

void* volatile Galois::Graph::FileGraph::masterMapping [protected]
uint64_t Galois::Graph::FileGraph::numEdges [protected]
uint64_t Galois::Graph::FileGraph::numNodes [protected]
uint64_t* Galois::Graph::FileGraph::outIdx [protected]

Reimplemented in Galois::Graph::FileGraphParser.

uint32_t* Galois::Graph::FileGraph::outs [protected]

Reimplemented in Galois::Graph::FileGraphParser.


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

Generated on 12 Apr 2013 for Galois by  doxygen 1.6.1