• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/genericProc/programs/MTGL/test/CPPGraph.h

Go to the documentation of this file.
00001 /*  _________________________________________________________________________
00002  *
00003  *  MTGL: The MultiThreaded Graph Library
00004  *  Copyright (c) 2008 Sandia Corporation.
00005  *  This software is distributed under the BSD License.
00006  *  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00007  *  the U.S. Government retains certain rights in this software.
00008  *  For more information, see the README file in the top MTGL directory.
00009  *  _________________________________________________________________________
00010  */
00011 
00012 /****************************************************************************/
00013 /*! \file CPPGraph.h
00014 
00015     \brief C++ header for using buildGraph and loadGraph in buildmap.c and
00016            loadmap.c to create and load node and edge memory map files from
00017            DIMACS graph file.  Defines class C_Graph.
00018 
00019     \author Vitus Leung (vjleung@sandia.gov)
00020 
00021     \date 1/5/2007
00022 */
00023 /****************************************************************************/
00024 
00025 #ifndef MTGL_CPPGRAPH_H
00026 #define MTGL_CPPGRAPH_H
00027 
00028 class C_Edge;
00029 
00030 class C_Node {
00031 public:
00032   static C_Edge* edges;
00033   static int* adjacencies;
00034   int id;
00035   short type;
00036   int deg;
00037   int offset;
00038 
00039   int degree() { return deg; }
00040 };
00041 
00042 class C_Edge {
00043 public:
00044   C_Node* vert1;
00045   C_Node* vert2;
00046   int id;
00047   short type1;
00048   short type2;
00049 };
00050 
00051 class C_Graph {
00052 public:
00053   C_Node* vertices;
00054   C_Edge* edges;
00055   int order;
00056   int size;
00057   int* adjacencies;
00058 };
00059 
00060 #endif

Generated on Fri Oct 22 2010 11:02:23 for SST by  doxygen 1.7.1