From 477ecc172f3d9088bf6ecd21044b9d1c758d7b64 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 21 Jul 2015 17:42:49 -0700 Subject: Renaming Cba into Bac. --- src/misc/vec/vecInt.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/misc/vec') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index e18b4616..c84fd01c 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -1939,6 +1939,27 @@ static inline void Vec_IntAppendSkip( Vec_Int_t * vVec1, Vec_Int_t * vVec2, int Vec_IntPush( vVec1, Entry ); } +/**Function************************************************************* + + Synopsis [Remapping attributes after objects were duplicated.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline void Vec_IntRemapArray( Vec_Int_t * vOld2New, Vec_Int_t * vOld, Vec_Int_t * vNew, int nNew ) +{ + int iOld, iNew; + if ( Vec_IntSize(vOld) == 0 ) + return; + Vec_IntFill( vNew, nNew, 0 ); + Vec_IntForEachEntry( vOld2New, iNew, iOld ) + if ( iNew > 0 && iNew < nNew && Vec_IntEntry(vOld, iOld) != 0 ) + Vec_IntWriteEntry( vNew, iNew, Vec_IntEntry(vOld, iOld) ); +} ABC_NAMESPACE_HEADER_END -- cgit v1.2.3