Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
1e254ca7
Commit
1e254ca7
authored
Feb 16, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addition of method to get predecessors of nodes
parent
30df67c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
dream/plugins/plugin.py
dream/plugins/plugin.py
+10
-0
No files found.
dream/plugins/plugin.py
View file @
1e254ca7
...
...
@@ -41,6 +41,16 @@ class InputPreparationPlugin(Plugin):
}
return
data
# returns the predecessors of a node
def
findPredecessors
(
self
,
data
,
node_id
):
predecessors
=
[]
from
copy
import
copy
edges
=
copy
(
data
[
'graph'
][
'edge'
])
for
edge_id
,
edge
in
edges
.
iteritems
():
if
edge
[
'destination'
]
==
node_id
:
predecessors
.
append
(
edge
[
'source'
])
return
predecessors
class
OutputPreparationPlugin
(
Plugin
):
def
postprocess
(
self
,
data
):
"""Postprocess the data after simulation run.
...
...
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