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