IterativeSolver equals method
parent
7aa6e574e6
commit
cb226633c5
|
|
@ -46,6 +46,12 @@ void IterativeOptimizationParameters::print(ostream &os) const {
|
|||
<< verbosityTranslator(verbosity_) << endl;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
bool IterativeOptimizationParameters::equals(
|
||||
const IterativeOptimizationParameters &other, double tol) const {
|
||||
return verbosity_ == other.verbosity();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
ostream& operator<<(ostream &os, const IterativeOptimizationParameters &p) {
|
||||
p.print(os);
|
||||
|
|
|
|||
|
|
@ -41,13 +41,12 @@ class VectorValues;
|
|||
* parameters for iterative linear solvers
|
||||
*/
|
||||
class IterativeOptimizationParameters {
|
||||
|
||||
public:
|
||||
|
||||
typedef std::shared_ptr<IterativeOptimizationParameters> shared_ptr;
|
||||
enum Verbosity {
|
||||
SILENT = 0, COMPLEXITY, ERROR
|
||||
} verbosity_;
|
||||
enum Verbosity { SILENT = 0, COMPLEXITY, ERROR };
|
||||
|
||||
protected:
|
||||
Verbosity verbosity_;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -71,6 +70,9 @@ public:
|
|||
/* virtual print function */
|
||||
GTSAM_EXPORT virtual void print(std::ostream &os) const;
|
||||
|
||||
GTSAM_EXPORT virtual bool equals(const IterativeOptimizationParameters &other,
|
||||
double tol = 1e-9) const;
|
||||
|
||||
/* for serialization */
|
||||
GTSAM_EXPORT friend std::ostream &operator<<(
|
||||
std::ostream &os, const IterativeOptimizationParameters &p);
|
||||
|
|
|
|||
Loading…
Reference in New Issue