matrix_inverse() -> inverse()

release/4.3a0
Varun Agrawal 2020-12-02 06:11:50 -05:00
parent 355d2cff06
commit 25b6146633
3 changed files with 6 additions and 7 deletions

View File

@ -165,7 +165,7 @@ class GTSAM_EXPORT Cal3 {
#endif
/// Return inverted calibration matrix inv(K)
Matrix3 matrix_inverse() const {
Matrix3 inverse() const {
const double fxy = fx_ * fy_, sv0 = s_ * v0_, fyu0 = fy_ * u0_;
Matrix3 K_inverse;
K_inverse << 1.0 / fx_, -s_ / fxy, (sv0 - fyu0) / fxy, 0.0, 1.0 / fy_,

View File

@ -22,12 +22,11 @@
#include <iostream>
namespace gtsam {
using namespace std;
/* ************************************************************************* */
ostream& operator<<(ostream& os, const Cal3_S2& cal) {
os << "{fx: " << cal.fx() << ", fy: " << cal.fy() << ", s:" << cal.skew()
<< ", px:" << cal.px() << ", py:" << cal.py() << "}";
std::ostream& operator<<(std::ostream& os, const Cal3_S2& cal) {
os << "{ fx: " << cal.fx() << ", fy: " << cal.fy() << ", s: " << cal.skew()
<< ", px: " << cal.px() << ", py: " << cal.py() << " }";
return os;
}
@ -68,7 +67,7 @@ Point2 Cal3_S2::calibrate(const Point2& p, OptionalJacobian<2, 5> Dcal,
}
/* ************************************************************************* */
Vector3 Cal3_S2::calibrate(const Vector3& p) const { return matrix_inverse() * p; }
Vector3 Cal3_S2::calibrate(const Vector3& p) const { return inverse() * p; }
/* ************************************************************************* */

View File

@ -852,7 +852,7 @@ class Cal3_S2 {
gtsam::Point2 principalPoint() const;
Vector vector() const;
Matrix K() const;
Matrix matrix_inverse() const;
Matrix inverse() const;
// enabling serialization functionality
void serialize() const;