本文整理汇总了C++中MatrixPtr::transposeInPlace方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixPtr::transposeInPlace方法的具体用法?C++ MatrixPtr::transposeInPlace怎么用?C++ MatrixPtr::transposeInPlace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatrixPtr
的用法示例。
在下文中一共展示了MatrixPtr::transposeInPlace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Ks_DF
/**
* @brief Cross covariance matrix between the derivative and functional training data
* @note It calls the protected static member function, CovSEisoDerObsBase::K_FD
* to utilize the symmetry property.
* @param [in] logHyp The log hyperparameters
* - logHyp(0) = \f$\log(l)\f$
* - logHyp(1) = \f$\log(\sigma_f)\f$
* @param [in] derivativeTrainingData The functional and derivative training data
* @param [in] testData The test data
* @param [in] coord_i The partial derivative coordinate of X
* @return An NNxNN matrix pointer, \f$\frac{\partial \mathbf{K}_*(\mathbf{X}, \mathbf{X}_*)}{\partial \mathbf{X}_i} = \mathbf{K}(\mathbf{X}, \mathbf{Z})\f$\n
* NN: The number of functional and derivative training data
*/
static MatrixPtr Ks_DF(const Hyp &logHyp,
const DerivativeTrainingData<Scalar> &derivativeTrainingData,
const TestData<Scalar> &testData,
const int coord_i)
{
// squared distance: FD
MatrixPtr pSqDistXsXd = derivativeTrainingData.pSqDistXdXs(testData);
pSqDistXsXd->transposeInPlace();
// delta: FD
MatrixPtr pDeltaXsXd = derivativeTrainingData.pDeltaXdXs(testData, coord_i);
pDeltaXsXd->transposeInPlace();
(*pDeltaXsXd) *= static_cast<Scalar>(-1.f);
// K_DF
MatrixPtr K = K_FD(logHyp, pSqDistXsXd, pDeltaXsXd);
K->transposeInPlace();
return K;
}