SG++-Doxygen-Documentation
python.learner.solver.LinearSolver.LinearSolver Class Reference

Abstract class for solution of system of linear equations. More...

Inheritance diagram for python.learner.solver.LinearSolver.LinearSolver:

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...
 

Detailed Description

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.

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

  • Subject: LinearSolver
  • Concrete subject: e.g. CGSolver
  • Observer: SolverEventController
  • Concrete Observer: e.g. InfoToScreen

Observer can also want to retrieve the process information from Learner. See documentation of Learner for more information.

Constructor & Destructor Documentation

◆ __init__()

def python.learner.solver.LinearSolver.LinearSolver.__init__ (   self)

Member Function Documentation

◆ attachEventController()

def python.learner.solver.LinearSolver.LinearSolver.attachEventController (   self,
  observer 
)

Add observer to the list.

Parameters
observerProgressInfoPresentor object

References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.

◆ detachEventController()

def python.learner.solver.LinearSolver.LinearSolver.detachEventController (   self,
  observer 
)

Remove observer from the list.

Parameters
observerProgressInfoPresentor object

References python.learner.solver.LinearSolver.LinearSolver.eventControllers, and python.learner.Learner.Learner.eventControllers.

◆ notifyEventControllers()

◆ solve()

def python.learner.solver.LinearSolver.LinearSolver.solve (   self,
  linearSystem 
)

Solver linear system this method has to be implemented in concrete class.

Parameters
linearSystemDMSystemMatrix object of Linear System to solve

Member Data Documentation

◆ eventControllers


The documentation for this class was generated from the following file: