Graph.h File Reference

Basic graphs -*- C++ -*-. More...

#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/filter_iterator.hpp>
#include <boost/functional.hpp>
#include "Galois/ConflictFlags.h"
#include "Galois/Runtime/Support.h"
#include "Galois/Runtime/Context.h"
#include "Galois/Runtime/InsBag.h"
#include "LLVM/SmallVector.h"

Go to the source code of this file.

Classes

struct  Galois::Graph::VoidWrapper< T >
 Wrapper class to have a valid type on void. More...
struct  Galois::Graph::VoidWrapper< void >
struct  Galois::Graph::VoidWrapper< void >::unit
struct  Galois::Graph::NodeItem< NTy >
 Wrapper class to have a valid type on void nodes. More...
struct  Galois::Graph::NodeItem< void >
struct  Galois::Graph::EdgeItem< NTy, ETy >
 Wrapper class to have a valid type on void edges. More...
struct  Galois::Graph::EdgeItem< NTy, void >
class  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >
 A Graph. More...
struct  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >::gNode
struct  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >::gNode::getNeigh
class  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >::GraphNode
 An opaque handle to a graph node. More...
class  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >::makeGraphNode
class  Galois::Graph::FirstGraph< NodeTy, EdgeTy, Directional >::makeGraphNodePtr

Namespaces

namespace  Galois
namespace  Galois::Graph

Typedefs

typedef VoidWrapper< void >::unit Galois::Graph::GraphUnit
 Short name for unit for use with FirstGraph::createNode for unit node data.

Detailed Description

Basic graphs -*- C++ -*-.

License

Galois, a framework to exploit amorphous data-parallelism in irregular programs.

Copyright (C) 2011, The University of Texas at Austin. All rights reserved. UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, NON-INFRINGEMENT AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall University be liable for incidental, special, indirect, direct or consequential damages or loss of profits, interruption of business, or related expenses which may arise from use of Software or Documentation, including but not limited to those resulting from defects in Software and/or Documentation, or loss or inaccuracy of data of any kind.

Description

An example of use:

 struct Node {
   ... // Definition of node data
 };

 typedef Galois::Graph::FirstGraph<Node,int,true> Graph;
 
 // Create graph
 Graph g;
 Node n1, n2;
 Graph::GraphNode a, b;
 a = g.createNode(n1);
 g.addNode(a);
 b = g.createNode(n2);
 g.addNode(b);
 g.addEdge(a, b, 5);

 // Traverse graph
 for (Graph::active_iterator i = g.active_begin(), iend = g.active_end();
      i != iend;
      ++i) {
   Graph::GraphNode src = *i;
   for (Graph::neighbor_iterator j = g.neighbor_begin(src),
                                 jend = g.neighbor_end(src);
        j != jend;
        ++j) {
     Graph::GraphNode dst = *j;
     int edgeData = g.getEdgeData(src, dst);
     assert(edgeData == 5);
   }
 }
Author:
Andrew Lenharth <andrewl@lenharth.org>
Generated on Tue Aug 2 11:51:26 2011 for Galois by  doxygen 1.6.3