Add support for multiple visibility clustering algorithms.

The original visibility based preconditioning paper and
implementation only used the canonical views algorithm.

This algorithm for large dense graphs can be particularly
expensive. As its worst case complexity is cubic in size
of the graph.

Further, for many uses the SCHUR_JACOBI preconditioner
was both effective enough while being cheap. It however
suffers from a fatal flaw. If the camera parameter blocks
are split between two or more parameter blocks, e.g,
extrinsics and intrinsics. The preconditioner because
it is block diagonal will not capture the interactions
between them.

Using CLUSTER_JACOBI or CLUSTER_TRIDIAGONAL will fix
this problem but as mentioned above this can be quite
expensive depending on the problem.

This change extends the visibility based preconditioner
to allow for multiple clustering algorithms. And adds
a simple thresholded single linkage clustering algorithm
which allows you to construct versions of CLUSTER_JACOBI
and CLUSTER_TRIDIAGONAL preconditioners that are cheap
to construct and are more effective than SCHUR_JACOBI.

Currently the constants controlling the threshold above
which edges are considered in the single linkage algorithm
are not exposed. This would be done in a future change.

Change-Id: I7ddc36790943f24b19c7f08b10694ae9a822f5c9
This commit is contained in:
Sameer Agarwal
2013-10-27 21:38:13 -07:00
parent 5a161a2b96
commit f06b9face5
18 changed files with 472 additions and 30 deletions
+29
View File
@@ -1147,6 +1147,28 @@ elimination group [LiSaad]_.
``CLUSTER_JACOBI`` and ``CLUSTER_TRIDIAGONAL``. See
:ref:`section-preconditioner` for more details.
.. member:: VisibilityClusteringType Solver::Options::visibility_clustering_type
Default: ``CANONICAL_VIEWS``
Type of clustering algorithm to use when constructing a visibility
based preconditioner. The original visibility based preconditioning
paper and implementation only used the canonical views algorithm.
This algorithm gives high quality results but for large dense
graphs can be particularly expensive. As its worst case complexity
is cubic in size of the graph.
Another option is to use ``SINGLE_LINKAGE`` which is a simple
thresholded single linkage clustering algorithm that only pays
attention to tightly coupled blocks in the Schur complement. This
is a fast algorithm that works well.
The optimal choice of the clustering algorithm depends on the
sparsity structure of the problem, but generally speaking we
recommend that you try ``CANONICAL_VIEWS`` first and if it is too
expensive try ``SINGLE_LINKAGE``.
.. member:: DenseLinearAlgebraLibrary Solver::Options::dense_linear_algebra_library_type
Default:``EIGEN``
@@ -2020,6 +2042,13 @@ The three arrays will be:
Type of preconditioner used for solving the trust region step. Only
meaningful when an iterative linear solver is used.
.. member:: VisibilityClusteringType Solver::Summary::visibility_clustering_type
Type of clustering algorithm used for visibility based
preconditioning. Only meaningful when the
:member:`Solver::Summary::preconditioner_type` is
``CLUSTER_JACOBI`` or ``CLUSTER_TRIDIAGONAL``.
.. member:: TrustRegionStrategyType Solver::Summary::trust_region_strategy_type
Type of trust region strategy.