All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.Krakatau.java.graphproxy.pyc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
?
?HRc@sfddlZddlZejZddlmZd?Zdefd??YZd?Z	d?Z
dS(	i????Ni(t	ssa_typescCstt|??t|?kS(N(tlentset(tseq((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytuniquest
BlockProxycBsPeZdd?Zd?Zd?Zd?Zd?Zd?Zd?Z	e	Z
RS(cCsg||_t|?|_||_||_g|_g|_i|_i|_|j|jf|_	dS(N(
tbkeytnexttnumtcountertblocktpredecessorst
successorstoutvarsteassignst_key(tselftkeyR	R
((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pyt__init__
s							cs??fd??t?|j?|_?fd?|jj?D?|_|jdk	r?|j???fd?|jjj?D?|_ndS(Ncs?j||?S(N(tget(tk(trmap(s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytscs%i|]\}}|?|??qS(((t.0Rtv(tupdate(s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pys
s	cs;i|]1\}}??|j|f?|j|f?qS((R(Rtbtt(td1R(s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pys
!s	(	tmapRR
titemsR
tNonet	blockdicttjumptgetSuccessorPairs(RR((RRRs?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytreplaceSuccessorss"	cCs]t|j|j?}|j|_i|j|6|_d|_|g|_|jj	|?|S(N(
RRR	tinvarsR
RR RRtappend(Rtnew((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytnewIndirect#s	cCsVt|j|j|j?}|j|_|jj?|_|j|_|j|_|S(N(	RRR	R
R$R
tcopyR R(RR&((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytnewDuplicate,s
cCsU|j?}xB|D]:}|jj|?|jj|?|ji||6?qW|S(N(R'RtremoveR%R#(RtedgesR&tparent((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pyt
indirectEdges4s
cCs)g|jD]}||jkr
|^q
S(N(RR
(Rtx((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytnormalSuccessors=scCs+|jrdnd}|j|j|j?S(NsPB {}x{}sPB {0}(RtformatR(Rtfmt((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pyt__str__@sN(t__name__t
__module__RRR#R'R)R-R/R2t__repr__(((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pyRs
									cCs?|}|rt|?st?|j|?s4t?g|D]}||j?f^q;}t|?}|j?}tjjd?|D??}g|D](}||kr?|j	|?r?|^q?}x|D]}|j
|?q?Wt|?}	x?|D]?\}
}xA|
jD]5}||	kr
|
jj
|?|jj|?q
q
W|j
|?x!|jD]}
|
jj|?qZWq?Wt|?dS(Ncss|]}|jVqdS(N(R(Rtn((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pys	Msi(RtAssertionErrort
issupersetR)tdictR(t	itertoolstchaint
from_iterabletaddR#RRR*R%Rtzip(t	reachabletscc_settnodesR6tdupstdupmapttemptinnodesR.tStoldR&tptc((s?/home/alex/projects/github/krakatau/Krakatau/java/graphproxy.pytduplicateNodesEs(%5

cCs9|jst?g|jD]$}t|jtj?d|?^q}|}d}tt	?}x?|D]?}g|j
jD]}|j^qw}x4|j
j
j?D] \}}	||jj|	?q?W|j|jkr |r?|s?t?|}|j}g|D]}
|
dk	r?|
^q?}ng|D]}|jtjkr'|^q'|_qdWi}x?|D]?}t||j?dkr?|j?}
|j|
?n|}
t||jkr?|||jtfs		9	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy