From 51a646a355c78cf0f4cf104d6316706653b24008 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 22 Jun 2015 23:05:13 -0700 Subject: Version abc90901 committer: Baruch Sterin --- src/misc/vec/vecAtt.h | 4 ++-- src/misc/vec/vecInt.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'src/misc/vec') diff --git a/src/misc/vec/vecAtt.h b/src/misc/vec/vecAtt.h index 983b7c1c..74379bf6 100644 --- a/src/misc/vec/vecAtt.h +++ b/src/misc/vec/vecAtt.h @@ -18,8 +18,8 @@ ***********************************************************************/ -#ifndef __Vec_Att_H__ -#define __Vec_Att_H__ +#ifndef __VEC_ATT_H__ +#define __VEC_ATT_H__ //////////////////////////////////////////////////////////////////////// /// INCLUDES /// diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index c3c92f09..966f5ac9 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -302,6 +302,23 @@ static inline int Vec_IntEntry( Vec_Int_t * p, int i ) return p->pArray[i]; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int * Vec_IntEntryP( Vec_Int_t * p, int i ) +{ + assert( i >= 0 && i < p->nSize ); + return p->pArray + i; +} + /**Function************************************************************* Synopsis [] @@ -762,6 +779,27 @@ static inline void Vec_IntReverseOrder( Vec_Int_t * p ) } } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline Vec_Int_t * Vec_IntInvert( Vec_Int_t * p ) +{ + Vec_Int_t * vRes; + int Entry, i; + vRes = Vec_IntStart( Vec_IntFindMax(p) + 1 ); + Vec_IntForEachEntry( p, Entry, i ) + Vec_IntWriteEntry( vRes, Entry, i ); + return vRes; +} + /**Function************************************************************* Synopsis [Comparison procedure for two integers.] -- cgit v1.2.3