Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hyteg
hog
Commits
c5d1a348
Verified
Commit
c5d1a348
authored
3 months ago
by
Marcus Mohr
Browse files
Options
Downloads
Patches
Plain Diff
Make code for AffineMap2D more elegant and expressive
parent
aacf835a
No related branches found
No related tags found
1 merge request
!40
Add support for bubble enhanced P2 element in 2D
Pipeline
#74767
passed with warnings
3 months ago
Stage: test
Stage: integration
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hog/blending.py
+2
-11
2 additions, 11 deletions
hog/blending.py
with
2 additions
and
11 deletions
hog/blending.py
+
2
−
11
View file @
c5d1a348
...
@@ -620,19 +620,10 @@ class AffineMap2D(GeometryMap):
...
@@ -620,19 +620,10 @@ class AffineMap2D(GeometryMap):
return
False
return
False
def
evaluate
(
self
,
x
:
sp
.
Matrix
)
->
sp
.
Matrix
:
def
evaluate
(
self
,
x
:
sp
.
Matrix
)
->
sp
.
Matrix
:
xnew
=
sp
.
zeros
(
2
,
1
)
return
self
.
mat
*
x
+
self
.
vec
xnew
[
0
]
=
self
.
mat
[
0
,
0
]
*
x
[
0
]
+
self
.
mat
[
0
,
1
]
*
x
[
1
]
+
self
.
vec
[
0
]
xnew
[
1
]
=
self
.
mat
[
1
,
0
]
*
x
[
0
]
+
self
.
mat
[
1
,
1
]
*
x
[
1
]
+
self
.
vec
[
1
]
return
xnew
def
jacobian
(
self
,
x
:
sp
.
Matrix
)
->
sp
.
Matrix
:
def
jacobian
(
self
,
x
:
sp
.
Matrix
)
->
sp
.
Matrix
:
jac
=
sp
.
Matrix
(
jac
=
self
.
mat
.
copy
()
[
[
self
.
mat
[
0
,
0
],
self
.
mat
[
0
,
1
]],
[
self
.
mat
[
1
,
0
],
self
.
mat
[
1
,
1
]],
]
)
return
jac
return
jac
def
hessian
(
self
,
x
:
sp
.
Matrix
)
->
List
[
sp
.
Matrix
]:
def
hessian
(
self
,
x
:
sp
.
Matrix
)
->
List
[
sp
.
Matrix
]:
...
...
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