#include "eg_kppairs.h"
Include dependency graph for eg_kppairs.c:
Go to the source code of this file.
Defines | |
#define | GETOTHEREND(_cedge) (G->G[gp_GetTwinArc(G,_cedge - G->G)].v) |
#define | GETROOTEDGE(curroot) (G->G + G->G[curroot].link[1]) |
#define | GETNEXTEDGE(curedge, curroot) ((curedge->link[1] < G->N) ? GETROOTEDGE(curroot) : (G->G + curedge->link[1])) |
#define | EG_KPPAIRS_VERBOSE 100 |
#define | EG_KPPAIRS_DEBUG 0 |
#define | KP_CHECK_SUM_IS_LESS(a, b, c) WARNINGL(EG_KPPAIRS_DEBUG, EGdijkstraCostIsLess( EGdijkstraCostAdd((a),(b)), EGdijkstraToCost(c)), "Inequality not satisfied %lf < %lf", EGdijkstraCostToLf(EGdijkstraCostAdd((a), (b))), c) |
Functions | |
static int | EGdoPrimalDfs (const unsigned n_marks, size_t *const set_sz, EGlist_t **CUT, unsigned char *const node_mark, unsigned char *const edge_mark, EGgreedyData_t *const data) |
, given a set of marked edges, do DFS, we need as many lists as posible marks, the marks are bynary bits... needs an array of node marks and edge marks (of unsigned chars), previous information will be lost. Node 0 is always in the set 0. nodemarks will be marked as the according set where they bellong. | |
int | EGgenerateInternalPairs (EGgreedyData_t *const data, EGdkdomino_t *const zerodom, const unsigned int orientation, EGlist_t *const pairs, const unsigned max_pairs, double const percentage, unsigned char *const node_mark, unsigned char *const edge_mark, EGdGraphNode_t **const dc_nodes) |
return in a heap, all pairs in the boundary of the zero domino, whose total value (i.e. even path + internal path) is less than two. | |
void | EGinternalPairsClear (void *pair, EGmemPool_t *mem) |
destructor for greedytypes | |
void | EGfreeInternalPairs (void *pair, EGmemPool_t *mem) |
destructor for greedytypes | |
int | EGgetCutNodes (EGgreedyData_t *const data, EGdualCut_t *const dualcut, const unsigned int orientation, int *const cutsz, int **const cutnodes, unsigned char *const node_mark, unsigned char *const edge_mark) |
given a cut and an orientation, return the primal nodes in the cut with that orientation. | |
int | EGgetANodes (EGgreedyData_t *const data, EGdkdomino_t *const kdom, int unsigned const k, int *const cutsz, int **const cutnodes, unsigned char *const node_mark, unsigned char *const edge_mark, EGdGraphEdge_t **const dc_nodes) |
given a k-dom and a path, return the primal nodes in the A halve, the orientation is taken from the k-dom structure. | |
int | EGgetOrientation (EGgreedyData_t *const data, EGdualCut_t *const dualcut, int unsigned const pathsz, EGdGraphEdge_t **const path, unsigned int *const orientation, unsigned char *const node_mark, unsigned char *const edge_mark) |
given a dual cut and an internal path, return the orientation of the path. | |
int | EGgetDualCut (EGgreedyData_t *const data, EGdualCut_t **const dualcut, const int pset_sz, const int *const pset, unsigned char *const node_mark, unsigned char *const edge_mark, EGdGraphEdge_t **const dc_nodes) |
Given a primal cut, return a dual cut. | |
Variables | |
static size_t | os [EG_MENGER_NUMOS] |
static size_t | dij_os [6] |
|
Definition at line 9 of file eg_kppairs.c. |
|
Definition at line 8 of file eg_kppairs.c. |
|
Definition at line 5 of file eg_kppairs.c. |
|
Definition at line 3 of file eg_kppairs.c. |
|
Definition at line 4 of file eg_kppairs.c. |
|
Definition at line 36 of file eg_kppairs.c. |
|
, given a set of marked edges, do DFS, we need as many lists as posible marks, the marks are bynary bits... needs an array of node marks and edge marks (of unsigned chars), previous information will be lost. Node 0 is always in the set 0. nodemarks will be marked as the according set where they bellong.
Definition at line 58 of file eg_kppairs.c. |
|
destructor for greedytypes
Definition at line 336 of file eg_kppairs.c. |
|
return in a heap, all pairs in the boundary of the zero domino, whose total value (i.e. even path + internal path) is less than two.
Definition at line 125 of file eg_kppairs.c. |
|
given a k-dom and a path, return the primal nodes in the A halve, the orientation is taken from the k-dom structure.
Definition at line 395 of file eg_kppairs.c. |
|
given a cut and an orientation, return the primal nodes in the cut with that orientation.
Definition at line 344 of file eg_kppairs.c. |
|
Given a primal cut, return a dual cut.
Definition at line 548 of file eg_kppairs.c. |
|
given a dual cut and an internal path, return the orientation of the path.
Definition at line 496 of file eg_kppairs.c. |
|
destructor for greedytypes
Definition at line 319 of file eg_kppairs.c. |
|
Initial value: { [EG_DIJ_DIST] = offsetof (EGmengerNodeData_t, orig_dist), [EG_DIJ_NDIST] = offsetof (EGmengerNodeData_t, orig_ndist), [EG_DIJ_FATHER] = offsetof (EGmengerNodeData_t, orig_father), [EG_DIJ_MARKER] = offsetof (EGmengerNodeData_t, orig_marker), [EG_DIJ_HCONNECTOR] = offsetof (EGmengerNodeData_t, hc), [EG_DIJ_ELENGTH] = offsetof (EGmengerEdgeData_t, cost) } Definition at line 27 of file eg_kppairs.c. |
|
Initial value: { [EG_MENGER_PI] = offsetof (EGmengerNodeData_t, pi), [EG_MENGER_DIST] = offsetof (EGmengerNodeData_t, dist), [EG_MENGER_ORIG_DIST] = offsetof (EGmengerNodeData_t, orig_dist), [EG_MENGER_NDIST] = offsetof (EGmengerNodeData_t, ndist), [EG_MENGER_ORIG_NDIST] = offsetof (EGmengerNodeData_t, orig_ndist), [EG_MENGER_MARK] = offsetof (EGmengerNodeData_t, marker), [EG_MENGER_ORIG_MARK] = offsetof (EGmengerNodeData_t, orig_marker), [EG_MENGER_FATHER] = offsetof (EGmengerNodeData_t, father), [EG_MENGER_ORIG_FATHER] = offsetof (EGmengerNodeData_t, orig_father), [EG_MENGER_HEAP_CONNECTOR] = offsetof (EGmengerNodeData_t, hc), [EG_MENGER_ECOST] = offsetof (EGmengerEdgeData_t, cost), [EG_MENGER_REDUCED_ECOST] = offsetof (EGmengerEdgeData_t, reduced_cost), [EG_MENGER_IS_IN_SOL] = offsetof (EGmengerEdgeData_t, is_in_solution), [EG_MENGER_EDATA] = offsetof (EGmengerEdgeData_t, data) } Definition at line 11 of file eg_kppairs.c. |