Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
1002a620
Commit
1002a620
authored
May 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a0c65e6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+3
-14
No files found.
wcfs/internal/xbtree.py
View file @
1002a620
...
...
@@ -86,6 +86,7 @@ inf = float('inf')
import
numpy
as
np
import
scipy.optimize
import
copy
# Tree represents a tree node.
...
...
@@ -301,6 +302,7 @@ def Restructure(ztree, newStructure):
# extract bucket nodes.
zrbucketv
=
[]
# of _NodeInRange
rbucketv
=
[]
# of _NodeInRange
rlevelv_orig
=
copy
.
copy
(
rlevelv
)
while
len
(
rlevelv
)
>
0
or
len
(
zrlevelv
)
>
0
:
if
len
(
rlevelv
)
==
0
:
rlevel
=
[]
...
...
@@ -335,13 +337,6 @@ def Restructure(ztree, newStructure):
# associate nodes to znodes
assign
(
zrlevel
,
rlevel
)
"""
if len(zrlevel) == len(rlevel): # map 1-1
for (zrn, rn) in zip(zrlevel, rlevel):
rn.node.Z = zrn.node
else:
panic("TODO")
"""
assert
zrlevelv
==
[]
assert
rlevelv
==
[]
...
...
@@ -359,16 +354,10 @@ def Restructure(ztree, newStructure):
# associate every bucket to zbucket
assign
(
zrbucketv
,
rbucketv
)
"""
if len(zrbucketv) == len(rbucketv):
for (zrbucket, rbucket) in zip(zrbucketv, rbucketv):
rbucket.node.Z = zrbucket.node
else:
panic("TODO")
"""
# set znode states according to established tnew->znode association
rlevelv
=
rlevelv_orig
for
rnodev
in
rlevelv
:
for
rn
in
rnodev
:
node
=
rn
.
node
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment