abc/src/opt/fxu/fxuMatrix.c
/**Function*************************************************************

  Synopsis    [Adds a variable to the matrix.]

  Description [This procedure always adds variables at the end of the matrix.
  It assigns the var's node and number. It adds the var to the linked list of
  all variables and to the table of all nodes.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Adds a variable to the matrix.]

Description [This procedure always adds variables at the end of the matrix.
It assigns the var's node and number. It adds the var to the linked list of
all variables and to the table of all nodes.]




Function Synopsis [ Adds a variable to the matrix . ] Description [ This procedure always adds variables at the end of the matrix . It assigns the var ' s node and number . It adds the var to the linked list of all variables and to the table of all nodes . ]
Fxu_Var * Fxu_MatrixAddVar( Fxu_Matrix * p )
{
    Fxu_Var * pVar;
    pVar = MEM_ALLOC_FXU( p, Fxu_Var, 1 );
    memset( pVar, 0, sizeof(Fxu_Var) );
    pVar->iVar = p->lVars.nItems;
    p->ppVars[pVar->iVar] = pVar;
    Fxu_ListMatrixAddVariable( p, pVar );
    return pVar;
}
Fxu_Var * Fxu_MatrixAddVar ( Fxu_Matrix * p ) { Fxu_Var * pVar ; pVar = MEM_ALLOC_FXU ( p , Fxu_Var , 1 ) ; memset ( pVar , 0 , sizeof ( Fxu_Var ) ) ; pVar -> iVar = p -> lVars . nItems ; p -> ppVars [ pVar -> iVar ] = pVar ; Fxu_ListMatrixAddVariable ( p , pVar ) ; return pVar ; }
Function
Synopsis    [Adds a variable to the matrix.]
Function Synopsis [ Adds a variable to the matrix . ]