SG++-Doxygen-Documentation
|
Abstract class for solution of system of linear equations. More...
Public Member Functions | |
def | __init__ (self) |
Constructor. More... | |
def | attachEventController (self, observer) |
Add observer to the list. More... | |
def | detachEventController (self, observer) |
Remove observer from the list. More... | |
def | notifyEventControllers (self, event) |
Notify all observers about the new event. More... | |
def | solve (self, linearSystem) |
Solver linear system this method has to be implemented in concrete class. More... | |
Static Public Attributes | |
eventControllers = None | |
list of object listening to the solver events More... | |
Abstract class for solution of system of linear equations.
The class defines the methods that have to be implemented in class of with routines for solution of linear equations in order to be used with SGPP.
The class also implements the subject of the observer design pattern.
To customize the processing of progress information in SGPP the observer pattern is used. The classes that want to be informed about events should implement SolverEvenController and subscribe by the instance of LinearSolver subclass with attachEventController()
. After some event of LinearSolverEvents arise, LinearSolver object calls method handleSolvingEvent()
by all subscribers. As subscribers get a reference to the LinearSolver object, they can retrieve the attributes of the solver and process the information.
Roles
Observer can also want to retrieve the process information from Learner. See documentation of Learner for more information.
def python.learner.solver.LinearSolver.LinearSolver.__init__ | ( | self | ) |
Constructor.
References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.
def python.learner.solver.LinearSolver.LinearSolver.attachEventController | ( | self, | |
observer | |||
) |
Add observer to the list.
observer | ProgressInfoPresentor object |
References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.
def python.learner.solver.LinearSolver.LinearSolver.detachEventController | ( | self, | |
observer | |||
) |
Remove observer from the list.
observer | ProgressInfoPresentor object |
References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.
def python.learner.solver.LinearSolver.LinearSolver.notifyEventControllers | ( | self, | |
event | |||
) |
Notify all observers about the new event.
event | LinearSolverEvents event |
References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.
Referenced by python.uq.learner.Regressor.Regressor.learnData(), python.uq.learner.Interpolant.Interpolant.learnData(), python.uq.learner.Regressor.Regressor.learnDataWithFolding(), python.uq.learner.Regressor.Regressor.learnDataWithTest(), python.uq.learner.Interpolant.Interpolant.learnDataWithTest(), python.learner.Classifier.Classifier.refineGrid(), python.learner.Regressor.Regressor.refineGrid(), and python.uq.learner.Regressor.Regressor.refineGrid().
def python.learner.solver.LinearSolver.LinearSolver.solve | ( | self, | |
linearSystem | |||
) |
Solver linear system this method has to be implemented in concrete class.
linearSystem | DMSystemMatrix object of Linear System to solve |
|
static |
list of object listening to the solver events
Referenced by python.learner.solver.LinearSolver.LinearSolver.__init__(), python.uq.learner.Learner.Learner.__init__(), python.learner.solver.LinearSolver.LinearSolver.attachEventController(), python.uq.learner.Learner.Learner.attachEventController(), python.uq.learner.Learner.Learner.copy(), python.learner.solver.LinearSolver.LinearSolver.detachEventController(), python.uq.learner.Learner.Learner.detachEventController(), python.learner.solver.LinearSolver.LinearSolver.notifyEventControllers(), and python.uq.learner.Learner.Learner.notifyEventControllers().