本文整理汇总了C++中eigen::MatrixXcd::row方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixXcd::row方法的具体用法?C++ MatrixXcd::row怎么用?C++ MatrixXcd::row使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eigen::MatrixXcd
的用法示例。
在下文中一共展示了MatrixXcd::row方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exit
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void LapH::OperatorsForMesons::build_rvdaggerv(
const LapH::RandomVector& rnd_vec) {
// check if vdaggerv is already build
if(not is_vdaggerv_set){
std::cout << "\n\n\tCaution: vdaggerv is not set and rvdaggervr cannot be"
<< " computed\n\n" << std::endl;
exit(0);
}
clock_t t2 = clock();
std::cout << "\tbuild rvdaggerv:";
for(auto& rvdv_level1 : rvdaggerv)
for(auto& rvdv_level2 : rvdv_level1)
for(auto& rvdv_level3 : rvdv_level2)
rvdv_level3 = Eigen::MatrixXcd::Zero(4*dilE, nb_ev);
#pragma omp parallel for schedule(dynamic)
for(size_t t = 0; t < Lt; t++){
// rvdaggervr is calculated by multiplying vdaggerv with the same quantum
// numbers with random vectors from right and left.
for(const auto& op : operator_lookuptable.rvdaggerv_lookuptable){
Eigen::MatrixXcd vdv;
if(op.need_vdaggerv_daggering == false)
vdv = vdaggerv[op.id_vdaggerv][t];
else
vdv = vdaggerv[op.id_vdaggerv][t].adjoint();
size_t rid = 0;
for(const auto& rnd_id :
operator_lookuptable.ricQ1_lookup[op.id_ricQ_lookup].rnd_vec_ids){
for(size_t block = 0; block < 4; block++){
for(size_t vec_i = 0; vec_i < nb_ev; ++vec_i) {
size_t blk = block + vec_i * 4 + 4 * nb_ev * t;
rvdaggerv[op.id][t][rid].block(vec_i%dilE + dilE*block, 0, 1, nb_ev) +=
vdv.row(vec_i) * std::conj(rnd_vec(rnd_id, blk));
}}
rid++;
}
}}// time and operator loops end here
t2 = clock() - t2;
std::cout << std::setprecision(1) << "\t\tSUCCESS - " << std::fixed
<< ((float) t2)/CLOCKS_PER_SEC << " seconds" << std::endl;
}