eg_kppairs.h File Reference

#include "eg_dijkstra.h"
#include "eg_dijkstra_app.h"
#include "eg_dgraph.h"
#include "eg_greedytypes.h"
#include "eg_greedykp.h"

Include dependency graph for eg_kppairs.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define KPPAIRS_VERBOSE   100

Functions

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_edges)
 Given a primal cut, return a dual cut.


Define Documentation

#define KPPAIRS_VERBOSE   100
 

verbose level

Definition at line 136 of file eg_kppairs.h.


Function Documentation

void EGfreeInternalPairs void *  pair,
EGmemPool_t mem
 

destructor for greedytypes

Definition at line 336 of file eg_kppairs.c.

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.

Parameters:
data information related to the problem.
zerodom zero domino in wich we will look for pairs.
orientation if zero, then compute internal paairs, else, compute external pairs.
pairs sorted list (up to size max_pairs) storing the best pairs. we assume that the best pair is at the beginning of the list, and the worst pair is at the end of the list.
max_pairs maximum elements to be stored in the list.
percentage percentage of the bound of two to use while generating all internal pairs.
node_mark array of length N_PRIMAL_NODES to be used internally.
edge_mark array of length N_PRIMAL_EDGES to be used internally.
dc_nodes array of length N_DUAL_NODES to be used internally.
Returns:
zero on success, non-zero otherwise.

Definition at line 125 of file eg_kppairs.c.

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.

Parameters:
data structure containing all pertinent data to the problem.
kdom k-dom for wich we want the primal A-nodes.
k for wich path we want the A-nodes.
cutsz pointer to an integer where we will return the number of nodes in the cut.
cutnodes pointer to an array, the function will allocate the array if it is NULL, otherwise will use the given array and assume that is large enough.
node_mark array of length N_PRIMAL_NODES to be used internally.
edge_mark array of length N_PRIMAL_EDGES to be used internally.
dc_nodes array of length N_DUAL_NODES to be used internally.
Returns:
zero on success, non-zero otherwise.

Definition at line 395 of file eg_kppairs.c.

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.

Parameters:
data structure containing all pertinent data to the problem.
dualcut cut for wich we want the primal nodes.
orientation wich side of the cut we want.
cutsz pointer to an integer where we will return the number of nodes in the cut.
cutnodes pointer to an array, the function will allocate the array if it is NULL, otherwise will use the given array and assume that is large enough.
node_mark array of length N_PRIMAL_NODES to be used internally.
edge_mark array of length N_PRIMAL_EDGES to be used internally.
Returns:
zero on success, non-zero otherwise.

Definition at line 344 of file eg_kppairs.c.

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_edges
 

Given a primal cut, return a dual cut.

Parameters:
data structure containing all pertinent data to the problem.
node_mark array of length N_PRIMAL_NODES to be used internally.
dc_edges array of length N_PRIMAL_EDGES to be used internally.
pset_sz size of the primal set (number of nodes)
pset array of length pset_sz containing all nodes in the primal set
edge_mark array of length N_PRIMAL_EDGES to be used internally.
dualcut pointer to where to retunr the new dualcut.
Returns:
zero on success, non-zero otherwise.

Definition at line 548 of file eg_kppairs.c.

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.

Parameters:
data structure containing all pertinent data to the problem.
dualcut cut where we are working.
pathsz number of edges in the internal path.
path array of pointer of edges in the internal path.
orientation pointer where we will retunr the orientation.
node_mark array of length N_PRIMAL_NODES to be used internally.
edge_mark array of length N_PRIMAL_EDGES to be used internally.
Returns:
zero on success, non-zero otherwise.

Definition at line 496 of file eg_kppairs.c.

void EGinternalPairsClear void *  pair,
EGmemPool_t mem
 

destructor for greedytypes

Definition at line 319 of file eg_kppairs.c.


Generated on Thu Oct 20 14:58:59 2005 for DominoParitySeparator by  doxygen 1.4.5