Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
macroplacement
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
macroplacement
Commits
28ddc38f
Unverified
Commit
28ddc38f
authored
Nov 02, 2022
by
Zhiang Wang
Committed by
GitHub
Nov 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fd_placement.py
parent
4f950930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
CodeElements/FDPlacement/fd_placement.py
+3
-2
No files found.
CodeElements/FDPlacement/fd_placement.py
View file @
28ddc38f
...
...
@@ -394,8 +394,9 @@ class FDPlacement:
x_dist
=
self
.
objects
[
u
]
.
x
-
self
.
objects
[
v
]
.
x
y_dist
=
self
.
objects
[
u
]
.
y
-
self
.
objects
[
v
]
.
y
dist
=
sqrt
(
x_dist
*
x_dist
+
y_dist
*
y_dist
)
if
(
dist
<=
1e-5
):
return
1e5
,
1e5
if
(
dist
<=
1e-10
):
return
sqrt
(
self
.
repulsive_factor
),
sqrt
(
self
.
repulsive_factor
)
else
:
f_x
=
self
.
repulsive_factor
*
x_dist
/
dist
f_y
=
self
.
repulsive_factor
*
y_dist
/
dist
...
...
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