Skip to content
GitLab
Menu
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
5d0519d3
Commit
5d0519d3
authored
Jul 02, 2018
by
Christoph Lienhard
Browse files
added docu for binary helper classes
parent
c66b8bea
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/models/binary_helpers.py
View file @
5d0519d3
...
@@ -31,6 +31,7 @@ def _joint_position(op1, op2):
...
@@ -31,6 +31,7 @@ def _joint_position(op1, op2):
class
ScalarMul
(
Model
):
class
ScalarMul
(
Model
):
"""Class representing a model multiplied by a scalar factor."""
def
__init__
(
self
,
factor
,
op
):
def
__init__
(
self
,
factor
,
op
):
# TODO op -> model
# TODO op -> model
super
(
ScalarMul
,
self
).
__init__
(
op
.
position
)
super
(
ScalarMul
,
self
).
__init__
(
op
.
position
)
...
@@ -49,6 +50,7 @@ class ScalarMul(Model):
...
@@ -49,6 +50,7 @@ class ScalarMul(Model):
class
Add
(
Model
):
class
Add
(
Model
):
"""Class representing the sum of two models."""
def
__init__
(
self
,
position
,
op1
,
op2
):
def
__init__
(
self
,
position
,
op1
,
op2
):
super
(
Add
,
self
).
__init__
(
position
)
super
(
Add
,
self
).
__init__
(
position
)
...
@@ -68,6 +70,7 @@ class Add(Model):
...
@@ -68,6 +70,7 @@ class Add(Model):
class
Mul
(
Model
):
class
Mul
(
Model
):
"""Class representing the pointwise product of two models."""
def
__init__
(
self
,
position
,
op1
,
op2
):
def
__init__
(
self
,
position
,
op1
,
op2
):
super
(
Mul
,
self
).
__init__
(
position
)
super
(
Mul
,
self
).
__init__
(
position
)
...
...
Write
Preview
Supports
Markdown
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