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


C++ AnalysisDataPointSetRef::frameIndex方法代码示例

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


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

示例1:

void
AnalysisDataModuleManager::notifyPointsAdd(const AnalysisDataPointSetRef &points) const
{
    GMX_ASSERT(impl_->state_ == Impl::eInFrame, "notifyFrameStart() not called");
    // TODO: Add checks for column spans (requires passing the information
    // about the column counts from somewhere).
    //GMX_ASSERT(points.lastColumn() < columnCount(points.dataSetIndex()),
    //           "Invalid columns");
    GMX_ASSERT(points.frameIndex() == impl_->currIndex_,
               "Points do not correspond to current frame");
    if (impl_->bSerialModules_)
    {
        if (!impl_->bAllowMissing_ && !points.allPresent())
        {
            GMX_THROW(APIError("Missing data not supported by a module"));
        }

        Impl::ModuleList::const_iterator i;
        for (i = impl_->modules_.begin(); i != impl_->modules_.end(); ++i)
        {
            if (!i->bParallel)
            {
                i->module->pointsAdded(points);
            }
        }
    }
}
开发者ID:ElsevierSoftwareX,项目名称:SOFTX-D-15-00003,代码行数:27,代码来源:datamodulemanager.cpp

示例2:

void
AnalysisDataFrameAverageModule::pointsAdded(const AnalysisDataPointSetRef &points)
{
    AnalysisDataStorageFrame &frame =
        impl_->storage_.currentFrame(points.frameIndex());
    for (int i = 0; i < points.columnCount(); ++i)
    {
        if (points.present(i))
        {
            const real y = points.y(i);
            frame.value(0)      += y;
            impl_->sampleCount_ += 1;
        }
    }
}
开发者ID:hasagar,项目名称:gromacs,代码行数:15,代码来源:average.cpp

示例3:

void
AnalysisDataFrameAverageModule::pointsAdded(const AnalysisDataPointSetRef &points)
{
    const int                 dataSet = points.dataSetIndex();
    AnalysisDataStorageFrame &frame   =
        impl_->storage_.currentFrame(points.frameIndex());
    for (int i = 0; i < points.columnCount(); ++i)
    {
        if (points.present(i))
        {
            // TODO: Consider using AnalysisDataFrameAverager
            const real y     = points.y(i);
            const real delta = y - frame.value(dataSet);
            impl_->sampleCount_[dataSet] += 1;
            frame.value(dataSet)         += delta / impl_->sampleCount_[dataSet];
        }
    }
}
开发者ID:ElsevierSoftwareX,项目名称:SOFTX-D-15-00003,代码行数:18,代码来源:average.cpp

示例4: columnCount

void
AbstractAnalysisData::notifyPointsAdd(const AnalysisDataPointSetRef &points) const
{
    GMX_ASSERT(impl_->bInData_, "notifyDataStart() not called");
    GMX_ASSERT(impl_->bInFrame_, "notifyFrameStart() not called");
    GMX_ASSERT(points.lastColumn() < columnCount(), "Invalid columns");
    GMX_ASSERT(points.frameIndex() == impl_->currIndex_,
               "Points do not correspond to current frame");
    if (!impl_->bAllowMissing_ && !points.allPresent())
    {
        GMX_THROW(APIError("Missing data not supported by a module"));
    }

    Impl::ModuleList::const_iterator i;
    for (i = impl_->modules_.begin(); i != impl_->modules_.end(); ++i)
    {
        (*i)->pointsAdded(points);
    }
}
开发者ID:enasyunis,项目名称:gromacs,代码行数:19,代码来源:abstractdata.cpp


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