/usr/include/gamera/graph/graph_common.hpp is in python-gamera-dev 3.3.3-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /*
*
* Copyright (C) 2011 Christian Brandt
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _GRAPH_COMMON_HPP_FCE9E0F296526B
#define _GRAPH_COMMON_HPP_FCE9E0F296526B
#include <map>
#include <list>
#include <iostream>
#include <queue>
#include <stack>
#include <set>
#include <queue>
#include <cassert>
#include <stdexcept>
#include <utility>
#include "graphdata.hpp"
namespace Gamera { namespace GraphApi {
struct Graph;
struct Edge;
struct Node;
// -----------------------------------------------------------------------------
//some data structures used in graph or multiple algorithms
typedef std::list<Node*> NodeVector;
typedef std::list<Edge*> EdgeVector;
typedef std::list<GraphData *> ValueVector;
typedef std::map<GraphData *,Node*, GraphDataPtrLessCompare> ValueNodeMap;
typedef NodeVector::iterator NodeIterator;
typedef ValueVector::iterator ValueIterator;
typedef EdgeVector::iterator EdgeIterator;
typedef std::queue<Node*> NodeQueue; //BFS
typedef std::stack<Node*> NodeStack; //DFS
typedef std::set<Node*> NodeSet;
typedef std::priority_queue<Node*> NodePriorityQueue;
//type representing edge's costs;
typedef double cost_t;
//structures used for return-values of shortest path algorithms
struct DijkstraPath {
cost_t cost;
std::vector<Node*> path;
};
typedef std::map<Node*, DijkstraPath> ShortestPathMap;
// -----------------------------------------------------------------------------
//Definition of different flags
typedef unsigned long flag_t;
#define FLAG_DIRECTED 1ul
#define FLAG_CYCLIC 2ul
#define FLAG_BLOB 4ul
#define FLAG_MULTI_CONNECTED 8ul
#define FLAG_SELF_CONNECTED 16ul
#define FLAG_CHECK_ON_INSERT 32ul
#define FLAG_DEFAULT (0xfffful & ~32ul)
#define FLAG_FREE 31ul
#define FLAG_TREE 0ul
#define FLAG_DAG 5ul
#define FLAG_UNDIRECTED 6ul
#define HAS_FLAG(a, b) (((a) & (b)) == (b))
#define SET_FLAG(a, b) ((a) |= (b))
#define UNSET_FLAG(a, b) ((a) &= ~(b))
#define GRAPH_HAS_FLAG(graph, f) HAS_FLAG((graph)->_flags, f)
#define GRAPH_SET_FLAG(graph, f) SET_FLAG((graph)->_flags, f)
#define GRAPH_UNSET_FLAG(graph, f) UNSET_FLAG((graph)->_flags, f)
}} // end Gamera::GraphApi
#endif /* _GRAPH_COMMON_HPP_FCE9E0F296526B */
|