147 int Flow, FlowCur, RetValue, i;
149 int fUseDirectedFlow = 1;
174 if ( !fUseDirectedFlow )
204 if ( fUseDirectedFlow )
213 if ( fUseDirectedFlow )
225 printf(
"Abc_NtkMaxFlow() error! The computed min-cut is not a cut!\n" );
232 printf(
"L = %6d. %s max-flow = %6d. Min-cut = %6d. ",
419 if ( pFanout == NULL )
464 if ( pFanin == NULL )
771 printf(
"Min-cut: " );
775 printf(
"Marked nodes: " );
static void Abc_NtkMaxFlowPrintFlow(Abc_Ntk_t *pNtk, int fForward)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_NtkMaxFlowFwdPath2_rec(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkMaxFlow(Abc_Ntk_t *pNtk, int fForward, int fVerbose)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
void Abc_NtkMaxFlowTest(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
static void Abc_NtkMaxFlowPrintCut(Abc_Ntk_t *pNtk, Vec_Ptr_t *vMinCut)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Abc_NtkMaxFlowMinCutUpdate(Abc_Ntk_t *pNtk, Vec_Ptr_t *vMinCut, int fForward)
static abctime Abc_Clock()
static int Abc_NtkMaxFlowBwdPath2_rec(Abc_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_ObjGetFaninPath(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_ObjGetPredecessorFwd(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_ObjGetFanoutPath(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkCleanMarkA(Abc_Ntk_t *pNtk)
static int Abc_NtkMaxFlowFwdPath_rec(Abc_Obj_t *pObj)
static int Abc_NtkMaxFlowFwdPath3_rec(Abc_Obj_t *pObj, Abc_Obj_t *pPrev, int fFanin)
void Abc_NtkMaxFlowCollectCut_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vNodes)
#define ABC_NAMESPACE_IMPL_END
void Abc_NtkMaxFlowMarkCut_rec(Abc_Obj_t *pObj)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
static ABC_NAMESPACE_IMPL_START int Abc_ObjSetPath(Abc_Obj_t *pObj, Abc_Obj_t *pNext)
DECLARATIONS ///.
static int Abc_NtkMaxFlowVerifyCut(Abc_Ntk_t *pNtk, Vec_Ptr_t *vMinCut, int fForward)
#define ABC_NAMESPACE_IMPL_START
static int Abc_NtkMaxFlowBwdPath_rec(Abc_Obj_t *pObj)
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static Abc_Obj_t * Abc_ObjGetPath(Abc_Obj_t *pObj)
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
static int Abc_ObjIsPo(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
static void Vec_PtrClear(Vec_Ptr_t *p)
static Vec_Ptr_t * Abc_NtkMaxFlowMinCut(Abc_Ntk_t *pNtk, int fForward)
#define Abc_NtkForEachPo(pNtk, pPo, i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
static Abc_Obj_t * Abc_ObjGetPredecessorBwd(Abc_Obj_t *pObj)
int Abc_NtkMaxFlowVerifyCut_rec(Abc_Obj_t *pObj, int fForward)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)