Я хотел бы сделать структуру КОРЗИНА плоской, чтобы не было указателя на указатель и Самоссылочных структур , и я бы в итогес просто плоской структурой.
Спасибо за вашу помощь заранее.
С уважением
Hooman
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;
};