ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Rewire Namespace Reference

Classes

class  Miaig
 
struct  Miaig_Data
 

Functions

vimoveVecToVi (Vec_Int_t *v)
 
void randomAddBest (std::vector< Miaig > &pBests, Miaig pNew, int nBestSave, Gia_ChMan_t *pChMan)
 
Miaig randomRead (std::vector< Miaig > &pBests)
 
Miaig randomReadExcept (std::vector< Miaig > &pBests, Miaig &pExcept)
 

Function Documentation

◆ moveVecToVi()

vi * Rewire::moveVecToVi ( Vec_Int_t * v)

Definition at line 243 of file rewire_miaig.cpp.

243 {
244 vi *p = (vi *)malloc(sizeof(vi));
245 p->size = Vec_IntSize(v);
246 p->cap = Vec_IntCap(v);
247 p->ptr = Vec_IntArray(v);
248 free(v);
249 return p;
250}
Cube * p
Definition exorList.c:222
struct vi_ vi
VOID_HACK free()
char * malloc()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomAddBest()

void Rewire::randomAddBest ( std::vector< Miaig > & pBests,
Miaig pNew,
int nBestSave,
Gia_ChMan_t * pChMan )

Definition at line 1218 of file rewire_miaig.cpp.

1218 {
1219 if ( pChMan ) {
1220 Gia_Man_t * pGia = pNew.toGia();
1221 Gia_ManDupChoicesAdd(pChMan, pGia);
1222 Gia_ManStop( pGia );
1223 }
1224 if (pBests.size() < nBestSave) {
1225 pBests.push_back(pNew);
1226 } else {
1227 int iNum = Random_Num(0) % nBestSave;
1228 pBests[iNum] = pNew;
1229 }
1230}
Gia_Man_t * toGia(void)
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
void Gia_ManDupChoicesAdd(Gia_ChMan_t *pMan, Gia_Man_t *pGia)
Definition giaDup.c:6411
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
unsigned Random_Num(int Seed)
Definition rewire_rng.c:43
Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomRead()

Miaig Rewire::randomRead ( std::vector< Miaig > & pBests)

Definition at line 1232 of file rewire_miaig.cpp.

1232 {
1233 return pBests[Random_Num(0) % pBests.size()];
1234}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomReadExcept()

Miaig Rewire::randomReadExcept ( std::vector< Miaig > & pBests,
Miaig & pExcept )

Definition at line 1236 of file rewire_miaig.cpp.

1236 {
1237 int iNum = Random_Num(0) % pBests.size();
1238 return (pBests[iNum] == pExcept) ? pBests[(iNum + 1) % pBests.size()] : pBests[iNum];
1239}
Here is the call graph for this function:
Here is the caller graph for this function: