当前位置: 首页>>代码示例>>C++>>正文


C++ PolyRing::monoid方法代码示例

本文整理汇总了C++中PolyRing::monoid方法的典型用法代码示例。如果您正苦于以下问题:C++ PolyRing::monoid方法的具体用法?C++ PolyRing::monoid怎么用?C++ PolyRing::monoid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PolyRing的用法示例。


在下文中一共展示了PolyRing::monoid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void ReducerPack<Q>::MultipleWithPos::destroy(const PolyRing& ring) {
  ring.monoid().freeRaw(*current);
  ring.monoid().freeRaw(*multiple.mono);

  // Call the destructor to destruct the iterators into std::vector.
  // In debug mode MSVC puts those in a linked list and the destructor
  // has to be called since it takes an iterator off the list. There were
  // memory corruption problems in debug mode before doing this on MSVC.
  this->~MultipleWithPos();
}
开发者ID:Macaulay2,项目名称:mathicgb,代码行数:10,代码来源:ReducerPack.cpp

示例2: while

void ReducerPackDedup<Q>::MultipleWithPos::destroy(const PolyRing& ring) {
  MultipleWithPos* entry = this;
  do {
    ring.monoid().freeRaw(*entry->current);
    ring.monoid().freeRaw(*entry->multiple.mono);
    MultipleWithPos* next = entry->chain;
    MATHICGB_ASSERT(next != 0);

    // Call the destructor to destruct the iterators into std::vector.
    // In debug mode MSVC puts those in a linked list and the destructor
    // has to be called since it takes an iterator off the list. There were
    // memory corruption problems in debug mode on MSVC before doing this.
    entry->~MultipleWithPos();

    entry = next;
  } while (entry != this);
}
开发者ID:Macaulay2,项目名称:mathicgb,代码行数:17,代码来源:ReducerPackDedup.cpp

示例3: mRatioSorted

MATHICGB_NAMESPACE_BEGIN

SigPolyBasis::SigPolyBasis(
  const PolyRing& R0,
  int monoLookupType,
  int monTableType,
  bool preferSparseReducers
):
  mMonoLookupFactory
    (MonoLookup::makeFactory(R0.monoid(), monoLookupType)),
  mRatioSorted(RatioOrder(mSigLeadRatio, R0.monoid())),
  mMinimalMonoLookup(mMonoLookupFactory->make(preferSparseReducers, true)),
  mBasis(R0, mMonoLookupFactory->make(preferSparseReducers, true)),
  mPreferSparseReducers(preferSparseReducers)
{
  mTmp = mBasis.ring().allocMonomial();
  const_cast<MonoLookup&>(mBasis.monoLookup()).setSigBasis(*this);
  mMinimalMonoLookup->setSigBasis(*this);
}
开发者ID:Macaulay2,项目名称:mathicgb,代码行数:19,代码来源:SigPolyBasis.cpp


注:本文中的PolyRing::monoid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。