diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-07-16 20:33:03 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-07-16 20:33:03 -0700 |
commit | 22d9b1d38b27a6a4c4f4b3b8f489704eed943351 (patch) | |
tree | 0ea1d88db0bf7f79663ca6742342b046bdeb51d7 /src/base/acb | |
parent | ba063a1b557a548cbedd963f6bcdf176df14ee8e (diff) | |
download | abc-22d9b1d38b27a6a4c4f4b3b8f489704eed943351.tar.gz abc-22d9b1d38b27a6a4c4f4b3b8f489704eed943351.tar.bz2 abc-22d9b1d38b27a6a4c4f4b3b8f489704eed943351.zip |
Experiment with structural similarity.
Diffstat (limited to 'src/base/acb')
-rw-r--r-- | src/base/acb/acbFunc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/base/acb/acbFunc.c b/src/base/acb/acbFunc.c index 565dbb06..4d7df1b5 100644 --- a/src/base/acb/acbFunc.c +++ b/src/base/acb/acbFunc.c @@ -825,6 +825,21 @@ void Vec_IntPermute( Vec_Int_t * p ) } } +void Vec_IntPermute2( Vec_Int_t * p ) +{ + int i, nSize = Vec_IntSize( p ); + int * pArray = Vec_IntArray( p ); + srand( time(NULL) ); + for ( i = 0; i < nSize-1; i++ ) + { + if ( rand() % 3 == 0 ) + { + printf( "Permuting %d and %d\n", i, i+1 ); + ABC_SWAP( int, pArray[i], pArray[i+1] ); + } + } +} + void Acb_PrintPatterns( Vec_Wrd_t * vPats, int nPats, Vec_Int_t * vWeights ) { int i, k, Entry, nDivs = Vec_IntSize(vWeights); |