~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
namespace internal {
63
63
 
64
64
class BlockRandomAccessSparseMatrix;
65
 
class BlockSparseMatrixBase;
 
65
class BlockSparseMatrix;
66
66
struct CompressedRowBlockStructure;
67
67
class SchurEliminatorBase;
68
68
 
123
123
//   preconditioner.RightMultiply(x, y);
124
124
//
125
125
#ifndef CERES_NO_SUITESPARSE
126
 
class VisibilityBasedPreconditioner : public Preconditioner {
 
126
class VisibilityBasedPreconditioner : public BlockSparseMatrixPreconditioner {
127
127
 public:
128
128
  // Initialize the symbolic structure of the preconditioner. bs is
129
129
  // the block structure of the linear system to be solved. It is used
136
136
  virtual ~VisibilityBasedPreconditioner();
137
137
 
138
138
  // Preconditioner interface
139
 
  virtual bool Update(const BlockSparseMatrixBase& A, const double* D);
140
139
  virtual void RightMultiply(const double* x, double* y) const;
141
140
  virtual int num_rows() const;
142
141
 
143
142
  friend class VisibilityBasedPreconditionerTest;
 
143
 
144
144
 private:
 
145
  virtual bool UpdateImpl(const BlockSparseMatrix& A, const double* D);
145
146
  void ComputeClusterJacobiSparsity(const CompressedRowBlockStructure& bs);
146
147
  void ComputeClusterTridiagonalSparsity(const CompressedRowBlockStructure& bs);
147
148
  void InitStorage(const CompressedRowBlockStructure& bs);
203
204
#else  // SuiteSparse
204
205
// If SuiteSparse is not compiled in, the preconditioner is not
205
206
// available.
206
 
class VisibilityBasedPreconditioner : public Preconditioner {
 
207
class VisibilityBasedPreconditioner : public BlockSparseMatrixPreconditioner {
207
208
 public:
208
209
  VisibilityBasedPreconditioner(const CompressedRowBlockStructure& bs,
209
210
                                const Preconditioner::Options& options) {
215
216
  virtual void LeftMultiply(const double* x, double* y) const {}
216
217
  virtual int num_rows() const { return -1; }
217
218
  virtual int num_cols() const { return -1; }
218
 
  bool Update(const BlockSparseMatrixBase& A, const double* D) {
 
219
 
 
220
 private:
 
221
  bool UpdateImpl(const BlockSparseMatrix& A, const double* D) {
219
222
    return false;
220
223
  }
221
224
};