fix a switch bug
parent
a000745799
commit
fd8ec0a605
|
|
@ -32,8 +32,7 @@ public:
|
||||||
SEQUENTIAL_CHOLESKY,
|
SEQUENTIAL_CHOLESKY,
|
||||||
SEQUENTIAL_QR,
|
SEQUENTIAL_QR,
|
||||||
CHOLMOD, /* Experimental Flag */
|
CHOLMOD, /* Experimental Flag */
|
||||||
PCG, /* Experimental Flag */
|
CG, /* Experimental Flag */
|
||||||
LSPCG /* Experimental Flag */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LinearSolverType linearSolverType; ///< The type of linear solver to use in the nonlinear optimizer
|
LinearSolverType linearSolverType; ///< The type of linear solver to use in the nonlinear optimizer
|
||||||
|
|
@ -62,11 +61,8 @@ public:
|
||||||
case CHOLMOD:
|
case CHOLMOD:
|
||||||
std::cout << " linear solver type: CHOLMOD\n";
|
std::cout << " linear solver type: CHOLMOD\n";
|
||||||
break;
|
break;
|
||||||
case PCG:
|
case CG:
|
||||||
std::cout << " linear solver type: PCG\n";
|
std::cout << " linear solver type: CG\n";
|
||||||
break;
|
|
||||||
case LSPCG:
|
|
||||||
std::cout << " linear solver type: LSPCG\n";
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
std::cout << " linear solver type: (invalid)\n";
|
std::cout << " linear solver type: (invalid)\n";
|
||||||
|
|
@ -94,16 +90,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool isCG() const {
|
inline bool isCG() const {
|
||||||
return (linearSolverType == PCG || linearSolverType == LSPCG);
|
return (linearSolverType == CG);
|
||||||
}
|
}
|
||||||
|
|
||||||
GaussianFactorGraph::Eliminate getEliminationFunction() {
|
GaussianFactorGraph::Eliminate getEliminationFunction() {
|
||||||
switch (linearSolverType) {
|
switch (linearSolverType) {
|
||||||
case MULTIFRONTAL_CHOLESKY:
|
case MULTIFRONTAL_CHOLESKY:
|
||||||
case MULTIFRONTAL_QR:
|
case SEQUENTIAL_CHOLESKY:
|
||||||
return EliminatePreferCholesky;
|
return EliminatePreferCholesky;
|
||||||
|
|
||||||
case SEQUENTIAL_CHOLESKY:
|
case MULTIFRONTAL_QR:
|
||||||
case SEQUENTIAL_QR:
|
case SEQUENTIAL_QR:
|
||||||
return EliminateQR;
|
return EliminateQR;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue