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 Graph.h 00014 00015 \brief C header for buildGraph and loadGraph in buildmap.c and loadmap.c to 00016 create and load node and edge memory map files from DIMACS graph 00017 file. Defines struct Graph. 00018 00019 \author Vitus Leung (vjleung@sandia.gov) 00020 00021 \date 1/5/2007 00022 */ 00023 /****************************************************************************/ 00024 00025 #ifndef MTGL_GRAPH_H 00026 #define MTGL_GRAPH_H 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 struct Edge; 00033 00034 struct Node { 00035 int id; 00036 short type; 00037 int deg; 00038 int offset; 00039 }; 00040 00041 struct Edge { 00042 struct Node* vert1; 00043 struct Node* vert2; 00044 int id; 00045 short type1; 00046 short type2; 00047 }; 00048 00049 struct Graph { 00050 struct Node* vertices; 00051 struct Edge* edges; 00052 int order; 00053 int size; 00054 int* adjacencies; 00055 }; 00056 00057 #ifdef __cplusplus 00058 } 00059 #endif 00060 00061 #endif