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


C++ ParameterNameValueType类代码示例

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


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

示例1: data

void TestFileGenerator::WriteSmallCelFileNoStdev()
{
	CelFileData data("small_cel_file_no_stdev");
	data.SetIntensityCount(25);
	data.SetStdDevCount(0);
	data.SetPixelCount(25);
	data.SetOutlierCount(2);
	data.SetMaskCount(3);
	data.SetRows(5);
	data.SetCols(5);
	data.SetArrayType(L"Hg-small");
	data.SetAlgorithmName(L"Feature Extraction");
	ParameterNameValueType nvt;
	nvt.SetName(L"percentile");
	nvt.SetValueFloat(0.75f);
	data.AddAlgorithmParameter(nvt);
	nvt.SetName(L"outlierlow");
	nvt.SetValueFloat(1.004f);
	data.AddAlgorithmParameter(nvt);

	CelFileWriter* writer = new CelFileWriter(data);

	FloatVector vInten;
	Int16Vector vPixels;

	for (int i=0; i<25; ++i)
	{
		vInten.push_back(100.0f*i);
		vPixels.push_back(25);
	}

	// Do some writing
	writer->WriteIntensities(vInten);
	writer->WritePixels(vPixels);

//	XYCoordVector
	XYCoordVector outlier;
	XYCoord xy(0,0);
	outlier.push_back(xy);
	xy.xCoord = 1;
	xy.yCoord = 2;
	outlier.push_back(xy);
	writer->WriteOutlierCoords(outlier);

	XYCoordVector masked;
	xy.xCoord = 1;
	xy.yCoord = 0;
	masked.push_back(xy);
	xy.xCoord = 2;
	xy.yCoord = 1;
	masked.push_back(xy);
	xy.xCoord = 3;
	xy.yCoord = 2;
	masked.push_back(xy);
	writer->WriteMaskCoords(masked);


	delete writer;
}
开发者ID:,项目名称:,代码行数:59,代码来源:

示例2:

void CDFData::SetUInt32ToGenericHdr(const std::wstring& name, u_int32_t value)
{
	ParameterNameValueType paramType;
	paramType.SetName(name);
	paramType.SetValueUInt32(value);
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	hdr->AddNameValParam(paramType);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:8,代码来源:CDFData.cpp

示例3: SetWStringToGenericHdr

void CHPQuantificationData::SetWStringToGenericHdr(const std::wstring& name, const std::wstring value, int32_t reserve)
{
	ParameterNameValueType paramType;
	paramType.SetName(name);
	paramType.SetValueText(value, reserve);
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	hdr->AddNameValParam(paramType);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例4: SetFloatToGenericHdr

void CHPData::SetFloatToGenericHdr(const std::wstring& name, float value)
{
	ParameterNameValueType paramType;
	paramType.SetName(name);
	paramType.SetValueFloat(value);
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	hdr->AddNameValParam(paramType);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例5: SetRefSequence

void CDFData::SetRefSequence(const std::string &seq)
{
	GenericDataHeader* gPtr = genericData.Header().GetGenericDataHdr();
	ParameterNameValueType paramType;
	paramType.SetName(CDF_REFSEQ_PARAM);
	paramType.SetValueAscii(seq);
	gPtr->AddNameValParam(paramType);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:8,代码来源:CDFData.cpp

示例6: AddStandardGenericDataHeader

void TestFileGenerator::WriteOutGenericDATDataFileNoGrid()
{
	GenericDataHeader gdh;
	AddStandardGenericDataHeader(gdh);

	// Fill the DataGroupHeader
	DataGroupHeader dch;
	dch.SetName(L"First Data Cube");

	// Fill the DataSetHeader
	DataSetHeader dph;
	dph.SetName(L"acquired data");
	ParameterNameValueType nvt;
	nvt.SetName(L"Scanner");
	nvt.SetValueText(L"M10");
	dph.AddNameValParam(nvt);
	nvt.SetName(L"Pixel Size");
	nvt.SetValueFloat(0.051f);
	dph.AddNameValParam(nvt);

	dph.AddColumn(UShortColumn(L"Pixel"));

	int32_t rows = 100;
	dph.SetRowCnt(rows);

	dch.AddDataSetHdr(dph);

	// Set the FileHeader
	FileHeader fh;
	fh.SetFilename("test.file.data_dat");
	fh.SetGenericDataHdr(gdh);
	fh.AddDataGroupHdr(dch);

	// Create the generic file writer
	GenericFileWriter gfWriter(&fh);
	gfWriter.WriteHeader();

	DataGroupWriterIt dcwBegin, dcwEnd;
	gfWriter.GetDataGroupWriters(dcwBegin, dcwEnd);

	DataGroupWriter d = *dcwBegin;
	dcwBegin->WriteHeader();

	DataSetWriterIt dpwBegin, dpwEnd;
	dcwBegin->GetDataSetWriters(dpwBegin, dpwEnd);

	dpwBegin->WriteHeader();

	// Write out the data
	for( int32_t i=0; i < rows; ++i )
	{
		u_int16_t value = (u_int16_t)(i*10+i);
		dpwBegin->Write(value);
	}

	dpwBegin->UpdateNextDataSetOffset();
	dcwBegin->Close();
}
开发者ID:,项目名称:,代码行数:58,代码来源:

示例7: GetAlgorithmParameter

std::wstring CalvinCELDataAdapter::GetAlgorithmParameter(const wchar_t *tag)
{
	std::wstring result;
	ParameterNameValueType param;
	if (calvinCel.FindAlgorithmParameter(tag, param))
	{
		result = param.ToString();
	}
	return result;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例8: GetAlgParam

ParameterNameValueType CHPData::GetAlgParam(const std::wstring& tag)
{
	std::wstring name = ALGORITHM_PARAM_NAME_PREFIX_S + tag;
	ParameterNameValueType paramType;
    GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
    hdr->FindNameValParam(name, paramType);
	ParameterNameValueType type = paramType;
	type.SetName(tag);
	return type;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例9: GetChipSum

ParameterNameValueType CHPData::GetChipSum(const std::wstring& tag)
{
	std::wstring name = CHIP_SUMMARY_PARAMETER_NAME_PREFIX_S + tag;
	ParameterNameValueType paramType;
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	hdr->FindNameValParam(name, paramType);
	ParameterNameValueType type = paramType;
	type.SetName(tag);
	return type;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例10: CPPUNIT_ASSERT

void CHPMultiDataDataTest::test_SumParams()
{
	ParameterNameValueTypeList params;
	ParameterNameValueType param;
	CHPMultiDataData data;

	param.SetName(L"n1");
	param.SetValueText(L"v1");
	params.push_back(param);

	param.SetName(L"n2");
	param.SetValueText(L"v2");
	params.push_back(param);

	data.AddSummaryParams(params);

	ParameterNameValueTypeList params_out = data.GetSummaryParams();
	CPPUNIT_ASSERT(params_out.size() == 2);
	ParameterNameValueTypeList::iterator it = params_out.begin();
	param = *it;
	CPPUNIT_ASSERT(param.GetName() == L"n1");
	CPPUNIT_ASSERT(param.GetValueText() == L"v1");
	++it;
	param = *it;
	CPPUNIT_ASSERT(param.GetName() == L"n2");
	CPPUNIT_ASSERT(param.GetValueText() == L"v2");

}
开发者ID:,项目名称:,代码行数:28,代码来源:

示例11: CPPUNIT_ASSERT

void CHPQuantificationDataTest::test_AlgParams()
{
	ParameterNameValueTypeList params;
	ParameterNameValueType param;
	CHPQuantificationData data;

	param.SetName(L"n1");
	param.SetValueText(L"v1");
	params.push_back(param);

	param.SetName(L"n2");
	param.SetValueText(L"v2");
	params.push_back(param);

	data.AddAlgParams(params);

	ParameterNameValueTypeList params_out = data.GetAlgParams();
	CPPUNIT_ASSERT(params_out.size() == 2);
	ParameterNameValueTypeList::iterator it = params_out.begin();
	param = *it;
	CPPUNIT_ASSERT(param.GetName() == L"n1");
	CPPUNIT_ASSERT(param.GetValueText() == L"v1");
	++it;
	param = *it;
	CPPUNIT_ASSERT(param.GetName() == L"n2");
	CPPUNIT_ASSERT(param.GetValueText() == L"v2");

}
开发者ID:einon,项目名称:affymetrix-power-tools,代码行数:28,代码来源:CHPQuantificationDataTest.cpp

示例12: AddAlgParams

void CHPMultiDataData::AddAlgParams(const ParameterNameValueTypeList& params)
{
	ParameterNameValueType param;
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	for (ParameterNameValueTypeList::const_iterator it=params.begin(); it != params.end(); it++)
	{
		param = *it;
		param.SetName(ALGORITHM_PARAM_NAME_PREFIX_S + param.GetName());
		hdr->AddNameValParam(param);
	}
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:11,代码来源:CHPMultiDataData.cpp

示例13: AddSummaryParams

void CHPQuantificationData::AddSummaryParams(const ParameterNameValueTypeList& params)
{
	ParameterNameValueType param;
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	for (ParameterNameValueTypeList::const_iterator it=params.begin(); it != params.end(); it++)
	{
		param = *it;
		param.SetName(CHIP_SUMMARY_PARAMETER_NAME_PREFIX_S + param.GetName());
		hdr->AddNameValParam(param);
	}
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例14:

int32_t CHPData::GetInt32FromGenericHdr(const std::wstring& name)
{
	int32_t result = 0;
	ParameterNameValueType paramType;
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	if (hdr->FindNameValParam(name, paramType))
	{
		result = paramType.GetValueInt32();
	}
	return result;
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例15: GetWStringFromGenericHdr

std::wstring CHPQuantificationData::GetWStringFromGenericHdr(const std::wstring& name)
{
	std::wstring result;
	ParameterNameValueType paramType;
	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
	if (hdr->FindNameValParam(name, paramType))
	{
		result = paramType.GetValueText();
	}
	return result;
}
开发者ID:,项目名称:,代码行数:11,代码来源:


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