Detailed Description
tests for Steiner tree extended reduction utilites
This file implements tests for Steiner problem reductions.
A list of all interface methods can be found in stptest.h.
Definition in file stptest_extutils.c.
#include <stdio.h>
#include <assert.h>
#include "stptest.h"
#include "portab.h"
#include "graph.h"
#include "reduce.h"
#include "extreduce.h"
Go to the source code of this file.
Functions | |
static SCIP_RETCODE | testMldistsBuilding (SCIP *scip) |
static SCIP_RETCODE | testDistCloseNodesPcAreValid1 (SCIP *scip) |
static SCIP_RETCODE | testDistCloseNodesPcAreValid2 (SCIP *scip) |
static SCIP_RETCODE | testDistCloseNodesPcAreValidAfterDeletion (SCIP *scip) |
static SCIP_RETCODE | testDistCloseNodesAreValid (SCIP *scip) |
static SCIP_RETCODE | testDistRootPathsAreValid (SCIP *scip) |
static SCIP_RETCODE | testDistDistancesAreValid (SCIP *scip) |
SCIP_RETCODE | stptest_extmldists (SCIP *scip) |
Function Documentation
◆ testMldistsBuilding()
|
static |
tests building and un-building
- Parameters
-
scip SCIP data structure
Definition at line 40 of file stptest_extutils.c.
References extreduce_mldistsEmptySlotSetBase(), extreduce_mldistsEmptySlotSetFilled(), extreduce_mldistsEmptySlotTargetDists(), extreduce_mldistsFree(), extreduce_mldistsInit(), extreduce_mldistsIsEmpty(), extreduce_mldistsLevelAddTop(), extreduce_mldistsLevelRemoveTop(), SCIP_CALL, SCIP_OKAY, SCIP_Real, STPTEST_ASSERT_MSG, and TRUE.
Referenced by stptest_extmldists().
◆ testDistCloseNodesPcAreValid1()
|
static |
test close nodes are computed correctly
- Parameters
-
scip SCIP data structure
Definition at line 103 of file stptest_extutils.c.
References distance_data::closenodes_distances, distance_data::closenodes_indices, distance_data::closenodes_range, EQ, extreduce_distDataFree(), extreduce_distDataInit(), FALSE, graph_edge_addBi(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_knot_add(), graph_pc_initPrizes(), nnodes, NULL, GRAPH::prize, SCIP_CALL, SCIP_OKAY, SCIP_Real, GRAPH::source, STP_TERM, STPTEST_ASSERT, stptest_extreduceTearDown(), and stptest_graphSetUpPcOrg().
Referenced by stptest_extmldists().
◆ testDistCloseNodesPcAreValid2()
|
static |
test close nodes are computed correctly
- Parameters
-
scip SCIP data structure
Definition at line 169 of file stptest_extutils.c.
References distance_data::closenodes_distances, distance_data::closenodes_range, EQ, extreduce_distDataFree(), extreduce_distDataInit(), FALSE, graph_edge_addBi(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_knot_add(), graph_pc_initPrizes(), nnodes, NULL, GRAPH::prize, SCIP_CALL, SCIP_OKAY, SCIP_Real, GRAPH::source, STP_TERM, STP_TERM_NONE, STPTEST_ASSERT, stptest_extreduceTearDown(), and stptest_graphSetUpPcOrg().
Referenced by stptest_extmldists().
◆ testDistCloseNodesPcAreValidAfterDeletion()
|
static |
test close nodes are computed correctly
- Parameters
-
scip SCIP data structure
Definition at line 234 of file stptest_extutils.c.
References distance_data::closenodes_distances, distance_data::closenodes_indices, distance_data::closenodes_range, EQ, extreduce_distCloseNodesAreValid(), extreduce_distDataFree(), extreduce_distDataInit(), extreduce_edgeRemove(), FALSE, graph_edge_addBi(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_knot_add(), graph_pc_initPrizes(), nnodes, NULL, GRAPH::prize, SCIP_CALL, SCIP_OKAY, SCIP_Real, GRAPH::source, STP_TERM, STP_TERM_NONE, STPTEST_ASSERT, stptest_extreduceTearDown(), and stptest_graphSetUpPcOrg().
Referenced by stptest_extmldists().
◆ testDistCloseNodesAreValid()
|
static |
test close nodes are computed correctly
< max. number of close nodes to each node
- Parameters
-
scip SCIP data structure
Definition at line 309 of file stptest_extutils.c.
References distance_data::closenodes_distances, distance_data::closenodes_indices, distance_data::closenodes_range, csr_range::end, extreduce_distDataFree(), extreduce_distDataInit(), FALSE, graph_edge_addBi(), graph_free(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_initHistory(), graph_knot_add(), graph_mark(), graph_path_exit(), graph_path_init(), nnodes, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, GRAPH::source, STP_TERM_NONE, STPTEST_ASSERT, and TRUE.
Referenced by stptest_extmldists().
◆ testDistRootPathsAreValid()
|
static |
test root paths are computed correctly
< max. number of close nodes to each node
- Parameters
-
scip SCIP data structure
Definition at line 395 of file stptest_extutils.c.
References extreduce_distDataFree(), extreduce_distDataInit(), FALSE, graph_edge_addBi(), graph_edge_printInfo(), graph_free(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_initHistory(), graph_knot_add(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::head, nnodes, NULL, distance_data::pathroot_blocks, distance_data::pathroot_blocksizes, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, GRAPH::source, STP_TERM_NONE, STPTEST_ASSERT, GRAPH::tail, and TRUE.
Referenced by stptest_extmldists().
◆ testDistDistancesAreValid()
|
static |
test that distances are computed correctly
< max. number of close nodes to each node
- Parameters
-
scip SCIP data structure
Definition at line 475 of file stptest_extutils.c.
References extreduce_distDataDeleteEdge(), extreduce_distDataFree(), extreduce_distDataGetSd(), extreduce_distDataInit(), FALSE, graph_edge_addBi(), graph_edge_delFull(), graph_free(), graph_free_dcsr(), graph_init(), graph_init_dcsr(), graph_initHistory(), graph_knot_add(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::head, nnodes, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, GRAPH::source, STP_TERM, STP_TERM_NONE, STPTEST_ASSERT, GRAPH::tail, and TRUE.
Referenced by stptest_extmldists().
◆ stptest_extmldists()
SCIP_RETCODE stptest_extmldists | ( | SCIP * | scip | ) |
tests for utilits
- Parameters
-
scip SCIP data structure
Definition at line 564 of file stptest_extutils.c.
References SCIP_CALL, SCIP_OKAY, testDistCloseNodesAreValid(), testDistCloseNodesPcAreValid1(), testDistCloseNodesPcAreValid2(), testDistCloseNodesPcAreValidAfterDeletion(), testDistDistancesAreValid(), testDistRootPathsAreValid(), and testMldistsBuilding().
Referenced by stptest_testAll().