![JAR search and dependency download from the Maven repository](/logo.png)
org.eclipse.elk.alg.mrtree.p3place.NodePlacer.class Maven / Gradle / Ivy
???? 7O -org/eclipse/elk/alg/mrtree/p3place/NodePlacer java/lang/Object %org/eclipse/elk/core/alg/ILayoutPhase INTERMEDIATE_PROCESSING_CONFIG 7Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; Signature ?Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; spacing D xTopAdjustment yTopAdjustment direction (Lorg/eclipse/elk/core/options/Direction; ()V Code
5org/eclipse/elk/core/alg/LayoutProcessorConfiguration create 9()Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; +org/eclipse/elk/alg/mrtree/TreeLayoutPhases P2_NODE_ORDERING -Lorg/eclipse/elk/alg/mrtree/TreeLayoutPhases; ! # " Eorg/eclipse/elk/alg/mrtree/intermediate/IntermediateProcessorStrategy $ % ROOT_PROC GLorg/eclipse/elk/alg/mrtree/intermediate/IntermediateProcessorStrategy;
' ( ) addBefore {(Ljava/lang/Enum;Lorg/eclipse/elk/core/alg/ILayoutProcessorFactory;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; + , P3_NODE_PLACEMENT
. / 0 before I(Ljava/lang/Enum;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; ! 2 3 % LEVEL_HEIGHT
5 6 7 add k(Lorg/eclipse/elk/core/alg/ILayoutProcessorFactory;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; ! 9 : % NEIGHBORS_PROC < = P4_EDGE_ROUTING ! ? @ % DIRECTION_PROC ! B C % NODE_POSITION_PROC E LineNumberTable LocalVariableTable
J H L
N this /Lorg/eclipse/elk/alg/mrtree/p3place/NodePlacer; getLayoutProcessorConfiguration b(Lorg/eclipse/elk/alg/mrtree/graph/TGraph;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; ?(Lorg/eclipse/elk/alg/mrtree/graph/TGraph;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration; graph )Lorg/eclipse/elk/alg/mrtree/graph/TGraph; process [(Lorg/eclipse/elk/alg/mrtree/graph/TGraph;Lorg/eclipse/elk/core/util/IElkProgressMonitor;)V Y Processor order nodes [ ] \ -org/eclipse/elk/core/util/IElkProgressMonitor ^ _ begin (Ljava/lang/String;F)Z a c b 0org/eclipse/elk/alg/mrtree/options/MrTreeOptions d e SPACING_NODE_NODE ,Lorg/eclipse/elk/graph/properties/IProperty;
g i h 'org/eclipse/elk/alg/mrtree/graph/TGraph j k getProperty @(Lorg/eclipse/elk/graph/properties/IProperty;)Ljava/lang/Object; m java/lang/Double
l o p q doubleValue ()D s a u v e DIRECTION x &org/eclipse/elk/core/options/Direction z w | } UNDEFINED w ? DOWN
g ? ? ? setProperty t(Lorg/eclipse/elk/graph/properties/IProperty;Ljava/lang/Object;)Lorg/eclipse/elk/graph/properties/MapPropertyHolder; ? java/util/LinkedList
? J
g ? ? ? getNodes ()Ljava/util/List; ? ? ? java/util/List ? ? iterator ()Ljava/util/Iterator; ? ? ? java/util/Iterator ? ? next ()Ljava/lang/Object; ? &org/eclipse/elk/alg/mrtree/graph/TNode ? ? ? 5org/eclipse/elk/alg/mrtree/options/InternalProperties ? e ROOT
? i ? java/lang/Boolean
? ? ? ? booleanValue ()Z
? ? 6 ? (Ljava/lang/Object;)Z ? ? ? ? hasNext
? ? ? ? getFirst
? ? ? firstWalk ,(Lorg/eclipse/elk/alg/mrtree/graph/TNode;I)V [ ? ? ? worked (F)V ? ? ? e LEVELHEIGHT@
? ? ?
secondWalk -(Lorg/eclipse/elk/alg/mrtree/graph/TNode;DD)V [ ? ? done tGraph progressMonitor /Lorg/eclipse/elk/core/util/IElkProgressMonitor; roots Ljava/util/LinkedList; tNode (Lorg/eclipse/elk/alg/mrtree/graph/TNode; root LocalVariableTypeTable @Ljava/util/LinkedList;
StackMapTable ? ? ? e MODIFIER
l ? ? ? valueOf (D)Ljava/lang/Double;
? ? ? ? ? e LEFTSIBLING
? ? ? ? isLeaf ? ? ? e PRELIM
? ? ?
meanNodeWidth S(Lorg/eclipse/elk/alg/mrtree/graph/TNode;Lorg/eclipse/elk/alg/mrtree/graph/TNode;)D
? ? ? ? getChildren ()Ljava/lang/Iterable; ? ? ? java/lang/Iterable
? ? ? #com/google/common/collect/Iterables ? ? :(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;
? ? ? ? getLast
? ? ? apportion cN level I lS p child lM rM midPoint ? ? e LEFTNEIGHBOR
? getParent *()Lorg/eclipse/elk/alg/mrtree/graph/TNode;
#org/eclipse/elk/alg/mrtree/TreeUtil
getLeftMost ?(Ljava/lang/Iterable;I)Lorg/eclipse/elk/alg/mrtree/graph/TNode; leftmost neighbor compareDepth
leftModSum rightModSum ancestorLeftmost ancestorNeighbor i prN prL mean moveDistance leftSibling leftSiblings portion newPr newMod
w ?
isVertical
? !" getSize %()Lorg/eclipse/elk/core/math/KVector; $&% !org/eclipse/elk/core/math/KVector' x $)* y leftNode rightNode nodeWidth ?/0 e XCOOR
243 java/lang/Math56 round (D)J
8:9 java/lang/Integer ?; (I)Ljava/lang/Integer; ?=> e YCOOR ?@A e RIGHTSIBLING yCoor modsum xTemp yTemp D(Ljava/lang/Object;Lorg/eclipse/elk/core/util/IElkProgressMonitor;)V
H V W K(Ljava/lang/Object;)Lorg/eclipse/elk/core/alg/LayoutProcessorConfiguration;
K Q R
SourceFile NodePlacer.java ?Ljava/lang/Object;Lorg/eclipse/elk/core/alg/ILayoutPhase; !
x 4? ? ? ? &? *? -? 1? 4? 8? 4? ;? -? >? 4? A? 4? D? F *
D E F G H I $ J * K 0 C 3 K G H E *? I*? K*? M? F @ P Q @ G O P Q R S 8 ? D? F Z G O P T U V W ? ?,X
? Z W*+? `? f? l? n? r*+? t? f? w? y*? y? {? *? ~? y+? t*? y? ?W? ?Y? ?N+? ?? ? :? '? ? ? ?:? ?? ?? ?? ??
-? ?W? ? ???-? ?? ?:*? ?,? ? **? M? ?? ?? l? n ?og*? K? ?,? ? ,? ? ? F J a
d e ) h 3 i : j F n N o h p y q ? o ? t ? w ? x ? { ? | ? ~ ? G > ? O P ? ? U ? ? ? N ? ? ? h ? ? ? = ? ? ? N ? ? ? ? ? F? g [ ? ? # ? ? P
$+? ?? Ѷ ?W+? ֶ ?? ?N+? ٙ A-? .-? ܶ ?? l? n*? rc*-+? ?c9+? ?? Ѷ ?W? ?+? ?? Ѷ ?W? ?+? ? ? :? ? ? ? ?:*`? ?? ? ???+? ?? ?? ?:+? ?? ?? ?:? ܶ ?? l? n? ܶ ?? l? nc ?o9-? O-? ܶ ?? l? n*? rc*-+? ?c9+? ?? Ѷ ?W+? ?+? ܶ ?? l? ng? Ѷ ?W*+? ? +? ?? Ѷ ?W? F n ? ? ? ? " ? = ? J ? M ? Y ? \ ? v ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ?# ? G f
$ O P $ ? ? $ ? ?
? ? =
? v ? ? ? ? ? ? ? ? ? ? ? ] ? ? . ? ? : ? M ??
? ? ? ? ? ? ? ? ? ? ? ? ? ?+? ?? ?? ?N-? -? ?? ?? ?? :6?h99-:
:6? :
?:
?:
? ζ ?? l? nc9? ζ ?? l? nc9????? ܶ ?? l? n9-? ܶ ?? l? n9*-? ?9c*? rccgg9?? ?+:6? ?? ֶ ?? ?:?
???? q?o9+:? Y? ܶ ?? l? nc9? ?? Ѷ ?W? ζ ?? l? nc9? ?? Ѷ ?Wg9? ֶ ?? ?:???? ??-? ٙ +? ??N? -? ?? ?? ?N-? -? ?? ?? ?? :-? ???? F ? . ? ? ? # ? &