Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPSL
LMD
DPAO
Detection eddies
Commits
044f30a8
Commit
044f30a8
authored
1 year ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Polish
parent
7adff23e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trajectories/trajectories.py
+6
-6
6 additions, 6 deletions
Trajectories/trajectories.py
with
6 additions
and
6 deletions
Trajectories/trajectories.py
+
6
−
6
View file @
044f30a8
...
...
@@ -66,18 +66,18 @@ for n in topology.topological_sort(g):
# Find the index of the closest direct predecessor of a node:
# head of the in-edge with smallest cost.
all_cost
=
g
.
get_in_edges
(
n
,
eprops
=
[
g
.
e
dge_properties
.
cost_function
])
all_cost
=
g
.
get_in_edges
(
n
,
eprops
=
[
g
.
e
p
.
cost_function
])
# numpy array with dtype float64
i_min
=
all_cost
[:,
2
].
argmin
()
closest_pred
=
all_cost
[
i_min
,
0
]
if
closest_succ
[
closest_pred
]
==
n
:
# Assign to n the trajectory of closest_pred. This
means
# updating
ind_traj,
traj_prop and
# traj_vert_ind. closest_pred is already in a
trajectory,
# traj_prop[closest_pred]] != - 1. We
extend the
# trajectory of closest_pred forward.
# Assign to n the trajectory of closest_pred. This
#
means
updating traj_prop and
# traj_vert_ind. closest_pred is already in a
#
trajectory,
traj_prop[closest_pred]] != - 1. We
#
extend the
trajectory of closest_pred forward.
traj_prop
[
n
]
=
traj_prop
[
closest_pred
]
traj_vert_ind
[
traj_prop
[
n
]].
append
(
n
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment