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


C++ ParameterList::getNameList方法代码示例

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


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

示例1: insert

void SQLiteApplets::insert ()
{
	v1 [3] = "";
	v1 [4] = "1";
	v1 [5] = "0";
	StringVector fileList;
	fileList.push_back ( "dbstat_hist" );
	fileList.push_back ( "error_hist" );
	fileList.push_back ( "fit_graph" );
	fileList.push_back ( "hist" );
	fileList.push_back ( "mmod_hist" );
	fileList.push_back ( "pr_graph" );
	fileList.push_back ( "sp_graph" );
	for ( StringVectorSizeType i = 0 ; i < fileList.size () ; i++ ) {
		string path = MsparamsDir::instance ().getParamPath ( fileList [i] + ".par.txt" );
		GenNameValueStream nvs ( path );
		if ( genFileExists ( path ) ) {
			v1 [0] = fileList [i];
			GenCommentedIFStream ifs ( path );
			ParameterList p ( ifs );
			StringVector sv = p.getNameList ();
			int numValues = p.size ();
			for ( int j = 0 ; j < numValues ; j++ ) {
				StringVector sv2 = p.getStringVectorValue ( sv [j] );
				for ( int k = 0 ; k < sv2.size () ; k++ ) {
					v1 [1] = sv [j];
					v1 [2] = sv2 [k];
					insertTable ( tableName, n1, v1 );
				}
			}
		}
	}
}
开发者ID:proteinprospector,项目名称:prospector,代码行数:33,代码来源:lu_param_db.cpp

示例2: if

PurityCorrection::PurityCorrection ( const ParameterList* params )
{
	string quanType = params->getStringValue ( "quan_type", "" );
	if ( isQuanMSMS ( quanType ) ) {	// This is an MSMS quantitation type
		string purityName = params->getStringValue ( "purity_correction", "" );
		string purityFile = quanType + ".txt";
		string purityPath = MsparamsDir::instance ().getParamPath ( purityFile );
		if ( purityName == FROM_FORMULAE ) {
			numQuanPeaks = QuanMSMSXMLData::instance ().getNumQuanPeaks ( quanType );
			matrix = QuanMSMSXMLData::instance ().getFormulaPurityCoefficients ( quanType );
		}
		else if ( purityName == NO_CORRECTION ) {
			numQuanPeaks = QuanMSMSXMLData::instance ().getNumQuanPeaks ( quanType );
			matrix.resize ( numQuanPeaks );
			for ( int i = 0 ; i < numQuanPeaks ; i++ ) {
				for ( int j = 0 ; j < 4 ; j++ ) {
					matrix [i].push_back ( 0.0 );
				}
			}
		}
		else {
			if ( purityName != DEFAULT ) {
				if ( isPrefix ( purityName, quanType ) ) {
					purityName = purityName.substr ( quanType.length () + 1 );
				}
				else {
					ErrorHandler::genError ()->error ( "Invalid purity name.\n" );
				}
			}
			GenIFStream fromFile ( purityPath );
			string line;
			bool flag = false;
			while ( getline ( fromFile, line ) ) {
				if ( line == purityName ) {
					ParameterList p ( fromFile );
					StringVector sv = p.getNameList ();
					numQuanPeaks = p.size ();
					matrix.resize ( numQuanPeaks );
					for ( int i = 0 ; i < numQuanPeaks ; i++ ) {
						istringstream ist ( p.getStringValue ( sv [i] ) );
						double num;
						while ( ist >> num ) {
							matrix [i].push_back ( num / 100.0 );
						}
					}
					flag = true;
					break;
				}
			}
			if ( !flag ) {
				ErrorHandler::genError ()->error ( "Invalid purity name.\n" );
			}
		}
		a = nrmatrix ( 1, numQuanPeaks, 1, numQuanPeaks );
		loadA ();
		b = nrmatrix ( 1, numQuanPeaks, 1, 1 );
	}
开发者ID:proteinprospector,项目名称:prospector,代码行数:57,代码来源:lu_quan_multi.cpp


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