From c5067f7d04dc4c8ee919d9597a4a94a5c4ac3552 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 11 Feb 2012 00:22:05 -0800 Subject: Graph isomorphism checking code. --- src/misc/vec/vecInt.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/misc/vec/vecInt.h') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index be54e583..39ab2623 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -1259,6 +1259,26 @@ static inline void Vec_IntPrint( Vec_Int_t * vVec ) printf( " }\n" ); } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_IntCompareVec( Vec_Int_t * p1, Vec_Int_t * p2 ) +{ + if ( p1 == NULL || p2 == NULL ) + return (p1 != NULL) - (p2 != NULL); + if ( Vec_IntSize(p1) != Vec_IntSize(p2) ) + return Vec_IntSize(p1) - Vec_IntSize(p2); + return memcmp( Vec_IntArray(p1), Vec_IntArray(p2), sizeof(int)*Vec_IntSize(p1) ); +} + ABC_NAMESPACE_HEADER_END -- cgit v1.2.3