2014-12-23 08:49:32 +08:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
|
|
|
|
|
* Atlanta, Georgia 30332-0415
|
|
|
|
|
* All Rights Reserved
|
|
|
|
|
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
|
|
|
|
|
|
|
|
|
|
* See LICENSE for the license information
|
|
|
|
|
|
|
|
|
|
* -------------------------------------------------------------------------- */
|
|
|
|
|
|
2014-12-23 07:35:22 +08:00
|
|
|
/**
|
2015-02-25 12:40:53 +08:00
|
|
|
* @file LinearEqualityFactorGraph.h
|
2014-12-23 08:49:32 +08:00
|
|
|
* @author Duy-Nguyen Ta
|
|
|
|
|
* @author Krunal Chande
|
|
|
|
|
* @author Luca Carlone
|
|
|
|
|
* @date Dec 15, 2014
|
2014-12-23 07:35:22 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2015-03-02 21:27:24 +08:00
|
|
|
#include <gtsam/inference/FactorGraph.h>
|
|
|
|
|
#include <gtsam/nonlinear/NonlinearFactor.h>
|
|
|
|
|
#include <gtsam/nonlinear/Values.h>
|
2015-02-25 12:40:53 +08:00
|
|
|
#include <gtsam_unstable/linear/EqualityFactorGraph.h>
|
2014-12-23 07:35:22 +08:00
|
|
|
|
|
|
|
|
namespace gtsam {
|
2014-12-24 03:45:23 +08:00
|
|
|
|
2015-02-25 12:40:53 +08:00
|
|
|
/**
|
|
|
|
|
* FactorGraph container for linear equality factors c(x)==0 at the nonlinear level
|
|
|
|
|
*/
|
|
|
|
|
class LinearEqualityFactorGraph: public FactorGraph<NonlinearFactor> {
|
2014-12-23 07:35:22 +08:00
|
|
|
public:
|
2014-12-24 03:45:23 +08:00
|
|
|
/// Default constructor
|
2015-02-25 12:40:53 +08:00
|
|
|
LinearEqualityFactorGraph() {
|
2014-12-23 07:35:22 +08:00
|
|
|
}
|
|
|
|
|
|
2015-02-25 12:40:53 +08:00
|
|
|
/// Linearize to a EqualityFactorGraph
|
2015-03-02 21:27:24 +08:00
|
|
|
EqualityFactorGraph::shared_ptr linearize(const Values& linearizationPoint) const;
|
2014-12-24 03:45:23 +08:00
|
|
|
|
2015-03-02 21:27:24 +08:00
|
|
|
/// Return true if the max absolute error all factors is less than a tolerance
|
|
|
|
|
bool checkFeasibility(const Values& values, double tol) const;
|
2014-12-24 03:45:23 +08:00
|
|
|
|
2014-12-23 07:35:22 +08:00
|
|
|
};
|
2014-12-24 03:45:23 +08:00
|
|
|
|
2014-12-23 07:35:22 +08:00
|
|
|
}
|