AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day

Mixin interface for all polymorphic symmetric matrices that support secant updating. More...
#include <AbstractLinAlgPack_MatrixSymSecant.hpp>
Classes  
class  UpdateFailedException 
More...  
class  UpdateSkippedException 
More...  
Public Member Functions  
virtual void  secant_update (VectorMutable *s, VectorMutable *y, VectorMutable *Bs=NULL)=0 
Perform a secant update of the matrix. 
Mixin interface for all polymorphic symmetric matrices that support secant updating.
This interface is ment to be incorrporated in with a concrete AbstractLinAlgPack::MatrixOp
object that can implement some secant updating method. Note that this is purely abstract interface\ and can be used in any application.
Note that the methods AbstractLinAlgPack::MatrixSymInitDiag::init_identity()
and AbstractLinAlgPack::MatrixSymInitDiag::init_diagonal()
do not state any postconditions on the state of this
after they are performed. Subclasses of this interface also do not have adhere to the obvious strick postconditions that these methods suggest but they should do the "right thing" for the application. If the client needs the obvious strict postconditions for correct behavior, then the client is wise to test to see if this
really is the identity matrix or is a diagonal matrix (these can be cheap tests).
Definition at line 65 of file AbstractLinAlgPack_MatrixSymSecant.hpp.
virtual void AbstractLinAlgPack::MatrixSymSecant::secant_update  (  VectorMutable *  s, 
VectorMutable *  y,  
VectorMutable *  Bs = NULL 

)  [pure virtual] 
Perform a secant update of the matrix.
The update is a secant update:
B_hat * s = y
It is assumed that B_hat  B
(here B
is the matrix before the update and B_hat
is the matrix after the update) is not too large.
The update vectors s
and y
may be used for workspace and are therefore not gaurented to be preserved.
The vector Bs
may be set by the client to B*s
. This may help the implementing subclass from having to compute it also. Again, Bs
may be used as workspace by subclass so it may change.
If the update is not performed then an UpdateSkippedException
will be thrown with an informative error message enclosed.
If the update failed in catestrophic way and the state of this
is invalid, then a UpdateFailedException
will be thrown with an informative error message enclosed.
Subclasses may also throw other unspecified exceptions but they should all be derived from std::exception
.
s  [in/work] On input must be set to the s vector (see above). May be used as workspace. 
y  [in/work] On input must be set to the y vector (see above) May be used as workspace. 
Bs  [in/work] On input (if not NULL ), Bs may be set to the B*s vector (see above). If Bs == NULL on input, then the subclass implementation will do without. May be used as workspace. 
Preconditions:
s != NULL
(throw ???
) s
must be compatible with space_rows()
of the underlying matrix.(throw ???
) y != NULL
(throw ???
) y
must be compatible with space_cols()
of the underlying matrix.(throw ???
) Bs != NULL
] Bs
must be compatible with space_cols()
of the underlying matrix.(throw ???
) Postconidtons:
(*this) * x y
. In other words, we expect the secant condition will hold. In almost every application, this is required for correct behavior so clients should meet this condition.