forked from sassoftware/cvrpsep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basegrph.h
59 lines (49 loc) · 1.6 KB
/
basegrph.h
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
/* SAS modified this file. */
/* (C) Copyright 2003 Jens Lysgaard. All rights reserved. */
/* OSI Certified Open Source Software */
/* This software is licensed under the Common Public License Version 1.0 */
#ifndef _H_BASEGRPH
#define _H_BASEGRPH
typedef struct
{
int CFN; /* Cardinality (number) of Forward Nodes */
int CBN; /* Cardinality (number) of Backward Nodes */
int FLD; /* Forward List Dimension (memory is allocated for <FLD> records */
int BLD; /* Backward List Dimension (memory is allocated for <BLD> records */
int *FAL; /* Forward Arc List */
int *BAL; /* Backward Arc List */
} ReachNodeRec;
typedef struct
{
int n;
ReachNodeRec *LP; /* List Pointer */
} ReachTopRec;
typedef ReachTopRec *ReachPtr;
typedef struct
{
int Row;
int CFN;
int *FAL;
} CompFReachNodeRec;
typedef struct
{
int NoOfRows;
CompFReachNodeRec *FLP;
} CompFReachRec;
typedef CompFReachRec *CompFReachPtr;
void WriteReachPtr(ReachPtr P);
void ReachInitMem(ReachPtr *P, int n);
void ReachPtrExpandDim(ReachPtr P, int NewN);
void ReachClearLists(ReachPtr P);
void ReachClearForwLists(ReachPtr P);
void ReachSetForwList(ReachPtr P, int *ArcList, int Row, int Arcs);
void ReachSetBackwList(ReachPtr P, int *ArcList, int Col, int Arcs);
void ReachCreateInLists(ReachPtr P);
void ReachAddArc(ReachPtr P, int Row, int Col);
void ReachAddForwArc(ReachPtr P, int Row, int Col);
void CopyReachPtr(ReachPtr SourcePtr, ReachPtr *SinkPtr);
void ReachFreeMem(ReachPtr *P);
void WriteCompPtr(CompFReachPtr P);
void CopyReachPtrToCompPtr(ReachPtr SourcePtr, CompFReachPtr *SinkPtr);
void CompFPtrFreeMem(CompFReachPtr *P);
#endif