abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vecVec.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [vecVec.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Resizable arrays.]
8 
9  Synopsis [Resizable vector of resizable vectors.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: vecVec.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__misc__vec__vecVec_h
22 #define ABC__misc__vec__vecVec_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include <stdio.h>
30 
32 
33 
34 ////////////////////////////////////////////////////////////////////////
35 /// PARAMETERS ///
36 ////////////////////////////////////////////////////////////////////////
37 
38 ////////////////////////////////////////////////////////////////////////
39 /// BASIC TYPES ///
40 ////////////////////////////////////////////////////////////////////////
41 
42 typedef struct Vec_Vec_t_ Vec_Vec_t;
43 struct Vec_Vec_t_
44 {
45  int nCap;
46  int nSize;
47  void ** pArray;
48 };
49 
50 ////////////////////////////////////////////////////////////////////////
51 /// MACRO DEFINITIONS ///
52 ////////////////////////////////////////////////////////////////////////
53 
54 // iterators through levels
55 #define Vec_VecForEachLevel( vGlob, vVec, i ) \
56  for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
57 #define Vec_VecForEachLevelStart( vGlob, vVec, i, LevelStart ) \
58  for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
59 #define Vec_VecForEachLevelStop( vGlob, vVec, i, LevelStop ) \
60  for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
61 #define Vec_VecForEachLevelStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
62  for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
63 #define Vec_VecForEachLevelReverse( vGlob, vVec, i ) \
64  for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
65 #define Vec_VecForEachLevelReverseStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
66  for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
67 #define Vec_VecForEachLevelTwo( vGlob1, vGlob2, vVec1, vVec2, i ) \
68  for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntry(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntry(vGlob2, i)), 1); i++ )
69 
70 // iterators through levels
71 #define Vec_VecForEachLevelInt( vGlob, vVec, i ) \
72  for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
73 #define Vec_VecForEachLevelIntStart( vGlob, vVec, i, LevelStart ) \
74  for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
75 #define Vec_VecForEachLevelIntStop( vGlob, vVec, i, LevelStop ) \
76  for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
77 #define Vec_VecForEachLevelIntStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
78  for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
79 #define Vec_VecForEachLevelIntReverse( vGlob, vVec, i ) \
80  for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
81 #define Vec_VecForEachLevelIntReverseStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
82  for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
83 #define Vec_VecForEachLevelIntTwo( vGlob1, vGlob2, vVec1, vVec2, i ) \
84  for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntryInt(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntryInt(vGlob2, i)), 1); i++ )
85 
86 // iteratores through entries
87 #define Vec_VecForEachEntry( Type, vGlob, pEntry, i, k ) \
88  for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
89  Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
90 #define Vec_VecForEachEntryLevel( Type, vGlob, pEntry, i, Level ) \
91  Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, Level), pEntry, i )
92 #define Vec_VecForEachEntryStart( Type, vGlob, pEntry, i, k, LevelStart ) \
93  for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
94  Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
95 #define Vec_VecForEachEntryStartStop( Type, vGlob, pEntry, i, k, LevelStart, LevelStop ) \
96  for ( i = LevelStart; i < LevelStop; i++ ) \
97  Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
98 #define Vec_VecForEachEntryReverse( Type, vGlob, pEntry, i, k ) \
99  for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
100  Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
101 #define Vec_VecForEachEntryReverseReverse( Type, vGlob, pEntry, i, k ) \
102  for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
103  Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
104 #define Vec_VecForEachEntryReverseStart( Type, vGlob, pEntry, i, k, LevelStart ) \
105  for ( i = LevelStart-1; i >= 0; i-- ) \
106  Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
107 
108 // iteratores through entries
109 #define Vec_VecForEachEntryInt( vGlob, Entry, i, k ) \
110  for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
111  Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
112 #define Vec_VecForEachEntryIntLevel( vGlob, Entry, i, Level ) \
113  Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, Level), Entry, i )
114 #define Vec_VecForEachEntryIntStart( vGlob, Entry, i, k, LevelStart ) \
115  for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
116  Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
117 #define Vec_VecForEachEntryIntStartStop( vGlob, Entry, i, k, LevelStart, LevelStop ) \
118  for ( i = LevelStart; i < LevelStop; i++ ) \
119  Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
120 #define Vec_VecForEachEntryIntReverse( vGlob, Entry, i, k ) \
121  for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
122  Vec_IntForEachEntryReverse( Vec_VecEntryInt(vGlob, i), Entry, k )
123 #define Vec_VecForEachEntryIntReverseReverse( vGlob, Entry, i, k ) \
124  for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
125  Vec_IntForEachEntryReverse( Vec_VecEntryInt(vGlob, i), Entry, k )
126 #define Vec_VecForEachEntryIntReverseStart( vGlob, Entry, i, k, LevelStart ) \
127  for ( i = LevelStart-1; i >= 0; i-- ) \
128  Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
129 
130 ////////////////////////////////////////////////////////////////////////
131 /// FUNCTION DEFINITIONS ///
132 ////////////////////////////////////////////////////////////////////////
133 
134 /**Function*************************************************************
135 
136  Synopsis [Allocates a vector with the given capacity.]
137 
138  Description []
139 
140  SideEffects []
141 
142  SeeAlso []
143 
144 ***********************************************************************/
145 static inline Vec_Vec_t * Vec_VecAlloc( int nCap )
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 }
156 
157 /**Function*************************************************************
158 
159  Synopsis [Allocates a vector with the given capacity.]
160 
161  Description []
162 
163  SideEffects []
164 
165  SeeAlso []
166 
167 ***********************************************************************/
168 static inline Vec_Vec_t * Vec_VecStart( int nSize )
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 }
178 
179 /**Function*************************************************************
180 
181  Synopsis [Allocates a vector with the given capacity.]
182 
183  Description []
184 
185  SideEffects []
186 
187  SeeAlso []
188 
189 ***********************************************************************/
190 static inline void Vec_VecExpand( Vec_Vec_t * p, int Level )
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 }
200 static inline void Vec_VecExpandInt( Vec_Vec_t * p, int Level )
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 }
210 
211 /**Function*************************************************************
212 
213  Synopsis []
214 
215  Description []
216 
217  SideEffects []
218 
219  SeeAlso []
220 
221 ***********************************************************************/
222 static inline int Vec_VecSize( Vec_Vec_t * p )
223 {
224  return p->nSize;
225 }
226 
227 /**Function*************************************************************
228 
229  Synopsis []
230 
231  Description []
232 
233  SideEffects []
234 
235  SeeAlso []
236 
237 ***********************************************************************/
238 static inline int Vec_VecCap( Vec_Vec_t * p )
239 {
240  return p->nCap;
241 }
242 
243 /**Function*************************************************************
244 
245  Synopsis []
246 
247  Description []
248 
249  SideEffects []
250 
251  SeeAlso []
252 
253 ***********************************************************************/
254 static inline int Vec_VecLevelSize( Vec_Vec_t * p, int i )
255 {
256  assert( i >= 0 && i < p->nSize );
257  return Vec_PtrSize( (Vec_Ptr_t *)p->pArray[i] );
258 }
259 
260 /**Function*************************************************************
261 
262  Synopsis []
263 
264  Description []
265 
266  SideEffects []
267 
268  SeeAlso []
269 
270 ***********************************************************************/
271 static inline Vec_Ptr_t * Vec_VecEntry( Vec_Vec_t * p, int i )
272 {
273  assert( i >= 0 && i < p->nSize );
274  return (Vec_Ptr_t *)p->pArray[i];
275 }
276 static inline Vec_Int_t * Vec_VecEntryInt( Vec_Vec_t * p, int i )
277 {
278  assert( i >= 0 && i < p->nSize );
279  return (Vec_Int_t *)p->pArray[i];
280 }
281 
282 /**Function*************************************************************
283 
284  Synopsis []
285 
286  Description []
287 
288  SideEffects []
289 
290  SeeAlso []
291 
292 ***********************************************************************/
293 static inline double Vec_VecMemory( Vec_Vec_t * p )
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 }
304 static inline double Vec_VecMemoryInt( Vec_Vec_t * p )
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 }
315 
316 /**Function*************************************************************
317 
318  Synopsis []
319 
320  Description []
321 
322  SideEffects []
323 
324  SeeAlso []
325 
326 ***********************************************************************/
327 static inline void * Vec_VecEntryEntry( Vec_Vec_t * p, int i, int k )
328 {
329  return Vec_PtrEntry( Vec_VecEntry(p, i), k );
330 }
331 static inline int Vec_VecEntryEntryInt( Vec_Vec_t * p, int i, int k )
332 {
333  return Vec_IntEntry( Vec_VecEntryInt(p, i), k );
334 }
335 
336 /**Function*************************************************************
337 
338  Synopsis [Frees the vector.]
339 
340  Description []
341 
342  SideEffects []
343 
344  SeeAlso []
345 
346 ***********************************************************************/
347 static inline void Vec_VecFree( Vec_Vec_t * p )
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 }
355 
356 /**Function*************************************************************
357 
358  Synopsis []
359 
360  Description []
361 
362  SideEffects []
363 
364  SeeAlso []
365 
366 ***********************************************************************/
367 static inline void Vec_VecFreeP( Vec_Vec_t ** p )
368 {
369  if ( *p == NULL )
370  return;
371  Vec_VecFree( *p );
372  *p = NULL;
373 }
374 
375 /**Function*************************************************************
376 
377  Synopsis [Frees the vector.]
378 
379  Description []
380 
381  SideEffects []
382 
383  SeeAlso []
384 
385 ***********************************************************************/
386 static inline Vec_Vec_t * Vec_VecDup( Vec_Vec_t * p )
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 }
395 static inline Vec_Vec_t * Vec_VecDupInt( Vec_Vec_t * p )
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 }
405 
406 /**Function*************************************************************
407 
408  Synopsis [Frees the vector of vectors.]
409 
410  Description []
411 
412  SideEffects []
413 
414  SeeAlso []
415 
416 ***********************************************************************/
417 static inline int Vec_VecSizeSize( Vec_Vec_t * p )
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 }
425 
426 /**Function*************************************************************
427 
428  Synopsis []
429 
430  Description []
431 
432  SideEffects []
433 
434  SeeAlso []
435 
436 ***********************************************************************/
437 static inline void Vec_VecClear( Vec_Vec_t * p )
438 {
439  Vec_Ptr_t * vVec;
440  int i;
441  Vec_VecForEachLevel( p, vVec, i )
442  Vec_PtrClear( vVec );
443 }
444 
445 /**Function*************************************************************
446 
447  Synopsis []
448 
449  Description []
450 
451  SideEffects []
452 
453  SeeAlso []
454 
455 ***********************************************************************/
456 static inline void Vec_VecPush( Vec_Vec_t * p, int Level, void * Entry )
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 }
468 static inline void Vec_VecPushInt( Vec_Vec_t * p, int Level, int Entry )
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 }
480 
481 /**Function*************************************************************
482 
483  Synopsis []
484 
485  Description []
486 
487  SideEffects []
488 
489  SeeAlso []
490 
491 ***********************************************************************/
492 static inline void Vec_VecPushUnique( Vec_Vec_t * p, int Level, void * Entry )
493 {
494  if ( p->nSize < Level + 1 )
495  Vec_VecPush( p, Level, Entry );
496  else
497  Vec_PtrPushUnique( Vec_VecEntry(p, Level), Entry );
498 }
499 static inline void Vec_VecPushUniqueInt( Vec_Vec_t * p, int Level, int Entry )
500 {
501  if ( p->nSize < Level + 1 )
502  Vec_VecPushInt( p, Level, Entry );
503  else
504  Vec_IntPushUnique( Vec_VecEntryInt(p, Level), Entry );
505 }
506 
507 /**Function*************************************************************
508 
509  Synopsis [Comparison procedure for two arrays.]
510 
511  Description []
512 
513  SideEffects []
514 
515  SeeAlso []
516 
517 ***********************************************************************/
518 static int Vec_VecSortCompare1( Vec_Ptr_t ** pp1, Vec_Ptr_t ** pp2 )
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 }
526 static int Vec_VecSortCompare2( Vec_Ptr_t ** pp1, Vec_Ptr_t ** pp2 )
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 }
534 
535 /**Function*************************************************************
536 
537  Synopsis [Sorting the entries by their integer value.]
538 
539  Description []
540 
541  SideEffects []
542 
543  SeeAlso []
544 
545 ***********************************************************************/
546 static inline void Vec_VecSort( Vec_Vec_t * p, int fReverse )
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 }
555 
556 /**Function*************************************************************
557 
558  Synopsis [Comparison procedure for two integers.]
559 
560  Description []
561 
562  SideEffects []
563 
564  SeeAlso []
565 
566 ***********************************************************************/
567 static int Vec_VecSortCompare3( Vec_Int_t ** pp1, Vec_Int_t ** pp2 )
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 }
575 static int Vec_VecSortCompare4( Vec_Int_t ** pp1, Vec_Int_t ** pp2 )
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 }
583 
584 /**Function*************************************************************
585 
586  Synopsis [Sorting the entries by their integer value.]
587 
588  Description []
589 
590  SideEffects []
591 
592  SeeAlso []
593 
594 ***********************************************************************/
595 static inline void Vec_VecSortByFirstInt( Vec_Vec_t * p, int fReverse )
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 }
604 
605 /**Function*************************************************************
606 
607  Synopsis []
608 
609  Description []
610 
611  SideEffects []
612 
613  SeeAlso []
614 
615 ***********************************************************************/
616 static inline void Vec_VecPrintInt( Vec_Vec_t * p, int fSkipSingles )
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 }
630 
632 
633 #endif
634 
635 ////////////////////////////////////////////////////////////////////////
636 /// END OF FILE ///
637 ////////////////////////////////////////////////////////////////////////
638 
static int Vec_VecSortCompare2(Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
Definition: vecVec.h:526
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecVec.h:55
static int Vec_VecSortCompare4(Vec_Int_t **pp1, Vec_Int_t **pp2)
Definition: vecVec.h:575
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
int nSize
Definition: vecVec.h:46
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
Definition: vecVec.h:456
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecVec.h:145
static void Vec_VecSort(Vec_Vec_t *p, int fReverse)
Definition: vecVec.h:546
static double Vec_IntMemory(Vec_Int_t *p)
Definition: vecInt.h:384
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 double Vec_VecMemoryInt(Vec_Vec_t *p)
Definition: vecVec.h:304
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 int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:656
int nCap
Definition: vecVec.h:45
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
Definition: vecVec.h:71
static void * Vec_VecEntryEntry(Vec_Vec_t *p, int i, int k)
Definition: vecVec.h:327
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static Vec_Ptr_t * Vec_PtrDup(Vec_Ptr_t *pVec)
Definition: vecPtr.h:169
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
#define Vec_VecForEachEntryInt(vGlob, Entry, i, k)
Definition: vecVec.h:109
static void Vec_VecPushUniqueInt(Vec_Vec_t *p, int Level, int Entry)
Definition: vecVec.h:499
static void Vec_VecClear(Vec_Vec_t *p)
Definition: vecVec.h:437
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
Definition: bblif.c:336
static Vec_Vec_t * Vec_VecDupInt(Vec_Vec_t *p)
Definition: vecVec.h:395
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
Definition: vecVec.h:468
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Vec_VecEntryEntryInt(Vec_Vec_t *p, int i, int k)
Definition: vecVec.h:331
static void Vec_VecPrintInt(Vec_Vec_t *p, int fSkipSingles)
Definition: vecVec.h:616
static void Vec_VecSortByFirstInt(Vec_Vec_t *p, int fReverse)
Definition: vecVec.h:595
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Counter
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
static Vec_Vec_t * Vec_VecStart(int nSize)
Definition: vecVec.h:168
static int Vec_VecLevelSize(Vec_Vec_t *p, int i)
Definition: vecVec.h:254
static int Vec_VecCap(Vec_Vec_t *p)
Definition: vecVec.h:238
void ** pArray
Definition: vecVec.h:47
static double Vec_PtrMemory(Vec_Ptr_t *p)
Definition: vecPtr.h:327
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
static int Vec_VecSortCompare3(Vec_Int_t **pp1, Vec_Int_t **pp2)
Definition: vecVec.h:567
static void Vec_VecExpandInt(Vec_Vec_t *p, int Level)
Definition: vecVec.h:200
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static Vec_Vec_t * Vec_VecDup(Vec_Vec_t *p)
Definition: vecVec.h:386
static void Vec_VecExpand(Vec_Vec_t *p, int Level)
Definition: vecVec.h:190
static int Vec_VecSizeSize(Vec_Vec_t *p)
Definition: vecVec.h:417
static int Vec_VecSize(Vec_Vec_t *p)
Definition: vecVec.h:222
static void Vec_VecFreeP(Vec_Vec_t **p)
Definition: vecVec.h:367
#define assert(ex)
Definition: util_old.h:213
static void Vec_PtrClear(Vec_Ptr_t *p)
Definition: vecPtr.h:545
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
Definition: vecInt.h:832
static int Vec_VecSortCompare1(Vec_Ptr_t **pp1, Vec_Ptr_t **pp2)
Definition: vecVec.h:518
static double Vec_VecMemory(Vec_Vec_t *p)
Definition: vecVec.h:293
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
static void Vec_VecPushUnique(Vec_Vec_t *p, int Level, void *Entry)
Definition: vecVec.h:492