/usr/include/gamera/graph/edge.hpp is in python-gamera-dev 1:3.4.2+git20160808.1725654-2.
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 | /*
*
* 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 _EDGE_HPP_A95093D2DFCAB7
#define _EDGE_HPP_A95093D2DFCAB7
#include "graph_common.hpp"
namespace Gamera { namespace GraphApi {
// -----------------------------------------------------------------------------
/** The graph containing edge can only be reached by from_node->_graph or
* to_node->_graph because every edge has at least two nodes in same graph.
* So an additional pointer in Edge is waste of memory
* */
struct Edge {
Node* from_node;
Node* to_node;
bool is_directed; ///< should be same as graph's directed
cost_t weight;
void* label;
/** creates a new edge. directed must be the same as the Graph's flag
* @param from_node Node this edge is pointing from
* @param to_node Node this edge is pointing to
* @param weight positive edge-weight used in some algorithms
* @param directed if true, this edge points in both directions
* this should be same as graph's flag DIRECTED
* @param label label
**/
Edge(Node* from_node, Node* to_node, cost_t weight = 1.0,
bool directed = false, void* label = NULL);
/** removes this from nodes this edge is pointing from/to
**/
void remove_self();
/** returns other end of edge if it is reachable from the
* given node or NULL if not reachable
**/
Node* traverse(Node* node);
Node* traverse(GraphData * value);
};
}} // end Gamera::GraphApi
#endif /* _EDGE_HPP_A95093D2DFCAB7 */
|