|
@@ -292,15 +292,19 @@ Permutation<typename Node_t::Real_t>& InteracList<Node_t>::Perm_R(int l, Mat_Typ
|
|
|
if(row_perm.Dim()==0){
|
|
|
std::vector<Perm_Type> p_list=PermutList(type, indx);
|
|
|
for(int i=0;i<l;i++) p_list.push_back(Scaling);
|
|
|
- row_perm=Permutation<Real_t>(M0.Dim(0));
|
|
|
+ Permutation<Real_t> row_perm_=Permutation<Real_t>(M0.Dim(0));
|
|
|
+ for(int i=0;i<C_Perm;i++){
|
|
|
+ Permutation<Real_t>& pr=mat->Perm(type, R_Perm + i);
|
|
|
+ if(!pr.Dim()) row_perm_=Permutation<Real_t>(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(row_perm_.Dim()>0)
|
|
|
for(int i=p_list.size()-1; i>=0; i--){
|
|
|
+ assert(type!=V_Type);
|
|
|
Permutation<Real_t>& pr=mat->Perm(type, R_Perm + p_list[i]);
|
|
|
- if(pr.Dim()!=M0.Dim(0)){
|
|
|
- row_perm=Permutation<Real_t>(indx==indx0?M0.Dim(0):0);
|
|
|
- break;
|
|
|
- }
|
|
|
- row_perm=pr.Transpose()*row_perm;
|
|
|
+ row_perm_=pr.Transpose()*row_perm_;
|
|
|
}
|
|
|
+ row_perm=row_perm_;
|
|
|
}
|
|
|
return row_perm;
|
|
|
}
|
|
@@ -316,15 +320,19 @@ Permutation<typename Node_t::Real_t>& InteracList<Node_t>::Perm_C(int l, Mat_Typ
|
|
|
if(col_perm.Dim()==0){
|
|
|
std::vector<Perm_Type> p_list=PermutList(type, indx);
|
|
|
for(int i=0;i<l;i++) p_list.push_back(Scaling);
|
|
|
- col_perm=Permutation<Real_t>(M0.Dim(1));
|
|
|
+ Permutation<Real_t> col_perm_=Permutation<Real_t>(M0.Dim(1));
|
|
|
+ for(int i=0;i<C_Perm;i++){
|
|
|
+ Permutation<Real_t>& pc=mat->Perm(type, C_Perm + i);
|
|
|
+ if(!pc.Dim()) col_perm_=Permutation<Real_t>(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(col_perm_.Dim()>0)
|
|
|
for(int i=p_list.size()-1; i>=0; i--){
|
|
|
+ assert(type!=V_Type);
|
|
|
Permutation<Real_t>& pc=mat->Perm(type, C_Perm + p_list[i]);
|
|
|
- if(pc.Dim()!=M0.Dim(1)){
|
|
|
- col_perm=Permutation<Real_t>(indx==indx0?M0.Dim(1):0);
|
|
|
- break;
|
|
|
- }
|
|
|
- col_perm=col_perm*pc;
|
|
|
+ col_perm_=col_perm_*pc;
|
|
|
}
|
|
|
+ col_perm=col_perm_;
|
|
|
}
|
|
|
return col_perm;
|
|
|
}
|