/* (C) Copyright 2003 Jens Lysgaard. All rights reserved. */
/* OSI Certified Open Source Software */
/* This software is licensed under the Common Public License Version 1.0 */

#ifndef _H_GRSEARCH
#define _H_GRSEARCH

void GRSEARCH_SetUnitDemand(char UnitDemand);

void GRSEARCH_SwapNodesInPos(int *Node, int *Pos, int s, int t);

void GRSEARCH_GetInfeasExt(int *Pos,
                           int MinCandidateIdx, int MaxCandidateIdx,
                           int NoOfCustomers,
                           int NodeSum, /* Sum of node numbers. */
                           ReachPtr RPtr,
                           int RPtrSize,
                           int *NodeLabel,
                           int Label,
                           char *CallBack);

void GRSEARCH_AddSet(ReachPtr RPtr,
                     int Index,
                     int SetSize,
                     int *List,
                     char AddFullSumList);

void GRSEARCH_CapCuts(ReachPtr SupportPtr,
                      int NoOfCustomers,
                      int *Demand, int CAP,
                      int *SuperNodeSize,
                      double *XInSuperNode,
                      double **XMatrix,
                      int *GeneratedSets,
                      int *GeneratedAntiSets,
                      ReachPtr SetsRPtr, /* Identified cuts. */
                      ReachPtr AntiSetsRPtr,
                      int MaxTotalGeneratedSets);

void GRSEARCH_CheckForExistingSet(ReachPtr RPtr,
                                  int RPtrSize,
                                  int *NodeLabel,
                                  int Label,
                                  int NodeSum, /* Sum of node numbers. */
                                  int NodeSetSize,
                                  char *ListFound);

void GRSEARCH_AddDropCapsOnGS(ReachPtr SupportPtr, /* On GS */
                              int NoOfCustomers,
                              int ShrunkGraphCustNodes,
                              int *SuperDemand, int CAP,
                              int *SuperNodeSize,
                              double *XInSuperNode,
                              ReachPtr SuperNodesRPtr,
                              double **SMatrix, /* Shrunk graph */
                              double Eps,
                              CnstrMgrPointer CMPSourceCutList,
                              int *NoOfGeneratedSets,
                              int MaxTotalGeneratedSets,
                              ReachPtr SetsRPtr); /* Identified cuts. */

#endif

