本文整理汇总了C++中Spectrum::getDimCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Spectrum::getDimCount方法的具体用法?C++ Spectrum::getDimCount怎么用?C++ Spectrum::getDimCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spectrum
的用法示例。
在下文中一共展示了Spectrum::getDimCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createBackcalc
int LuaPeakList::createBackcalc(lua_State *L)
{
PeakList* obj = RefBinding<PeakList>::check( L, 1);
Spectrum* spec = RefBinding<Spectrum>::check( L, 2 );
if( spec->getDimCount() != obj->getDimCount() )
luaL_error( L, "the provided spectrum must have the same number of dimensions like the peaklist" );
bool diff = false;
if( lua_gettop(L)>2 )
diff =lua_toboolean( L, 3 );
bool exact = false;
if( lua_gettop(L)>3 )
exact =lua_toboolean( L, 4 );
Root::Ref<BackCalculation> back = new BackCalculation( spec,
new PeakListPeer( obj, spec ) );
back->setDiff( diff );
back->setExact( exact );
LuaSpectrum::push( L, back.deref() );
return 1;
}
示例2: updateSpecPop
void SliceScopeAgent::updateSpecPop()
{
if( d_pro.isNull() )
return;
ColorMap a, b;
( *d_specs.begin() )->getColors( a );
Spectrum* spec = 0;
const Project::SpectrumMap& sm = d_pro->getSpectra();
Project::SpectrumMap::const_iterator p;
AtomType atom = ( *d_specs.begin() )->getColor( DimX );
for( p = sm.begin(); p != sm.end(); ++p )
{
spec = (*p).second;
if( spec->getDimCount() == 1 && spec->getColor( DimX ) == atom )
{
Gui::Menu::item( d_popSpec, this, spec->getName(),
SliceScopeAgent::AddSpec, true )->addParam( Root::Any( spec ) );
}
}
}