本文整理汇总了C++中VectorOf::val方法的典型用法代码示例。如果您正苦于以下问题:C++ VectorOf::val方法的具体用法?C++ VectorOf::val怎么用?C++ VectorOf::val使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VectorOf
的用法示例。
在下文中一共展示了VectorOf::val方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newBasis
VectorOf<Word> SGOfFreeNilpotentGroupRep::normalClosureBasis() const {
//@ep I have found that the process is slower with the full basis,
// so I form it from the scratch.
MalcevSet newBasis(theGenerators, theParentGroup.collector());
newBasis.makeNormalClosure();
// The basis is found. Now we try to reduce it to make further
// processing easier.
VectorOf<Word> basis = newBasis.getCommutatorWords();
// First, we reduce words in terms of basic commutators.
// We could proceed without this step, but it helps
// to reduce the second one greatly.
FreeGroup F( theParentGroup.theHirschNumber() );
basis = F.nielsenBasis(basis);
// Convert words in terms of basic commutators to group
// generators.
for(int i = 0; i < basis.length(); i++) {
PolyWord pw = basis.val(i);
basis[i] = theParentGroup.commutators().wordForm().toWord(pw);
}
// Now reduce this vector
FreeGroup F1( theParentGroup.numberOfGenerators() );
basis = F1.nielsenBasis(basis);
return basis;
}
示例2: isBasis
// put the words to the set
MalcevSet::MalcevSet(const VectorOf<Word>& v, const NGCollector& nc)
: isBasis(false), isNormal(dontknow), theCollector(nc)
{
for(int i = 0; i < v.length(); i++)
addWord( v.val(i) );
}