Detailed Description
header only, simple implementation of an STL like vector
STP vector (basically a much simplified replication of the C++ std::vector) Usage: define with STP_Vectype(template) myvec = NULL;
for example: STP_Vectype(int) myvec = NULL;
Vector needs to be freed!
Definition in file stpvector.h.
#include "scip/scip.h"
Go to the source code of this file.
Macros | |
#define | STP_Vectype(type) type* |
#define | vecinternalSetCapacity(vec, _size_) |
#define | vecinternalSetSize(vec, _size_) |
#define | vecinternalIncrementSize(vec) |
#define | vecinternalDecrementSize(vec) |
#define | vecinternalGetCapacity(vec) ((vec) ? ((int*) (vec))[-2] : (int) 0) |
#define | vecinternalGetSize(vec) ((vec) ? ((int*) (vec))[-1] : (int) 0) |
#define | vecinternalComputeNBytes(size, vec) (size * sizeof(*(vec)) + (sizeof(int) * 2)) |
#define | vecinternalIncreaseCapacity(scip, vec, cap) |
#define | StpVecGetcapacity(vec) (vecinternalGetCapacity(vec)) |
#define | StpVecClear(vec) vecinternalSetSize(vec, (int)0) |
#define | StpVecGetSize(vec) vecinternalGetSize(vec) |
#define | StpVecTop(vec) vec[StpVecGetSize(vec) - 1] |
#define | StpVecIsEmpty(vec) (vecinternalGetSize(vec) == 0) |
#define | StpVecFree(scip, vec) |
#define | StpVecPushBack(scip, vec, value) |
#define | StpVecPopBack(vec) vecinternalDecrementSize((vec)) |
#define | StpVecReserve(scip, vec, _size_) |
Macro Definition Documentation
◆ STP_Vectype
#define STP_Vectype | ( | type | ) | type* |
Definition at line 44 of file stpvector.h.
Referenced by addLevel(), borderNodesContract(), computeOrderingFromNode(), computeSteinerTree_execDirected(), connectivityDataInit(), connectivityDataKeyElimUpdate(), cutNodesGetLastCutnode(), cutNodesProcessComponent(), cutNodesTreeBuildSteinerTree(), decomposeGetFirstMarked(), dpsolverGetSolution(), extreduce_extCompClean(), extreduce_extPermaInit(), extStackAddCompsExpanded(), extStackTopProcessInitialEdges(), extTreeRuleOutSingletonImplied(), generalStarSetUp(), getLowestCommonAncestors(), graph_tpathsRepair(), impliedNodesRemoveTerm(), localKeyVertexHeuristics(), mincutFree(), pathneighborsUpdateDistances(), reduce_impliedNodesIsValid(), reduce_impliedProfitBasedRpc(), reduce_sl(), reducePcMw(), reinsertSubgraphTransferEdges(), removeEdge(), replaceEdgeByPath(), sdgraphUpdateDistgraphFromTpaths(), sepafullAddSolForCand(), sepafullReduceFromSols(), setSubBottleneckEdges(), subgraphBuild(), subgraphIdentify(), termsepaCutIsCorrect(), termsepaTraverseSinkComp(), tpathsRepairExit(), tpathsRepairExitLevel(), tpathsRepairTraverse1st(), tpathsRepairTraverseLevelWithStack(), tpathsRepairTraverseStackAddBelow(), tpathsRepairUpdate1st(), tpathsRepairUpdateLevel(), trailGraphWithStates(), updateFromPartition(), updateTerminalSource(), vnoiDataRepairPreprocess(), vnoiDataReset(), and vnoiDataRestore().
◆ vecinternalSetCapacity
#define vecinternalSetCapacity | ( | vec, | |
_size_ | |||
) |
internal method
Definition at line 48 of file stpvector.h.
◆ vecinternalSetSize
#define vecinternalSetSize | ( | vec, | |
_size_ | |||
) |
internal method
Definition at line 58 of file stpvector.h.
◆ vecinternalIncrementSize
#define vecinternalIncrementSize | ( | vec | ) |
internal method
Definition at line 68 of file stpvector.h.
◆ vecinternalDecrementSize
#define vecinternalDecrementSize | ( | vec | ) |
internal method
Definition at line 77 of file stpvector.h.
◆ vecinternalGetCapacity
#define vecinternalGetCapacity | ( | vec | ) | ((vec) ? ((int*) (vec))[-2] : (int) 0) |
internal method
Definition at line 87 of file stpvector.h.
◆ vecinternalGetSize
#define vecinternalGetSize | ( | vec | ) | ((vec) ? ((int*) (vec))[-1] : (int) 0) |
internal method
Definition at line 92 of file stpvector.h.
◆ vecinternalComputeNBytes
#define vecinternalComputeNBytes | ( | size, | |
vec | |||
) | (size * sizeof(*(vec)) + (sizeof(int) * 2)) |
internal method
Definition at line 97 of file stpvector.h.
◆ vecinternalIncreaseCapacity
#define vecinternalIncreaseCapacity | ( | scip, | |
vec, | |||
cap | |||
) |
internal method
Definition at line 102 of file stpvector.h.
◆ StpVecGetcapacity
#define StpVecGetcapacity | ( | vec | ) | (vecinternalGetCapacity(vec)) |
gets _cap_acity of the vector
Definition at line 129 of file stpvector.h.
Referenced by cutNodesProcessNext(), graph_tpathsGetProfitNodes(), and stpbitset_getCapacity().
◆ StpVecClear
#define StpVecClear | ( | vec | ) | vecinternalSetSize(vec, (int)0) |
removes all elements from vector
Definition at line 134 of file stpvector.h.
Referenced by borderNodesContract(), connectivityDataInit(), dpiterAddNewPrepare(), generalStarCheckInit(), generalStarSetUp(), graph_subinoutClean(), graph_tpathsGetProfitNodes(), pathneighborsCollect(), prClean(), reinsertSubgraph(), STP_Vectype(), subtreesRemoveNonValids(), and updateBorder().
◆ StpVecGetSize
#define StpVecGetSize | ( | vec | ) | vecinternalGetSize(vec) |
gets size of the vector (number of elements)
Definition at line 139 of file stpvector.h.
Referenced by addLeaf(), addLevelFirst(), addNonPathNode(), addPathNode(), bidecomposition_cutnodesCompute(), borderBuildCharDists(), borderBuildCharMap(), borderNodesCollect(), borderNodesContract(), bpartitionsCompute(), bpartitionsDebugPrintTop(), bpartitionsFree(), bsubpartAdd(), computeOrderingFromNode(), computeSteinerTree_execDirected(), connectivityDataKeyElimUpdate(), cutNodesComputePostProcess(), cutNodesGetLastCutnode(), cutNodesProcessComponent(), cutNodesProcessNext(), cutNodesTreeBuildSteinerTree(), cutNodesTreeMakeTerms(), decomposeGetFirstMarked(), dpborder_free(), dpborder_getPredLevel(), dpborder_getTopDelimiter(), dpborder_getTopLevel(), dpborder_markSolNodes(), dpborder_partGetIdxNewExclusive(), dpiterAddNewPrepare(), dpiterPopSol(), dpmiscFree(), dpsolverGetSolution(), dpterms_intersectsEqualNaive(), dpterms_streeFree(), enumExec(), extensionHasImplicationConflict(), extreduce_extCompClean(), generalStarCheckExit(), generalStarCheckInit(), generalStarSetUp(), getOrderedRootIndices(), graph_tpathsGetProfitNodes(), impliedNodesRemoveTerm(), insertData(), mincutFree(), pathExend(), pathExendPrepare(), pathGetHead(), pathneighborsCollect(), pathneighborsUpdateDistances(), prClean(), processPath(), redsolGetNlevels(), reduce_impliedNodesIsValid(), reduce_impliedProfitBasedRpc(), reduce_nonTerminalComponents(), reduce_sl(), reduce_solFree(), reduce_starResetWithEdges(), reducePcMw(), reinsertSubgraph(), reinsertSubgraphTransferEdges(), ruleOutFromHead(), sdgraphUpdateDistgraphFromTpaths(), sepafullAddSingleSolcandEdges(), sepafullAddSolForCand(), sepafullFree(), sepafullReduceFromSols(), sepaspecial_vtimplicationsSeparate(), setSubBottleneckEdges(), STP_Vectype(), stpbitset_and(), stpbitset_areEqual(), stpbitset_getCapacity(), stpbitset_getPopcount(), stpbitset_GT(), stpbitset_haveIntersection(), stpbitset_LT(), stpbitset_newCopy(), stpbitset_newNot(), stpbitset_newXor(), stpbitset_or(), stpbitset_setsAreCompatible(), subgraphBuild(), subgraphIdentify(), subSolIsRedundant(), subsolUpdate(), subtreesAddNew(), subtreesAddNewFinalize(), subtreesBuild(), subtreesRemoveNonValids(), termsepaCutIsCorrect(), termsepaTraverseSinkComp(), tpathsRepairExit(), tpathsRepairExitLevel(), tpathsRepairTraverse1st(), tpathsRepairTraverseLevelWithStack(), tpathsRepairTraverseStackAddBelow(), tpathsRepairUpdate1st(), tpathsRepairUpdateLevel(), trailGraphWithStates(), treenodeIsInRange(), updateBorder(), updateFromPartition(), updateIncumbent(), updateTerminalSource(), vnoiDataRepairPreprocess(), vnoiDataReset(), and vnoiDataRestore().
◆ StpVecTop
#define StpVecTop | ( | vec | ) | vec[StpVecGetSize(vec) - 1] |
gets top element of the vector
Definition at line 143 of file stpvector.h.
◆ StpVecIsEmpty
#define StpVecIsEmpty | ( | vec | ) | (vecinternalGetSize(vec) == 0) |
is the vector empty?
Definition at line 148 of file stpvector.h.
Referenced by decomposeGetFirstMarked(), reduce_solFree(), tpathsRepairTraverse1st(), and tpathsRepairTraverseLevelWithStack().
◆ StpVecFree
#define StpVecFree | ( | scip, | |
vec | |||
) |
frees vector
Definition at line 153 of file stpvector.h.
Referenced by bidecomposition_cutnodesFree(), bpartitionsFree(), combineWithIntersecting(), computeOrderingFromNode(), computeSteinerTree_execDirected(), cutNodesGetLastCutnode(), cutNodesTreeBuildSteinerTree(), decomposeGetFirstMarked(), dpborder_dpblevelFree(), dpborder_free(), dpiterFree(), dpmiscFree(), dpsolverFreeData(), dpterms_dpsubsolFree(), dpterms_intersectsEqualNaive(), dpterms_streeFree(), enumExec(), extreduce_extCompClean(), extreduce_extPermaFree(), generalStarExit(), graph_subinoutFree(), localKeyVertexHeuristics(), mincutFree(), prFree(), reduce_impliedProfitBasedRpc(), reduce_sl(), reduce_solFree(), reduce_termcompFree(), reducePcMw(), sdgraphUpdateDistgraphFromTpaths(), sepafullAddSingleSolcandEdges(), sepafullFree(), sepaspecial_vtimplicationsFree(), stpbitset_free(), subsolUpdate(), subtreesAddNew(), termsepaCutIsCorrect(), termsepaTraverseSinkComp(), tpathsRepairExit(), trailGraphWithStates(), updateFromPartition(), and updateTerminalSource().
◆ StpVecPushBack
#define StpVecPushBack | ( | scip, | |
vec, | |||
value | |||
) |
adds (appends) element
Definition at line 167 of file stpvector.h.
Referenced by addLeaf(), addLevel(), addLevelFirst(), addNonPathNode(), addPathHeadEdge(), addPathNode(), borderNodesCollect(), bottleneckMarkEqualityEdge(), bottleneckMarkEqualityPath(), bpartitionsCompute(), bsubpartAdd(), computeOrderingFromNode(), computeSteinerTree_execDirected(), connectivityDataInit(), cutNodesGetLastCutnode(), cutNodesProcessComponent(), cutNodesProcessNext(), cutNodesTreeBuildSteinerTree(), decomposeGetFirstMarked(), dpborder_partGetIdxNew(), dpborder_partGetIdxNewExclusive(), dpiterAddNewPrepare(), dpmiscInit(), dpsolverInitData(), generalStarCheckInit(), generalStarSetUp(), graph_tpathsGetProfitNodes(), impliedNodesAddTerm(), insertData(), lca(), mincutFree(), nsvEdgeContract(), pathExendPrepare(), pathneighborsCollect(), pathneighborsUpdateDistances(), reduce_sl(), reduce_solInit(), reduce_solLevelAdd(), reducePcMw(), reinsertSubgraphDeleteOldEdges(), sepafullAddSingleSolcandEdges(), sepafullAddSolForCand(), sepaspecial_vtimplicationsInit(), STP_Vectype(), stpbitset_new(), streeCollectIntersects(), subgraphIdentify(), subsolUpdate(), subtreesAddNewFinalize(), subtreesBuild(), subtreesRemoveNonValids(), termsepaCutIsCorrect(), termsepaTraverseSinkComp(), tpathsScan1st(), tpathsScan2nd(), tpathsScan3rd(), tpathsScan4th(), trailGraphWithStates(), updateBorder(), and updateTerminalSource().
◆ StpVecPopBack
#define StpVecPopBack | ( | vec | ) | vecinternalDecrementSize((vec)) |
remove last element
Definition at line 182 of file stpvector.h.
Referenced by computeOrderingFromNode(), cutNodesGetLastCutnode(), cutNodesProcessComponent(), cutNodesTreeBuildSteinerTree(), decomposeGetFirstMarked(), impliedNodesRemoveTerm(), pathneighborsUpdateDistances(), reduce_sl(), reduce_solFree(), reduce_solLevelTopFinalize(), reduce_solLevelTopRemove(), reinsertSubgraphTransferEdges(), sepafullAddSingleSolcandEdges(), STP_Vectype(), subtreesBuild(), subtreesRemoveNonValids(), termsepaCutIsCorrect(), tpathsRepairTraverse1st(), tpathsRepairTraverseLevelWithStack(), and updateBorder().
◆ StpVecReserve
#define StpVecReserve | ( | scip, | |
vec, | |||
_size_ | |||
) |
reserves space
Definition at line 186 of file stpvector.h.
Referenced by bidecomposition_cutnodesInit(), computeOrderingFromNode(), cutNodesGetLastCutnode(), cutNodesTreeBuildSteinerTree(), dpiterInit(), generalStarInit(), mincutFree(), prInit(), sdgraphUpdateDistgraphFromTpaths(), stpbitset_new(), subgraphIdentify(), termsepaCutIsCorrect(), termsepaTraverseSinkComp(), tpathsRepairInit(), trailGraphWithStates(), and updateTerminalSource().