-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_gr_inc.h
More file actions
105 lines (86 loc) · 2.85 KB
/
Copy path_gr_inc.h
File metadata and controls
105 lines (86 loc) · 2.85 KB
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
100
101
102
103
104
105
#ifndef __GR_INC_H
#define __GR_INC_H
// Copyright David Lawrence Bien 1997 - 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt).
// _gr_inc.h
// Include file for directed graph implementation.
//#include <stddef.h>
//#include <Assert.h>
//#include <_alloc.h>
//#include <stdexcept>
#include <stdexcept>
#include "bienutil.h"
#include "_namdexc.h"
#include "_debug.h"
#include "_util.h"
#include "_dbgthrw.h"
#include "_assert.h"
#include "_trace.h"
#ifndef __DGRAPH_DEFAULT_ALLOCATOR
#define __DGRAPH_DEFAULT_ALLOCATOR __STD::allocator< char >
#define __DGRAPH_GET_ALLOCATOR(t) __STD::allocator< t >
#endif //__DGRAPH_DEFAULT_ALLOCATOR
#ifndef __DBGTHROW_DEFAULT_ALLOCATOR
#define __DBGTHROW_DEFAULT_ALLOCATOR __STD::allocator< char >
#define __DBGTHROW_GET_ALLOCATOR(t) __STD::allocator< t >
#endif //!__DBGTHROW_DEFAULT_ALLOCATOR
// Choose namespace:
#define __DGRAPH_USE_NAMESPACE ns_dgraph // always use namespaces.
#if !defined( __DGRAPH_USE_NAMESPACE )
#define __DGRAPH_GLOBALNAMESPACE
#endif
#ifdef __DGRAPH_GLOBALNAMESPACE
#define __DGRAPH_BEGIN_NAMESPACE
#define __DGRAPH_END_NAMESPACE
#define __DGRAPH_USING_NAMESPACE
#define __DGRAPH_NAMESPACE
#else //__DGRAPH_GLOBALNAMESPACE
#ifndef __DGRAPH_USE_NAMESPACE
#define __DGRAPH_USE_NAMESPACE ns_dgraph
#endif //__DGRAPH_USE_NAMESPACE
#define __DGRAPH_BEGIN_NAMESPACE namespace __DGRAPH_USE_NAMESPACE { __BIENUTIL_USING_NAMESPACE using namespace std;
#define __DGRAPH_END_NAMESPACE }
#define __DGRAPH_USING_NAMESPACE using namespace __DGRAPH_USE_NAMESPACE;
#define __DGRAPH_NAMESPACE __DGRAPH_USE_NAMESPACE::
#endif //__DGRAPH_GLOBALNAMESPACE
__DGRAPH_BEGIN_NAMESPACE
typedef unsigned _TyGNIndex;
// tag allowing construction of CQ iterators without check the CQ of the passed.
// This allows the graph to transform iterators from const->non-const.
struct __gr_const_cast_iter
{
};
template < class t_TyP >
struct _gr_hash_ptr
{
size_t operator()( const t_TyP & __s ) const _BIEN_NOTHROW
{
return reinterpret_cast< size_t >( __s );
}
};
#ifdef __DGRAPH_COUNT_EL_ALLOC_LIFETIME
extern int gs_iNodesAllocated;
extern int gs_iLinksAllocated;
extern int gs_iNodesConstructed;
extern int gs_iLinksConstructed;
#endif //__DGRAPH_COUNT_EL_ALLOC_LIFETIME
__DGRAPH_END_NAMESPACE
// The size for hash tables in various data structures - increase if using larger graphs -
// decrease if using smaller graphs - if not already then should allow passing to
// routines that use hashes:
#define _GR_HASH_INITSIZENODES 1000
#define _GR_HASH_INITSIZELINKS 1000
#include "_allbase.h"
#include "_sdp.h"
#include "_sdpn.h"
#include "_fcdtor.h"
#include "_gr_def.h"
#include "_gr_trt.h"
#include "_gr_titr.h"
#include "_gr_copy.h"
#include "_gr_dtor.h"
#include "_gr_rndm.h"
#include "_graph.h"
#endif //__GR_INC_H