MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / inverse

Method inverse

include/rabitqlib/third/Eigen/src/Geometry/Transform.h:1222–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1220 */
1221template<typename Scalar, int Dim, int Mode, int Options>
1222EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>
1223Transform<Scalar,Dim,Mode,Options>::inverse(TransformTraits hint) const
1224{
1225 Transform res;
1226 if (hint == Projective)
1227 {
1228 internal::projective_transform_inverse<Transform>::run(*this, res);
1229 }
1230 else
1231 {
1232 if (hint == Isometry)
1233 {
1234 res.matrix().template topLeftCorner<Dim,Dim>() = linear().transpose();
1235 }
1236 else if(hint&Affine)
1237 {
1238 res.matrix().template topLeftCorner<Dim,Dim>() = linear().inverse();
1239 }
1240 else
1241 {
1242 eigen_assert(false && "Invalid transform traits in Transform::Inverse");
1243 }
1244 // translation and remaining parts
1245 res.matrix().template topRightCorner<Dim,1>()
1246 = - res.matrix().template topLeftCorner<Dim,Dim>() * translation();
1247 res.makeAffine(); // we do need this, because in the beginning res is uninitialized
1248 }
1249 return res;
1250}
1251
1252namespace internal {
1253

Callers 2

Hyperplane.hFile · 0.45
runMethod · 0.45

Calls 4

runFunction · 0.85
makeAffineMethod · 0.80
matrixMethod · 0.45
transposeMethod · 0.45

Tested by

no test coverage detected