Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
f42d04fe
Commit
f42d04fe
authored
Apr 01, 2019
by
Reimar H Leike
Browse files
fixing metric of sum operator
parent
19335917
Pipeline
#46203
passed with stages
in 8 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/operator.py
View file @
f42d04fe
...
...
@@ -392,7 +392,9 @@ class _OpSum(Operator):
op
=
lin1
.
_jac
.
_myadd
(
lin2
.
_jac
,
False
)
res
=
lin1
.
new
(
lin1
.
_val
.
unite
(
lin2
.
_val
),
op
(
x
.
jac
))
if
lin1
.
_metric
is
not
None
and
lin2
.
_metric
is
not
None
:
res
=
res
.
add_metric
(
self
.
_op1
(
x
).
_metric
+
self
.
_op2
(
x
).
_metric
)
from
.sandwich_operator
import
SandwichOperator
met
=
SandwichOperator
.
make
(
x
.
jac
,
lin1
.
_metric
.
_myadd
(
lin2
.
_metric
,
False
))
res
=
res
.
add_metric
(
met
)
return
res
def
_simplify_for_constant_input_nontrivial
(
self
,
c_inp
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment