38 class SparseOptimizer;
71 virtual bool solve() = 0;
87 virtual bool setLambda(
double lambda,
bool backup =
false) = 0;
95 double*
x() {
return _x;}
96 const double*
x()
const {
return _x;}
98 double*
b() {
return _b;}
99 const double*
b()
const {
return _b;}
119 virtual bool schur()=0;
132 virtual bool saveHessian(
const std::string& )
const = 0;
virtual void restoreDiagonal()=0
virtual bool schur()=0
should the solver perform the schur complement or not
virtual bool updateStructure(const std::vector< HyperGraph::Vertex * > &vset, const HyperGraph::EdgeSet &edges)=0
Solver & operator=(const Solver &)
void setLevenberg(bool levenberg)
SparseOptimizer * _optimizer
virtual bool setLambda(double lambda, bool backup=false)=0
virtual bool writeDebug() const =0
bool levenberg() const
the system is Levenberg-Marquardt
void setAdditionalVectorSpace(size_t s)
void setOptimizer(SparseOptimizer *optimizer)
std::set< Edge * > EdgeSet
virtual bool supportsSchur()
Generic interface for a sparse solver operating on a graph which solves one iteration of the lineariz...
size_t _additionalVectorSpace
void resizeVector(size_t sx)
SparseOptimizer * optimizer() const
the optimizer (graph) on which the solver works
bool _isLevenberg
the system we gonna solve is a Levenberg-Marquardt system
double * x()
return x, the solution vector
double * b()
return b, the right hand side of the system
virtual bool buildSystem()=0
size_t vectorSize() const
return the size of the solution vector (x) and b
size_t additionalVectorSpace() const
virtual void setWriteDebug(bool)=0
virtual bool init(SparseOptimizer *optimizer, bool online=false)=0
virtual bool saveHessian(const std::string &) const =0
write the hessian to disk using the specified file name
Sparse matrix which uses blocks.
virtual void setSchur(bool s)=0
virtual bool computeMarginals(SparseBlockMatrix< MatrixXd > &spinv, const std::vector< std::pair< int, int > > &blockIndices)=0
virtual bool buildStructure(bool zeroBlocks=false)=0