Download project. The report

Transcript
133
340
libcrdb/src/luellau circuit.cc
}
debug ( " Device Vertex Matching : "
" We will guess that % s corresponds to % s .\ n " ,
that −> s t a r t i n g _ d e v i c e _ v e r t e x −> name . c_str ( ) ,
dv_match −> name . c_str ( ) ) ;
net_stack . clear ( ) ;
device_stack . clear ( ) ;
/* put it on the device vertex stack */
device_stack . push_front ( that −> s t a r t i n g _ d e v i c e _ v e r t e x ) ;
350
360
370
380
/* mark the correspondence */
assert ( ! that −> s t a r t i n g _ d e v i c e _ v e r t e x −> assigned ) ;
assert ( ! dv_match −> assigned ) ;
that −> s t a r t i n g _ d e v i c e _ v e r t e x −> matches = dv_match ;
that −> s t a r t i n g _ d e v i c e _ v e r t e x −> assigned = true ;
dv_match −> matches = that −> s t a r t i n g _ d e v i c e _ v e r t e x ;
dv_match −> assigned = true ;
rc = D e t e r m i n i s t i c _ M a t c h i n g ( ) ;
debug ( " Device Vertex Matching : "
" % s corresponds to % s : " ,
that −> s t a r t i n g _ d e v i c e _ v e r t e x −> name . c_str ( ) ,
dv_match −> name . c_str ( ) ) ;
switch ( rc )
{
case OK :
debug ( " yes !\ n " ) ;
break ;
case NO_UNIQUE_EDGES :
cant = true ;
/* can ’t do it . fall through */
case C O M P A R I S O N _ C O N F L I C T :
debug ( " no !\ n " ) ;
t h i s −> Ma n i p u l a t e _ F l a g s ( C L E A R _ U N F I N A L I S E D ) ;
that −> Ma n i p u l a t e _ F l a g s ( C L E A R _ U N F I N A L I S E D ) ;
break ;
}
}
} else {
/* Starting at a net vertex */
/* The start net vertex is guaranteed to be closed ,
* so we don ’t need to worry about matching open net vertices ,
* which is hard .
*/
Net_Vertex_List
corresponds =
n e t _ l i s t_ b y _ w e i g h t [ that −> s t a r t i n g _ n e t _ v e r t e x −> weight ] ;
Net_Vertex_List : : iterator
nvi ;
f o r ( nvi = corresponds . begin ( ) ;
( nvi ! = corresponds . end ( ) ) & & ( rc ! = OK ) ; nvi ++ )
{
Net_Vertex ∗ nv_match = ( ∗ nvi ) ;
390
i f ( nv_match −> assigned )
{
continue ;
}
debug ( " Net Vertex Matching : "
" We will guess that % d corresponds to % d .\ n " ,
that −> s t a r t i n g _ n e t _ v e r t e x −> number ,
nv_match −> number ) ;
400
net_stack . clear ( ) ;
device_stack . clear ( ) ;
/* put it on the net vertex stack */
net_stack . push_front ( that −> s t a r t i n g _ n e t _ v e r t e x ) ;
410
/* mark the correspondence */
assert ( ! that −> s t a r t i n g _ n e t _ v e r t e x −> assigned ) ;
assert ( ! nv_match −> assigned ) ;
that −> s t a r t i n g _ n e t _ v e r t e x −> matches = nv_match ;
that −> s t a r t i n g _ n e t _ v e r t e x −> assigned = true ;
nv_match −> matches = that −> s t a r t i n g _ n e t _ v e r t e x ;
nv_match −> assigned = true ;
Project Source Code