我想使结构篮子平坦,因此在其中没有 pointer 指针和 Self引用结构,并且我最终只是一个扁平的结构。
谢谢您的帮助。
致谢
人类
typedef struct basket
{
arc_t *a;
cost_t cost;
cost_t abs_cost;
LONG number;
} BASKET;
其中
typedef LONG flow_t;
typedef LONG cost_t;
typedef struct node node_t;
typedef struct node *node_p;
typedef struct arc arc_t;
typedef struct arc *arc_p;
struct node
{
cost_t potential;
int orientation;
node_p child;
node_p pred;
node_p sibling;
node_p sibling_prev;
arc_p basic_arc;
arc_p firstout, firstin;
arc_p arc_tmp;
flow_t flow;
LONG depth;
int number;
int time;
};
和
struct arc
{
int id;
cost_t cost;
node_p tail, head;
short ident;
arc_p nextout, nextin;
flow_t flow;
cost_t org_cost;
};