示例#1
0
// Action_Diffusion::CalcDiffForSet()
void Action_Diffusion::CalcDiffForSet(unsigned int& set, Dlist const& Sets, int Ndim,
                                      std::string const& label) const
{
  for (Dlist::const_iterator ds = Sets.begin(); ds != Sets.end(); ds++)
    if (*ds != 0)
      CalcDiffusionConst(set, *ds, Ndim, label + "_" + integerToString( (*ds)->Meta().Idx() ));
}
示例#2
0
List get_permut_sort(const List& l) {
	List perm = initList(l.size());
	Dlist lp = var(l);
	Dlist L = lp;
	std::sort(L.begin(), L.end());  
	for (int i=0; i<L.size(); i++) {
		int pos = isfound_pos(L[i],lp);
		if (pos==-1) printf("Error in get_permut_sort\n");
		else perm[i] = pos;
	}
	return perm;
}