Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
least_changed_path
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sander Roet
least_changed_path
Commits
f7401399
Commit
f7401399
authored
May 23, 2019
by
Sander Roet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
track full trajectories for every lcp frame
parent
e414568a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
least_changed_path/least_changed_path.py
least_changed_path/least_changed_path.py
+5
-1
No files found.
least_changed_path/least_changed_path.py
View file @
f7401399
...
...
@@ -5,6 +5,7 @@ class LeastChangedPath(object):
def
__init__
(
self
,
steps
=
None
):
self
.
steps
=
steps
self
.
_result
=
paths
.
Trajectory
()
self
.
frame_to_full_traj
=
{}
self
.
n
=
self
.
find_first_n
(
steps
)
self
.
make_results
()
...
...
@@ -50,6 +51,8 @@ class LeastChangedPath(object):
def
add_sub_trajectory
(
self
,
steps
=
None
,
old_step
=
None
,
new_step
=
None
):
if
new_step
is
None
:
sub_traj
=
paths
.
Trajectory
([
self
.
sp
(
old_step
)])
first_traj
=
self
.
steps
[
0
].
active
[
0
].
trajectory
self
.
frame_to_full_traj
[
sub_traj
[
0
]]
=
first_traj
else
:
full_traj
=
new_step
.
active
[
0
].
trajectory
new_sp
=
self
.
sp
(
new_step
)
...
...
@@ -63,7 +66,8 @@ class LeastChangedPath(object):
sub_traj
=
full_traj
[
i_old_sp
:
i_new_sp
:
-
1
]
else
:
raise
ValueError
(
"shooting point indexes are equal"
)
for
frame
in
sub_traj
:
self
.
frame_to_full_traj
[
frame
]
=
full_traj
self
.
_result
+=
sub_traj
@
property
...
...
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