本文整理汇总了C++中TMatrix::col方法的典型用法代码示例。如果您正苦于以下问题:C++ TMatrix::col方法的具体用法?C++ TMatrix::col怎么用?C++ TMatrix::col使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMatrix
的用法示例。
在下文中一共展示了TMatrix::col方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: correspondences
void CPDNRigid<Scalar, Dim>::e_step()
{
if (!this->fgt_)
{
correspondences();
this->P1_ = this->corres_ * TVector(this->N_).setOnes();
this->PT1_ = this->corres_.transpose() * TVector(this->M_).setOnes();
this->PX_ = this->corres_ * this->data_;
}
else
{
Scalar c = pow((2*M_PI*paras_.sigma2_), 0.5*Dim) * (this->w_/(1-this->w_)) * (Scalar(this->M_)/this->N_);
TMatrix KT1 = fgt<Scalar, Dim>(this->T_, this->data_, TVector(this->M_).setOnes(), sqrt(2*paras_.sigma2_), this->fgt_eps_);
TVector a = (TVector(KT1) + c*TVector(this->N_).setOnes()).cwiseInverse();
TMatrix aX = MatrixType<Scalar, Dim>::Matrix::Zero(this->N_, Dim);
for (size_t i = 0; i < Dim; i ++)
{
aX.col(i) = this->data_.col(i).cwiseProduct(a);
}
this->PT1_ = TVector(this->N_).setOnes() - c * a;
this->P1_ = fgt<Scalar, Dim>(this->data_, this->T_, a, sqrt(2*paras_.sigma2_), this->fgt_eps_);
this->PX_ = fgt<Scalar, Dim>(this->data_, this->T_, aX, sqrt(2*paras_.sigma2_), this->fgt_eps_);
}
}
示例2: correspondences
void CPDRigid<T, D>::e_step()
{
if (!_fgt)
{
correspondences();
_P1 = _corres * TVector(_N).setOnes();
_PT1 = _corres.transpose() * TVector(_M).setOnes();
_PX = _corres * _data;
}
else
{
T c = pow((2*M_PI*_paras._sigma2), 0.5*D) * (_w/(1-_w)) * (T(_M)/_N);
TMatrix KT1 = fgt<T, D>(_T, _data, TVector(_M).setOnes(), sqrt(2*_paras._sigma2), _fgt_eps);
TVector a = (TVector(KT1) + c*TVector(_N).setOnes()).cwiseInverse();
TMatrix aX = TMatrix::Zero(_N, D);
for (size_t i = 0; i < D; i ++)
{
aX.col(i) = _data.col(i).cwiseProduct(a);
}
_PT1 = TVector(_N).setOnes() - c * a;
_P1 = fgt<T, D>(_data, _T, a, sqrt(2*_paras._sigma2), _fgt_eps);
_PX = fgt<T, D>(_data, _T, aX, sqrt(2*_paras._sigma2), _fgt_eps);
}
}