src/opt/fxu/fxuList.c File Reference

#include "fxuInt.h"
Include dependency graph for fxuList.c:

Go to the source code of this file.

Functions

void Fxu_ListMatrixAddVariable (Fxu_Matrix *p, Fxu_Var *pLink)
void Fxu_ListMatrixDelVariable (Fxu_Matrix *p, Fxu_Var *pLink)
void Fxu_ListMatrixAddCube (Fxu_Matrix *p, Fxu_Cube *pLink)
void Fxu_ListMatrixDelCube (Fxu_Matrix *p, Fxu_Cube *pLink)
void Fxu_ListMatrixAddSingle (Fxu_Matrix *p, Fxu_Single *pLink)
void Fxu_ListMatrixDelSingle (Fxu_Matrix *p, Fxu_Single *pLink)
void Fxu_ListTableAddDivisor (Fxu_Matrix *p, Fxu_Double *pLink)
void Fxu_ListTableDelDivisor (Fxu_Matrix *p, Fxu_Double *pLink)
void Fxu_ListCubeAddLiteral (Fxu_Cube *pCube, Fxu_Lit *pLink)
void Fxu_ListCubeDelLiteral (Fxu_Cube *pCube, Fxu_Lit *pLink)
void Fxu_ListVarAddLiteral (Fxu_Var *pVar, Fxu_Lit *pLink)
void Fxu_ListVarDelLiteral (Fxu_Var *pVar, Fxu_Lit *pLink)
void Fxu_ListDoubleAddPairLast (Fxu_Double *pDiv, Fxu_Pair *pLink)
void Fxu_ListDoubleAddPairFirst (Fxu_Double *pDiv, Fxu_Pair *pLink)
void Fxu_ListDoubleAddPairMiddle (Fxu_Double *pDiv, Fxu_Pair *pSpot, Fxu_Pair *pLink)
void Fxu_ListDoubleDelPair (Fxu_Double *pDiv, Fxu_Pair *pLink)
void Fxu_ListDoubleAddPairPlace (Fxu_Double *pDiv, Fxu_Pair *pPair, Fxu_Pair *pPairSpot)

Function Documentation

void Fxu_ListCubeAddLiteral ( Fxu_Cube pCube,
Fxu_Lit pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 280 of file fxuList.c.

00281 {
00282         Fxu_ListLit * pList = &(pCube->lLits);
00283         if ( pList->pHead == NULL )
00284         {
00285                 pList->pHead = pLink;
00286                 pList->pTail = pLink;
00287                 pLink->pHPrev = NULL;
00288                 pLink->pHNext = NULL;
00289         }
00290         else
00291         {
00292                 pLink->pHNext = NULL;
00293                 pList->pTail->pHNext = pLink;
00294                 pLink->pHPrev = pList->pTail;
00295                 pList->pTail = pLink;
00296         }
00297         pList->nItems++;
00298 }

void Fxu_ListCubeDelLiteral ( Fxu_Cube pCube,
Fxu_Lit pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 311 of file fxuList.c.

00312 {
00313         Fxu_ListLit * pList = &(pCube->lLits);
00314         if ( pList->pHead == pLink )
00315                  pList->pHead = pLink->pHNext;
00316         if ( pList->pTail == pLink )
00317                  pList->pTail = pLink->pHPrev;
00318         if ( pLink->pHPrev )
00319                  pLink->pHPrev->pHNext = pLink->pHNext;
00320         if ( pLink->pHNext )
00321                  pLink->pHNext->pHPrev = pLink->pHPrev;
00322         pList->nItems--;
00323 }

void Fxu_ListDoubleAddPairFirst ( Fxu_Double pDiv,
Fxu_Pair pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 430 of file fxuList.c.

00431 {
00432         Fxu_ListPair * pList = &pDiv->lPairs;
00433         if ( pList->pHead == NULL )
00434         {
00435                 pList->pHead = pLink;
00436                 pList->pTail = pLink;
00437                 pLink->pDPrev = NULL;
00438                 pLink->pDNext = NULL;
00439         }
00440         else
00441         {
00442                 pLink->pDPrev = NULL;
00443                 pList->pHead->pDPrev = pLink;
00444                 pLink->pDNext = pList->pHead;
00445                 pList->pHead = pLink;
00446         }
00447         pList->nItems++;
00448 }

void Fxu_ListDoubleAddPairLast ( Fxu_Double pDiv,
Fxu_Pair pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 399 of file fxuList.c.

00400 {
00401         Fxu_ListPair * pList = &pDiv->lPairs;
00402         if ( pList->pHead == NULL )
00403         {
00404                 pList->pHead = pLink;
00405                 pList->pTail = pLink;
00406                 pLink->pDPrev = NULL;
00407                 pLink->pDNext = NULL;
00408         }
00409         else
00410         {
00411                 pLink->pDNext = NULL;
00412                 pList->pTail->pDNext = pLink;
00413                 pLink->pDPrev = pList->pTail;
00414                 pList->pTail = pLink;
00415         }
00416         pList->nItems++;
00417 }

void Fxu_ListDoubleAddPairMiddle ( Fxu_Double pDiv,
Fxu_Pair pSpot,
Fxu_Pair pLink 
)

Function*************************************************************

Synopsis [Adds the entry in the middle of the list after the spot.]

Description [Assumes that spot points to the link, after which the given link should be added. Spot cannot be NULL or the tail of the list. Therefore, the head and the tail of the list are not changed.]

SideEffects []

SeeAlso []

Definition at line 463 of file fxuList.c.

00464 {
00465         Fxu_ListPair * pList = &pDiv->lPairs;
00466         assert( pSpot );
00467         assert( pSpot != pList->pTail );
00468         pLink->pDPrev = pSpot;
00469         pLink->pDNext = pSpot->pDNext;
00470         pLink->pDPrev->pDNext = pLink;
00471         pLink->pDNext->pDPrev = pLink;
00472         pList->nItems++;
00473 }

void Fxu_ListDoubleAddPairPlace ( Fxu_Double pDiv,
Fxu_Pair pPair,
Fxu_Pair pPairSpot 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 511 of file fxuList.c.

00512 {
00513         printf( "Fxu_ListDoubleAddPairPlace() is called!\n" );
00514 }

void Fxu_ListDoubleDelPair ( Fxu_Double pDiv,
Fxu_Pair pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 486 of file fxuList.c.

00487 {
00488         Fxu_ListPair * pList = &pDiv->lPairs;
00489         if ( pList->pHead == pLink )
00490                  pList->pHead = pLink->pDNext;
00491         if ( pList->pTail == pLink )
00492                  pList->pTail = pLink->pDPrev;
00493         if ( pLink->pDPrev )
00494                  pLink->pDPrev->pDNext = pLink->pDNext;
00495         if ( pLink->pDNext )
00496                  pLink->pDNext->pDPrev = pLink->pDPrev;
00497         pList->nItems--;
00498 }

void Fxu_ListMatrixAddCube ( Fxu_Matrix p,
Fxu_Cube pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 101 of file fxuList.c.

00102 {
00103         Fxu_ListCube * pList = &p->lCubes;
00104         if ( pList->pHead == NULL )
00105         {
00106                 pList->pHead = pLink;
00107                 pList->pTail = pLink;
00108                 pLink->pPrev = NULL;
00109                 pLink->pNext = NULL;
00110         }
00111         else
00112         {
00113                 pLink->pNext = NULL;
00114                 pList->pTail->pNext = pLink;
00115                 pLink->pPrev = pList->pTail;
00116                 pList->pTail = pLink;
00117         }
00118         pList->nItems++;
00119 }

void Fxu_ListMatrixAddSingle ( Fxu_Matrix p,
Fxu_Single pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 160 of file fxuList.c.

00161 {
00162         Fxu_ListSingle * pList = &p->lSingles;
00163         if ( pList->pHead == NULL )
00164         {
00165                 pList->pHead = pLink;
00166                 pList->pTail = pLink;
00167                 pLink->pPrev = NULL;
00168                 pLink->pNext = NULL;
00169         }
00170         else
00171         {
00172                 pLink->pNext = NULL;
00173                 pList->pTail->pNext = pLink;
00174                 pLink->pPrev = pList->pTail;
00175                 pList->pTail = pLink;
00176         }
00177         pList->nItems++;
00178 }

void Fxu_ListMatrixAddVariable ( Fxu_Matrix p,
Fxu_Var pLink 
)

CFile****************************************************************

FileName [fxuList.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Operations on lists.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id
fxuList.c,v 1.0 2003/02/01 00:00:00 alanmi Exp

] DECLARATIONS /// FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 42 of file fxuList.c.

00043 {
00044         Fxu_ListVar * pList = &p->lVars;
00045         if ( pList->pHead == NULL )
00046         {
00047                 pList->pHead = pLink;
00048                 pList->pTail = pLink;
00049                 pLink->pPrev = NULL;
00050                 pLink->pNext = NULL;
00051         }
00052         else
00053         {
00054                 pLink->pNext = NULL;
00055                 pList->pTail->pNext = pLink;
00056                 pLink->pPrev = pList->pTail;
00057                 pList->pTail = pLink;
00058         }
00059         pList->nItems++;
00060 }

void Fxu_ListMatrixDelCube ( Fxu_Matrix p,
Fxu_Cube pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 132 of file fxuList.c.

00133 {
00134         Fxu_ListCube * pList = &p->lCubes;
00135         if ( pList->pHead == pLink )
00136                  pList->pHead = pLink->pNext;
00137         if ( pList->pTail == pLink )
00138                  pList->pTail = pLink->pPrev;
00139         if ( pLink->pPrev )
00140                  pLink->pPrev->pNext = pLink->pNext;
00141         if ( pLink->pNext )
00142                  pLink->pNext->pPrev = pLink->pPrev;
00143         pList->nItems--;
00144 }

void Fxu_ListMatrixDelSingle ( Fxu_Matrix p,
Fxu_Single pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 191 of file fxuList.c.

00192 {
00193         Fxu_ListSingle * pList = &p->lSingles;
00194         if ( pList->pHead == pLink )
00195                  pList->pHead = pLink->pNext;
00196         if ( pList->pTail == pLink )
00197                  pList->pTail = pLink->pPrev;
00198         if ( pLink->pPrev )
00199                  pLink->pPrev->pNext = pLink->pNext;
00200         if ( pLink->pNext )
00201                  pLink->pNext->pPrev = pLink->pPrev;
00202         pList->nItems--;
00203 }

void Fxu_ListMatrixDelVariable ( Fxu_Matrix p,
Fxu_Var pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 73 of file fxuList.c.

00074 {
00075         Fxu_ListVar * pList = &p->lVars;
00076         if ( pList->pHead == pLink )
00077                  pList->pHead = pLink->pNext;
00078         if ( pList->pTail == pLink )
00079                  pList->pTail = pLink->pPrev;
00080         if ( pLink->pPrev )
00081                  pLink->pPrev->pNext = pLink->pNext;
00082         if ( pLink->pNext )
00083                  pLink->pNext->pPrev = pLink->pPrev;
00084         pList->nItems--;
00085 }

void Fxu_ListTableAddDivisor ( Fxu_Matrix p,
Fxu_Double pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 219 of file fxuList.c.

00220 {
00221         Fxu_ListDouble * pList = &(p->pTable[pLink->Key]);
00222         if ( pList->pHead == NULL )
00223         {
00224                 pList->pHead = pLink;
00225                 pList->pTail = pLink;
00226                 pLink->pPrev = NULL;
00227                 pLink->pNext = NULL;
00228         }
00229         else
00230         {
00231                 pLink->pNext = NULL;
00232                 pList->pTail->pNext = pLink;
00233                 pLink->pPrev = pList->pTail;
00234                 pList->pTail = pLink;
00235         }
00236         pList->nItems++;
00237     p->nDivs++;
00238 }

void Fxu_ListTableDelDivisor ( Fxu_Matrix p,
Fxu_Double pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file fxuList.c.

00252 {
00253         Fxu_ListDouble * pList = &(p->pTable[pLink->Key]);
00254         if ( pList->pHead == pLink )
00255                  pList->pHead = pLink->pNext;
00256         if ( pList->pTail == pLink )
00257                  pList->pTail = pLink->pPrev;
00258         if ( pLink->pPrev )
00259                  pLink->pPrev->pNext = pLink->pNext;
00260         if ( pLink->pNext )
00261                  pLink->pNext->pPrev = pLink->pPrev;
00262         pList->nItems--;
00263     p->nDivs--;
00264 }

void Fxu_ListVarAddLiteral ( Fxu_Var pVar,
Fxu_Lit pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 339 of file fxuList.c.

00340 {
00341         Fxu_ListLit * pList = &(pVar->lLits);
00342         if ( pList->pHead == NULL )
00343         {
00344                 pList->pHead = pLink;
00345                 pList->pTail = pLink;
00346                 pLink->pVPrev = NULL;
00347                 pLink->pVNext = NULL;
00348         }
00349         else
00350         {
00351                 pLink->pVNext = NULL;
00352                 pList->pTail->pVNext = pLink;
00353                 pLink->pVPrev = pList->pTail;
00354                 pList->pTail = pLink;
00355         }
00356         pList->nItems++;
00357 }

void Fxu_ListVarDelLiteral ( Fxu_Var pVar,
Fxu_Lit pLink 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 370 of file fxuList.c.

00371 {
00372         Fxu_ListLit * pList = &(pVar->lLits);
00373         if ( pList->pHead == pLink )
00374                  pList->pHead = pLink->pVNext;
00375         if ( pList->pTail == pLink )
00376                  pList->pTail = pLink->pVPrev;
00377         if ( pLink->pVPrev )
00378                  pLink->pVPrev->pVNext = pLink->pVNext;
00379         if ( pLink->pVNext )
00380                  pLink->pVNext->pVPrev = pLink->pVPrev;
00381         pList->nItems--;
00382 }


Generated on Tue Jan 5 12:19:26 2010 for abc70930 by  doxygen 1.6.1