abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vecVec.h File Reference
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  Vec_Vec_t_
 

Macros

#define Vec_VecForEachLevel(vGlob, vVec, i)   for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
 MACRO DEFINITIONS ///. More...
 
#define Vec_VecForEachLevelStart(vGlob, vVec, i, LevelStart)   for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelStop(vGlob, vVec, i, LevelStop)   for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelStartStop(vGlob, vVec, i, LevelStart, LevelStop)   for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelReverse(vGlob, vVec, i)   for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
 
#define Vec_VecForEachLevelReverseStartStop(vGlob, vVec, i, LevelStart, LevelStop)   for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
 
#define Vec_VecForEachLevelTwo(vGlob1, vGlob2, vVec1, vVec2, i)   for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntry(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntry(vGlob2, i)), 1); i++ )
 
#define Vec_VecForEachLevelInt(vGlob, vVec, i)   for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelIntStart(vGlob, vVec, i, LevelStart)   for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelIntStop(vGlob, vVec, i, LevelStop)   for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelIntStartStop(vGlob, vVec, i, LevelStart, LevelStop)   for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
 
#define Vec_VecForEachLevelIntReverse(vGlob, vVec, i)   for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
 
#define Vec_VecForEachLevelIntReverseStartStop(vGlob, vVec, i, LevelStart, LevelStop)   for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
 
#define Vec_VecForEachLevelIntTwo(vGlob1, vGlob2, vVec1, vVec2, i)   for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntryInt(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntryInt(vGlob2, i)), 1); i++ )
 
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
 
#define Vec_VecForEachEntryLevel(Type, vGlob, pEntry, i, Level)   Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, Level), pEntry, i )
 
#define Vec_VecForEachEntryStart(Type, vGlob, pEntry, i, k, LevelStart)
 
#define Vec_VecForEachEntryStartStop(Type, vGlob, pEntry, i, k, LevelStart, LevelStop)
 
#define Vec_VecForEachEntryReverse(Type, vGlob, pEntry, i, k)
 
#define Vec_VecForEachEntryReverseReverse(Type, vGlob, pEntry, i, k)
 
#define Vec_VecForEachEntryReverseStart(Type, vGlob, pEntry, i, k, LevelStart)
 
#define Vec_VecForEachEntryInt(vGlob, Entry, i, k)
 
#define Vec_VecForEachEntryIntLevel(vGlob, Entry, i, Level)   Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, Level), Entry, i )
 
#define Vec_VecForEachEntryIntStart(vGlob, Entry, i, k, LevelStart)
 
#define Vec_VecForEachEntryIntStartStop(vGlob, Entry, i, k, LevelStart, LevelStop)
 
#define Vec_VecForEachEntryIntReverse(vGlob, Entry, i, k)
 
#define Vec_VecForEachEntryIntReverseReverse(vGlob, Entry, i, k)
 
#define Vec_VecForEachEntryIntReverseStart(vGlob, Entry, i, k, LevelStart)
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Vec_Vec_t_ 
Vec_Vec_t
 INCLUDES ///. More...
 

Functions

static Vec_Vec_tVec_VecAlloc (int nCap)
 FUNCTION DEFINITIONS ///. More...
 
static Vec_Vec_tVec_VecStart (int nSize)
 
static void Vec_VecExpand (Vec_Vec_t *p, int Level)
 
static void Vec_VecExpandInt (Vec_Vec_t *p, int Level)
 
static int Vec_VecSize (Vec_Vec_t *p)
 
static int Vec_VecCap (Vec_Vec_t *p)
 
static int Vec_VecLevelSize (Vec_Vec_t *p, int i)
 
static Vec_Ptr_tVec_VecEntry (Vec_Vec_t *p, int i)
 
static Vec_Int_tVec_VecEntryInt (Vec_Vec_t *p, int i)
 
static double Vec_VecMemory (Vec_Vec_t *p)
 
static double Vec_VecMemoryInt (Vec_Vec_t *p)
 
static void * Vec_VecEntryEntry (Vec_Vec_t *p, int i, int k)
 
static int Vec_VecEntryEntryInt (Vec_Vec_t *p, int i, int k)
 
static void Vec_VecFree (Vec_Vec_t *p)
 
static void Vec_VecFreeP (Vec_Vec_t **p)
 
static Vec_Vec_tVec_VecDup (Vec_Vec_t *p)
 
static Vec_Vec_tVec_VecDupInt (Vec_Vec_t *p)
 
static int Vec_VecSizeSize (Vec_Vec_t *p)
 
static void Vec_VecClear (Vec_Vec_t *p)
 
static void Vec_VecPush (Vec_Vec_t *p, int Level, void *Entry)
 
static void Vec_VecPushInt (Vec_Vec_t *p, int Level, int Entry)
 
static void Vec_VecPushUnique (Vec_Vec_t *p, int Level, void *Entry)
 
static void Vec_VecPushUniqueInt (Vec_Vec_t *p, int Level, int Entry)
 
static int Vec_VecSortCompare1 (Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
 
static int Vec_VecSortCompare2 (Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
 
static void Vec_VecSort (Vec_Vec_t *p, int fReverse)
 
static int Vec_VecSortCompare3 (Vec_Int_t **pp1, Vec_Int_t **pp2)
 
static int Vec_VecSortCompare4 (Vec_Int_t **pp1, Vec_Int_t **pp2)
 
static void Vec_VecSortByFirstInt (Vec_Vec_t *p, int fReverse)
 
static void Vec_VecPrintInt (Vec_Vec_t *p, int fSkipSingles)
 

Macro Definition Documentation

#define Vec_VecForEachEntry (   Type,
  vGlob,
  pEntry,
  i,
 
)
Value:
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55

Definition at line 87 of file vecVec.h.

#define Vec_VecForEachEntryInt (   vGlob,
  Entry,
  i,
 
)
Value:
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54

Definition at line 109 of file vecVec.h.

#define Vec_VecForEachEntryIntLevel (   vGlob,
  Entry,
  i,
  Level 
)    Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, Level), Entry, i )

Definition at line 112 of file vecVec.h.

#define Vec_VecForEachEntryIntReverse (   vGlob,
  Entry,
  i,
 
)
Value:
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
#define Vec_IntForEachEntryReverse(vVec, pEntry, i)
Definition: vecInt.h:62
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222

Definition at line 120 of file vecVec.h.

#define Vec_VecForEachEntryIntReverseReverse (   vGlob,
  Entry,
  i,
 
)
Value:
for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
#define Vec_IntForEachEntryReverse(vVec, pEntry, i)
Definition: vecInt.h:62
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222

Definition at line 123 of file vecVec.h.

#define Vec_VecForEachEntryIntReverseStart (   vGlob,
  Entry,
  i,
  k,
  LevelStart 
)
Value:
for ( i = LevelStart-1; i >= 0; i-- ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54

Definition at line 126 of file vecVec.h.

#define Vec_VecForEachEntryIntStart (   vGlob,
  Entry,
  i,
  k,
  LevelStart 
)
Value:
for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54

Definition at line 114 of file vecVec.h.

#define Vec_VecForEachEntryIntStartStop (   vGlob,
  Entry,
  i,
  k,
  LevelStart,
  LevelStop 
)
Value:
for ( i = LevelStart; i < LevelStop; i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54

Definition at line 117 of file vecVec.h.

#define Vec_VecForEachEntryLevel (   Type,
  vGlob,
  pEntry,
  i,
  Level 
)    Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, Level), pEntry, i )

Definition at line 90 of file vecVec.h.

#define Vec_VecForEachEntryReverse (   Type,
  vGlob,
  pEntry,
  i,
 
)
Value:
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
Definition: vecPtr.h:63
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271

Definition at line 98 of file vecVec.h.

#define Vec_VecForEachEntryReverseReverse (   Type,
  vGlob,
  pEntry,
  i,
 
)
Value:
for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
Definition: vecPtr.h:63
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271

Definition at line 101 of file vecVec.h.

#define Vec_VecForEachEntryReverseStart (   Type,
  vGlob,
  pEntry,
  i,
  k,
  LevelStart 
)
Value:
for ( i = LevelStart-1; i >= 0; i-- ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55

Definition at line 104 of file vecVec.h.

#define Vec_VecForEachEntryStart (   Type,
  vGlob,
  pEntry,
  i,
  k,
  LevelStart 
)
Value:
for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55

Definition at line 92 of file vecVec.h.

#define Vec_VecForEachEntryStartStop (   Type,
  vGlob,
  pEntry,
  i,
  k,
  LevelStart,
  LevelStop 
)
Value:
for ( i = LevelStart; i < LevelStop; i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55

Definition at line 95 of file vecVec.h.

#define Vec_VecForEachLevel (   vGlob,
  vVec,
 
)    for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )

MACRO DEFINITIONS ///.

Definition at line 55 of file vecVec.h.

#define Vec_VecForEachLevelInt (   vGlob,
  vVec,
 
)    for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )

Definition at line 71 of file vecVec.h.

#define Vec_VecForEachLevelIntReverse (   vGlob,
  vVec,
 
)    for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )

Definition at line 79 of file vecVec.h.

#define Vec_VecForEachLevelIntReverseStartStop (   vGlob,
  vVec,
  i,
  LevelStart,
  LevelStop 
)    for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )

Definition at line 81 of file vecVec.h.

#define Vec_VecForEachLevelIntStart (   vGlob,
  vVec,
  i,
  LevelStart 
)    for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )

Definition at line 73 of file vecVec.h.

#define Vec_VecForEachLevelIntStartStop (   vGlob,
  vVec,
  i,
  LevelStart,
  LevelStop 
)    for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )

Definition at line 77 of file vecVec.h.

#define Vec_VecForEachLevelIntStop (   vGlob,
  vVec,
  i,
  LevelStop 
)    for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )

Definition at line 75 of file vecVec.h.

#define Vec_VecForEachLevelIntTwo (   vGlob1,
  vGlob2,
  vVec1,
  vVec2,
 
)    for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntryInt(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntryInt(vGlob2, i)), 1); i++ )

Definition at line 83 of file vecVec.h.

#define Vec_VecForEachLevelReverse (   vGlob,
  vVec,
 
)    for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )

Definition at line 63 of file vecVec.h.

#define Vec_VecForEachLevelReverseStartStop (   vGlob,
  vVec,
  i,
  LevelStart,
  LevelStop 
)    for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )

Definition at line 65 of file vecVec.h.

#define Vec_VecForEachLevelStart (   vGlob,
  vVec,
  i,
  LevelStart 
)    for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )

Definition at line 57 of file vecVec.h.

#define Vec_VecForEachLevelStartStop (   vGlob,
  vVec,
  i,
  LevelStart,
  LevelStop 
)    for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )

Definition at line 61 of file vecVec.h.

#define Vec_VecForEachLevelStop (   vGlob,
  vVec,
  i,
  LevelStop 
)    for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )

Definition at line 59 of file vecVec.h.

#define Vec_VecForEachLevelTwo (   vGlob1,
  vGlob2,
  vVec1,
  vVec2,
 
)    for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntry(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntry(vGlob2, i)), 1); i++ )

Definition at line 67 of file vecVec.h.

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t

INCLUDES ///.

CFile****************************************************************

FileName [vecVec.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Resizable arrays.]

Synopsis [Resizable vector of resizable vectors.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
vecVec.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 42 of file vecVec.h.

Function Documentation

static Vec_Vec_t* Vec_VecAlloc ( int  nCap)
inlinestatic

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Allocates a vector with the given capacity.]

Description []

SideEffects []

SeeAlso []

Definition at line 145 of file vecVec.h.

146 {
147  Vec_Vec_t * p;
148  p = ABC_ALLOC( Vec_Vec_t, 1 );
149  if ( nCap > 0 && nCap < 8 )
150  nCap = 8;
151  p->nSize = 0;
152  p->nCap = nCap;
153  p->pArray = p->nCap? ABC_ALLOC( void *, p->nCap ) : NULL;
154  return p;
155 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static int Vec_VecCap ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 238 of file vecVec.h.

239 {
240  return p->nCap;
241 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_VecClear ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 437 of file vecVec.h.

438 {
439  Vec_Ptr_t * vVec;
440  int i;
441  Vec_VecForEachLevel( p, vVec, i )
442  Vec_PtrClear( vVec );
443 }
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecVec.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrClear(Vec_Ptr_t *p)
Definition: vecPtr.h:545
static Vec_Vec_t* Vec_VecDup ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis [Frees the vector.]

Description []

SideEffects []

SeeAlso []

Definition at line 386 of file vecVec.h.

387 {
388  Vec_Ptr_t * vNew, * vVec;
389  int i;
390  vNew = Vec_PtrAlloc( Vec_VecSize(p) );
391  Vec_VecForEachLevel( p, vVec, i )
392  Vec_PtrPush( vNew, Vec_PtrDup(vVec) );
393  return (Vec_Vec_t *)vNew;
394 }
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecVec.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static Vec_Ptr_t * Vec_PtrDup(Vec_Ptr_t *pVec)
Definition: vecPtr.h:169
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Vec_t* Vec_VecDupInt ( Vec_Vec_t p)
inlinestatic

Definition at line 395 of file vecVec.h.

396 {
397  Vec_Ptr_t * vNew;
398  Vec_Int_t * vVec;
399  int i;
400  vNew = Vec_PtrAlloc( Vec_VecSize(p) );
401  Vec_VecForEachLevelInt( p, vVec, i )
402  Vec_PtrPush( vNew, Vec_IntDup(vVec) );
403  return (Vec_Vec_t *)vNew;
404 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
Definition: vecInt.h:214
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
Definition: vecVec.h:71
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static Vec_Ptr_t* Vec_VecEntry ( Vec_Vec_t p,
int  i 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 271 of file vecVec.h.

272 {
273  assert( i >= 0 && i < p->nSize );
274  return (Vec_Ptr_t *)p->pArray[i];
275 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define assert(ex)
Definition: util_old.h:213
static void* Vec_VecEntryEntry ( Vec_Vec_t p,
int  i,
int  k 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 327 of file vecVec.h.

328 {
329  return Vec_PtrEntry( Vec_VecEntry(p, i), k );
330 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static int Vec_VecEntryEntryInt ( Vec_Vec_t p,
int  i,
int  k 
)
inlinestatic

Definition at line 331 of file vecVec.h.

332 {
333  return Vec_IntEntry( Vec_VecEntryInt(p, i), k );
334 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static Vec_Int_t* Vec_VecEntryInt ( Vec_Vec_t p,
int  i 
)
inlinestatic

Definition at line 276 of file vecVec.h.

277 {
278  assert( i >= 0 && i < p->nSize );
279  return (Vec_Int_t *)p->pArray[i];
280 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define assert(ex)
Definition: util_old.h:213
static void Vec_VecExpand ( Vec_Vec_t p,
int  Level 
)
inlinestatic

Function*************************************************************

Synopsis [Allocates a vector with the given capacity.]

Description []

SideEffects []

SeeAlso []

Definition at line 190 of file vecVec.h.

191 {
192  int i;
193  if ( p->nSize >= Level + 1 )
194  return;
195  Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
196  for ( i = p->nSize; i <= Level; i++ )
197  p->pArray[i] = Vec_PtrAlloc( 0 );
198  p->nSize = Level + 1;
199 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static void Vec_VecExpandInt ( Vec_Vec_t p,
int  Level 
)
inlinestatic

Definition at line 200 of file vecVec.h.

201 {
202  int i;
203  if ( p->nSize >= Level + 1 )
204  return;
205  Vec_IntGrow( (Vec_Int_t *)p, Level + 1 );
206  for ( i = p->nSize; i <= Level; i++ )
207  p->pArray[i] = Vec_PtrAlloc( 0 );
208  p->nSize = Level + 1;
209 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
Definition: bblif.c:336
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static void Vec_VecFree ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis [Frees the vector.]

Description []

SideEffects []

SeeAlso []

Definition at line 347 of file vecVec.h.

348 {
349  Vec_Ptr_t * vVec;
350  int i;
351  Vec_VecForEachLevel( p, vVec, i )
352  if ( vVec ) Vec_PtrFree( vVec );
353  Vec_PtrFree( (Vec_Ptr_t *)p );
354 }
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecVec.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
if(last==0)
Definition: sparse_int.h:34
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
static void Vec_VecFreeP ( Vec_Vec_t **  p)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 367 of file vecVec.h.

368 {
369  if ( *p == NULL )
370  return;
371  Vec_VecFree( *p );
372  *p = NULL;
373 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
static int Vec_VecLevelSize ( Vec_Vec_t p,
int  i 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 254 of file vecVec.h.

255 {
256  assert( i >= 0 && i < p->nSize );
257  return Vec_PtrSize( (Vec_Ptr_t *)p->pArray[i] );
258 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
#define assert(ex)
Definition: util_old.h:213
static double Vec_VecMemory ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 293 of file vecVec.h.

294 {
295  int i;
296  double Mem;
297  if ( p == NULL ) return 0.0;
298  Mem = Vec_PtrMemory( (Vec_Ptr_t *)p );
299  for ( i = 0; i < p->nSize; i++ )
300  if ( Vec_VecEntry(p, i) )
301  Mem += Vec_PtrMemory( Vec_VecEntry(p, i) );
302  return Mem;
303 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static double Vec_PtrMemory(Vec_Ptr_t *p)
Definition: vecPtr.h:327
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static double Vec_VecMemoryInt ( Vec_Vec_t p)
inlinestatic

Definition at line 304 of file vecVec.h.

305 {
306  int i;
307  double Mem;
308  if ( p == NULL ) return 0.0;
309  Mem = Vec_PtrMemory( (Vec_Ptr_t *)p );
310  for ( i = 0; i < p->nSize; i++ )
311  if ( Vec_VecEntry(p, i) )
312  Mem += Vec_IntMemory( Vec_VecEntryInt(p, i) );
313  return Mem;
314 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static double Vec_IntMemory(Vec_Int_t *p)
Definition: vecInt.h:384
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static double Vec_PtrMemory(Vec_Ptr_t *p)
Definition: vecPtr.h:327
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static void Vec_VecPrintInt ( Vec_Vec_t p,
int  fSkipSingles 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 616 of file vecVec.h.

617 {
618  int i, k, Entry;
619  Vec_VecForEachEntryInt( p, Entry, i, k )
620  {
621  if ( fSkipSingles && Vec_VecLevelSize(p, i) == 1 )
622  break;
623  if ( k == 0 )
624  printf( " %4d : {", i );
625  printf( " %d", Entry );
626  if ( k == Vec_VecLevelSize(p, i) - 1 )
627  printf( " }\n" );
628  }
629 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Vec_VecForEachEntryInt(vGlob, Entry, i, k)
Definition: vecVec.h:109
static int Vec_VecLevelSize(Vec_Vec_t *p, int i)
Definition: vecVec.h:254
static void Vec_VecPush ( Vec_Vec_t p,
int  Level,
void *  Entry 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 456 of file vecVec.h.

457 {
458  if ( p->nSize < Level + 1 )
459  {
460  int i;
461  Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
462  for ( i = p->nSize; i < Level + 1; i++ )
463  p->pArray[i] = Vec_PtrAlloc( 0 );
464  p->nSize = Level + 1;
465  }
466  Vec_PtrPush( Vec_VecEntry(p, Level), Entry );
467 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static void Vec_VecPushInt ( Vec_Vec_t p,
int  Level,
int  Entry 
)
inlinestatic

Definition at line 468 of file vecVec.h.

469 {
470  if ( p->nSize < Level + 1 )
471  {
472  int i;
473  Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
474  for ( i = p->nSize; i < Level + 1; i++ )
475  p->pArray[i] = Vec_IntAlloc( 0 );
476  p->nSize = Level + 1;
477  }
478  Vec_IntPush( Vec_VecEntryInt(p, Level), Entry );
479 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static void Vec_VecPushUnique ( Vec_Vec_t p,
int  Level,
void *  Entry 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 492 of file vecVec.h.

493 {
494  if ( p->nSize < Level + 1 )
495  Vec_VecPush( p, Level, Entry );
496  else
497  Vec_PtrPushUnique( Vec_VecEntry(p, Level), Entry );
498 }
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
Definition: vecVec.h:456
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:656
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static void Vec_VecPushUniqueInt ( Vec_Vec_t p,
int  Level,
int  Entry 
)
inlinestatic

Definition at line 499 of file vecVec.h.

500 {
501  if ( p->nSize < Level + 1 )
502  Vec_VecPushInt( p, Level, Entry );
503  else
504  Vec_IntPushUnique( Vec_VecEntryInt(p, Level), Entry );
505 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
Definition: vecVec.h:468
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
Definition: vecInt.h:832
static int Vec_VecSize ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 222 of file vecVec.h.

223 {
224  return p->nSize;
225 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_VecSizeSize ( Vec_Vec_t p)
inlinestatic

Function*************************************************************

Synopsis [Frees the vector of vectors.]

Description []

SideEffects []

SeeAlso []

Definition at line 417 of file vecVec.h.

418 {
419  Vec_Ptr_t * vVec;
420  int i, Counter = 0;
421  Vec_VecForEachLevel( p, vVec, i )
422  Counter += vVec->nSize;
423  return Counter;
424 }
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecVec.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Counter
static void Vec_VecSort ( Vec_Vec_t p,
int  fReverse 
)
inlinestatic

Function*************************************************************

Synopsis [Sorting the entries by their integer value.]

Description []

SideEffects []

SeeAlso []

Definition at line 546 of file vecVec.h.

547 {
548  if ( fReverse )
549  qsort( (void *)p->pArray, p->nSize, sizeof(void *),
550  (int (*)(const void *, const void *)) Vec_VecSortCompare2 );
551  else
552  qsort( (void *)p->pArray, p->nSize, sizeof(void *),
553  (int (*)(const void *, const void *)) Vec_VecSortCompare1 );
554 }
static int Vec_VecSortCompare2(Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
Definition: vecVec.h:526
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_VecSortCompare1(Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
Definition: vecVec.h:518
static void Vec_VecSortByFirstInt ( Vec_Vec_t p,
int  fReverse 
)
inlinestatic

Function*************************************************************

Synopsis [Sorting the entries by their integer value.]

Description []

SideEffects []

SeeAlso []

Definition at line 595 of file vecVec.h.

596 {
597  if ( fReverse )
598  qsort( (void *)p->pArray, p->nSize, sizeof(void *),
599  (int (*)(const void *, const void *)) Vec_VecSortCompare4 );
600  else
601  qsort( (void *)p->pArray, p->nSize, sizeof(void *),
602  (int (*)(const void *, const void *)) Vec_VecSortCompare3 );
603 }
static int Vec_VecSortCompare4(Vec_Int_t **pp1, Vec_Int_t **pp2)
Definition: vecVec.h:575
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_VecSortCompare3(Vec_Int_t **pp1, Vec_Int_t **pp2)
Definition: vecVec.h:567
static int Vec_VecSortCompare1 ( Vec_Ptr_t **  pp1,
Vec_Ptr_t **  pp2 
)
static

Function*************************************************************

Synopsis [Comparison procedure for two arrays.]

Description []

SideEffects []

SeeAlso []

Definition at line 518 of file vecVec.h.

519 {
520  if ( Vec_PtrSize(*pp1) < Vec_PtrSize(*pp2) )
521  return -1;
522  if ( Vec_PtrSize(*pp1) > Vec_PtrSize(*pp2) )
523  return 1;
524  return 0;
525 }
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static int Vec_VecSortCompare2 ( Vec_Ptr_t **  pp1,
Vec_Ptr_t **  pp2 
)
static

Definition at line 526 of file vecVec.h.

527 {
528  if ( Vec_PtrSize(*pp1) > Vec_PtrSize(*pp2) )
529  return -1;
530  if ( Vec_PtrSize(*pp1) < Vec_PtrSize(*pp2) )
531  return 1;
532  return 0;
533 }
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static int Vec_VecSortCompare3 ( Vec_Int_t **  pp1,
Vec_Int_t **  pp2 
)
static

Function*************************************************************

Synopsis [Comparison procedure for two integers.]

Description []

SideEffects []

SeeAlso []

Definition at line 567 of file vecVec.h.

568 {
569  if ( Vec_IntEntry(*pp1,0) < Vec_IntEntry(*pp2,0) )
570  return -1;
571  if ( Vec_IntEntry(*pp1,0) > Vec_IntEntry(*pp2,0) )
572  return 1;
573  return 0;
574 }
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Vec_VecSortCompare4 ( Vec_Int_t **  pp1,
Vec_Int_t **  pp2 
)
static

Definition at line 575 of file vecVec.h.

576 {
577  if ( Vec_IntEntry(*pp1,0) > Vec_IntEntry(*pp2,0) )
578  return -1;
579  if ( Vec_IntEntry(*pp1,0) < Vec_IntEntry(*pp2,0) )
580  return 1;
581  return 0;
582 }
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static Vec_Vec_t* Vec_VecStart ( int  nSize)
inlinestatic

Function*************************************************************

Synopsis [Allocates a vector with the given capacity.]

Description []

SideEffects []

SeeAlso []

Definition at line 168 of file vecVec.h.

169 {
170  Vec_Vec_t * p;
171  int i;
172  p = Vec_VecAlloc( nSize );
173  for ( i = 0; i < nSize; i++ )
174  p->pArray[i] = Vec_PtrAlloc( 0 );
175  p->nSize = nSize;
176  return p;
177 }
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecVec.h:145
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83