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
db5502f3
Commit
db5502f3
authored
Aug 19, 2017
by
Martin Reinecke
Browse files
more documentation
parent
c61a1a40
Pipeline
#16899
passed with stage
in 10 minutes and 13 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/energies/quadratic_energy.py
View file @
db5502f3
...
...
@@ -4,6 +4,8 @@ from nifty.energies.memoization import memo
class
QuadraticEnergy
(
Energy
):
"""The Energy for a quadratic form.
The most important aspect of this energy is that its curvature must be
position-independent.
"""
def
__init__
(
self
,
position
,
A
,
b
):
...
...
nifty/minimization/iteration_controller.py
View file @
db5502f3
...
...
@@ -24,6 +24,22 @@ import numpy as np
from
keepers
import
Loggable
class
IterationController
(
Loggable
,
object
):
"""The abstract base class for all iteration controllers.
An iteration controller is an object that monitors the progress of a
minimization iteration. At the begin of the minimization, its start()
method is called with the energy object at the initial position.
Afterwards, its check() method is called during every iteration step with
the energy object describing the current position.
Based on that information, the iteration controller has to decide whether
iteration needs to progress further (in this case it returns CONTINUE), or
if sufficient convergence has been reached (in this case it returns
CONVERGED), or if some error has been detected (then it returns ERROR).
The concrete convergence criteria can be chosen by inheriting from this
class; the implementer has full flexibility to use whichever criteria are
appropriate for a particular problem - as ong as they can be computed from
the information passed to the controller during the iteration process.
"""
__metaclass__
=
NiftyMeta
...
...
nifty/minimization/relaxed_newton.py
View file @
db5502f3
...
...
@@ -21,7 +21,6 @@ from .line_searching import LineSearchStrongWolfe
class
RelaxedNewton
(
DescentMinimizer
):
def
__init__
(
self
,
controller
,
line_searcher
=
LineSearchStrongWolfe
()):
super
(
RelaxedNewton
,
self
).
__init__
(
controller
=
controller
,
...
...
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