Detailed Description
includes graph grid methods for Steiner problems
Graph grid methods for Steiner problems !!!OBSTACLE GRID METHODS ARE DEPRECATED!!!
Definition in file graph_grid.c.
Go to the source code of this file.
Functions | |
static int | getNodeNumber (int grid_dim, int shiftcoord, int *ncoords, int *currcoord) |
static void | compEdgesObst (int coord, int grid_dim, int nobstacles, int *ncoords, int *currcoord, int *edgecosts, int *gridedgecount, int **coords, int **gridedges, int **obst_coords, char *inobstacle) |
static void | compEdges (int coord, int grid_dim, int *ncoords, int *currcoord, int *edgecosts, int *gridedgecount, int **coords, int **gridedges) |
SCIP_RETCODE | graph_obstgrid_create (SCIP *scip, GRAPH **gridgraph, int **coords, int **obst_coords, int nterms, int grid_dim, int nobstacles, int scale_order) |
SCIP_RETCODE | graph_grid_create (SCIP *scip, GRAPH **gridgraph, int **coords, int nterms, int grid_dim, int scale_order) |
SCIP_RETCODE | graph_grid_coordinates (SCIP *scip, int **coords, int **nodecoords, int *ncoords, int node, int grid_dim) |
Function Documentation
◆ getNodeNumber()
|
static |
used by graph_grid_create
Definition at line 37 of file graph_grid.c.
References number.
Referenced by compEdges(), compEdgesObst(), graph_grid_create(), and graph_obstgrid_create().
◆ compEdgesObst()
|
static |
used by graph_obstgrid_create
Definition at line 67 of file graph_grid.c.
References FALSE, getNodeNumber(), TRUE, x, and y.
Referenced by graph_obstgrid_create().
◆ compEdges()
|
static |
used by graph_grid_create
Definition at line 132 of file graph_grid.c.
References getNodeNumber().
Referenced by graph_grid_create().
◆ graph_obstgrid_create()
SCIP_RETCODE graph_obstgrid_create | ( | SCIP * | scip, |
GRAPH ** | gridgraph, | ||
int ** | coords, | ||
int ** | obst_coords, | ||
int | nterms, | ||
int | grid_dim, | ||
int | nobstacles, | ||
int | scale_order | ||
) |
creates a graph out of a given grid
- Parameters
-
scip SCIP data structure gridgraph the (obstacle) grid graph to be constructed coords coordinates of all points obst_coords coordinates of obstacles nterms number of terminals grid_dim dimension of the problem nobstacles number of obstacles scale_order scale factor
Definition at line 175 of file graph_grid.c.
References compEdgesObst(), FALSE, getNodeNumber(), graph_edge_add(), graph_init(), graph_knot_add(), graph_knot_chg(), graph_pack(), GRAPH::grid_coordinates, GRAPH::grid_dim, GRAPH::grid_ncoords, nnodes, nterms, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBufferArray, SCIPsortInt(), GRAPH::source, STP_OARSMT, GRAPH::stp_type, and TRUE.
Referenced by graph_load().
◆ graph_grid_create()
SCIP_RETCODE graph_grid_create | ( | SCIP * | scip, |
GRAPH ** | gridgraph, | ||
int ** | coords, | ||
int | nterms, | ||
int | grid_dim, | ||
int | scale_order | ||
) |
creates a graph out of a given grid
- Parameters
-
scip SCIP data structure gridgraph the grid graph to be constructed coords coordinates nterms number of terminals grid_dim problem dimension scale_order scale order
Definition at line 338 of file graph_grid.c.
References compEdges(), getNodeNumber(), graph_edge_add(), graph_init(), graph_knot_add(), graph_knot_chg(), GRAPH::grid_coordinates, GRAPH::grid_dim, GRAPH::grid_ncoords, nnodes, nterms, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBufferArray, SCIPsortInt(), STP_RSMT, and GRAPH::stp_type.
Referenced by graph_load().
◆ graph_grid_coordinates()
SCIP_RETCODE graph_grid_coordinates | ( | SCIP * | scip, |
int ** | coords, | ||
int ** | nodecoords, | ||
int * | ncoords, | ||
int | node, | ||
int | grid_dim | ||
) |
computes coordinates of node 'node'
- Parameters
-
scip SCIP data structure coords coordinates nodecoords coordinates of the node (to be computed) ncoords array with number of coordinate node the node grid_dim problem dimension
Definition at line 486 of file graph_grid.c.
References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocMemoryArray.
Referenced by SCIPprobdataWriteSolution().