本文整理汇总了C++中DblMatrix::Tprime方法的典型用法代码示例。如果您正苦于以下问题:C++ DblMatrix::Tprime方法的具体用法?C++ DblMatrix::Tprime怎么用?C++ DblMatrix::Tprime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DblMatrix
的用法示例。
在下文中一共展示了DblMatrix::Tprime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ide
/// Constructor from a rotation matrix
/// @param rot :: DblMatrix matrix that is going to be the internal rotation
/// matrix of the goniometer. Cannot push additional axes
Goniometer::Goniometer(DblMatrix rot) {
DblMatrix ide(3, 3), rtr(3, 3);
rtr = rot.Tprime() * rot;
ide.identityMatrix();
if (rtr == ide) {
R = rot;
initFromR = true;
} else
throw std::invalid_argument("rot is not a rotation matrix");
}
示例2: setUB
/** Sets the UB matrix and recalculates lattice parameters
@param newUB :: the new UB matrix*/
void OrientedLattice::setUB(const DblMatrix &newUB) {
if (UB.determinant() > 0) {
UB = newUB;
DblMatrix newGstar, B;
newGstar = newUB.Tprime() * newUB;
this->recalculateFromGstar(newGstar);
B = this->getB();
B.Invert();
U = newUB * B;
} else
throw std::invalid_argument("determinant of UB is not greater than 0");
}
示例3: setUB
/** Sets the UB matrix and recalculates lattice parameters
@param newUB :: the new UB matrix*/
void OrientedLattice::setUB(const DblMatrix &newUB) {
// check if determinant is close to 0. The 1e-10 value is arbitrary
if (std::fabs(newUB.determinant()) > 1e-10) {
UB = newUB;
DblMatrix newGstar, B;
newGstar = newUB.Tprime() * newUB;
this->recalculateFromGstar(newGstar);
B = this->getB();
B.Invert();
U = newUB * B;
} else
throw std::invalid_argument("determinant of UB is too close to 0");
}