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


C++ DataSetHeader类代码示例

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


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

示例1: AddReseqColumns

void CHPData::AddReseqColumns(DataSetHeader& hdr)
{
	hdr.SetName(CHP_RESEQ_GROUP);
	//call - char
	hdr.AddByteColumn(CallColName);
	//Score - float
	hdr.AddFloatColumn(ScoreColName);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例2: AddColumns

void CHPQuantificationData::AddColumns(DataSetHeader& hdr, bool keyIsID)
{
    if (keyIsID == false)
        hdr.AddAsciiColumn(QUANTIFICATION_PROBE_SET_NAME, maxProbeSetName);
    else
        hdr.AddIntColumn(QUANTIFICATION_PROBE_SET_ID);
	hdr.AddFloatColumn(QUANTIFICATION_QUANTIFICATION_NAME);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3: SetEntryCount

void CHPData::SetEntryCount(int32_t ln, int32_t maxln, bool hasCompData)
{
	maxProbeSetName = maxln;
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	AddColumns(dpHdr, hasCompData);
	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(0);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: c

void CDFData::CreateContentsGroup(const std::wstring& p, int32_t probesetCnt)
{
	DataGroupHeader c(p);
	DataSetHeader dp;
	dp.SetRowCnt(probesetCnt);
	dp.SetName(p);
	dp.AddUnicodeColumn(L"", MAX_CDF_PROBE_SET_NAME_LENGTH);
	dp.AddIntColumn(L"");
	c.AddDataSetHdr(dp);
	genericData.Header().AddDataGroupHdr(c);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:11,代码来源:CDFData.cpp

示例5: WriteColumnTypes

void DataSetHeaderWriter::WriteColumnTypes(std::ofstream &os, const DataSetHeader &dc) const
{
	int32_t sz = dc.GetColumnCnt();
	
	// Write the types
	for(int i = 0; i < sz; i++)
	{
		ColumnInfo col = dc.GetColumnInfo(i);
		FileOutput::WriteString16(os, col.GetName());
		FileOutput::WriteInt8(os, col.GetColumnType());
		FileOutput::WriteInt32(os, col.GetSize());
	}
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:13,代码来源:DataSetHeaderWriter.cpp

示例6: SetOrigCnt

void CHPData::SetOrigCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_RESEQ_ORIG_CALL_GROUP);

	//position - int
	dpHdr.AddIntColumn(PositionColName);
	//call - byte
	dpHdr.AddByteColumn(OriginalCallColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(3);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例7: SetEntryCount

void CHPMultiDataData::SetEntryCount(MultiDataType dataType, int32_t ln, int32_t maxln, const std::vector<ColumnInfo> &columns, const std::wstring &groupName)
{
	DataSetInfo info;
	info.maxName = maxln;
	info.metricColumns = columns;
	info.entries = NULL;
	info.dataType = dataType;
	info.dataSetIndex = (int)dataSetInfo.size();
	dataSetInfo[dataType] = info;

	DataSetHeader dsHdr;
	dsHdr.SetRowCnt(ln);
	dsHdr.SetName(MultiDataDataSetNames[(int)dataType]);
	AddColumns(info, dsHdr);

    if (groupName.empty() == true)
        dataTypeGroupNames[dataType] = MULTI_DATA_NAME;
    else
        dataTypeGroupNames[dataType] = groupName;
	DataGroupHeader* dgHdr = GetDataGroupHeader(dataTypeGroupNames[dataType]);
	dgHdr->AddDataSetHdr(dsHdr);
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:22,代码来源:CHPMultiDataData.cpp

示例8: AddGenoColumns

void CHPData::AddGenoColumns(DataSetHeader& hdr)
{
	hdr.SetName(CHP_GENO_GROUP);
	//Probeset name - string
	hdr.AddAsciiColumn(ProbeSetNameColName, maxProbeSetName);
	//Call - unsigned char
	hdr.AddUByteColumn(CallColName);
	//Confidence - float
	hdr.AddFloatColumn(ConfidenceColName);
	//RAS1 - float
	hdr.AddFloatColumn(RAS1ColName);
	//RAS2 - float
	hdr.AddFloatColumn(RAS2ColName);
	//AA Call - float
	hdr.AddFloatColumn(AAColName);
	//AB Call - float
	hdr.AddFloatColumn(ABColName);
	//BB Call - float
	hdr.AddFloatColumn(BBColName);
	//No Call - float
	hdr.AddFloatColumn(NoCallColName);
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例9: 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,代码来源:

示例10: WriteNameValParams

void DataSetHeaderWriter::WriteNameValParams(std::ofstream &os, DataSetHeader &dc)
{
	ParameterNameValueTypeConstIt begin;
	ParameterNameValueTypeConstIt end;
	dc.GetNameValIterators(begin, end);
	while(begin != end)
	{
		FileOutput::WriteString16(os, begin->GetName());
		MIMEValue mv = begin->GetMIMEValue();
		u_int32_t sz;
		const void* ptr = mv.GetValue(sz);
		FileOutput::WriteBlob(os, ptr, sz);
		FileOutput::WriteString16(os, begin->GetMIMEType());
		begin++;
	}
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:16,代码来源:DataSetHeaderWriter.cpp

示例11: SetBackgroundZoneCnt

void CHPData::SetBackgroundZoneCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_BG_ZONE_GROUP);

	//center X coord - float
	dpHdr.AddFloatColumn(CenterXColName);
	//center Y coord - float
	dpHdr.AddFloatColumn(CenterYColName);
	//background - float
	dpHdr.AddFloatColumn(BackgroundColName);
	//smoothing factor - float
	dpHdr.AddFloatColumn(SmoothFactorColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(1);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例12: AssignmentTest

void DataSetHeaderTest::AssignmentTest()
{
	header->SetName(L"pixel data");
	header->AddUShortColumn(L"Intensity");
	header->SetRowCnt(101);
	ParameterNameValueType t1;
	t1.SetName(L"Scanner");
	t1.SetValueText(L"M10");
	header->AddNameValParam(t1);
	ParameterNameValueType t2;
	t2.SetName(L"Pixel Size");
	t2.SetValueText(L"0.051");
	header->AddNameValParam(t2);

	DataSetHeader assignee;
	assignee = *header;

	// Check that the assignment worked
	CPPUNIT_ASSERT(assignee.GetName() == header->GetName());
	CPPUNIT_ASSERT(assignee.GetColumnCnt() == header->GetColumnCnt());
	CPPUNIT_ASSERT(assignee.GetNameValParamCnt() == header->GetNameValParamCnt());
	CPPUNIT_ASSERT(assignee.GetRowCnt() == header->GetRowCnt());
	CPPUNIT_ASSERT(assignee.GetColumnInfo(0) == header->GetColumnInfo(0));

	ParameterNameValueTypeConstIt nvpAssigneeBegin, nvpAssigneeEnd;
	assignee.GetNameValIterators(nvpAssigneeBegin, nvpAssigneeEnd);
	ParameterNameValueTypeConstIt nvpHeaderBegin, nvpHeaderEnd;
	assignee.GetNameValIterators(nvpHeaderBegin, nvpHeaderEnd);
	CPPUNIT_ASSERT(*nvpAssigneeBegin == *nvpHeaderBegin);
	++nvpAssigneeBegin;
	++nvpHeaderBegin;
	CPPUNIT_ASSERT(*nvpAssigneeBegin == *nvpHeaderBegin);
	++nvpAssigneeBegin;
	++nvpHeaderBegin;
	CPPUNIT_ASSERT(nvpAssigneeBegin == nvpAssigneeEnd);
	CPPUNIT_ASSERT(nvpHeaderBegin == nvpHeaderEnd);

	// TBD: no test of row offset array.
}
开发者ID:einon,项目名称:affymetrix-power-tools,代码行数:39,代码来源:DataSetHeaderTest.cpp

示例13: SetForceCnt

void CHPData::SetForceCnt(int32_t ln)
{
	DataSetHeader dpHdr;
	dpHdr.SetRowCnt(ln);
	dpHdr.SetName(CHP_RESEQ_FORCE_CALL_GROUP);

	//position - int
	dpHdr.AddIntColumn(PositionColName);
	//call - byte
	dpHdr.AddByteColumn(ForceCallColName);
	//reason - byte
	dpHdr.AddByteColumn(ReasonColName);

	DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(2);
	dcHdr->AddDataSetHdr(dpHdr);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例14: WriteColumnCnt

void DataSetHeaderWriter::WriteColumnCnt(std::ofstream &os, const DataSetHeader &dc) const
{
	FileOutput::WriteInt32(os, dc.GetColumnCnt());
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:4,代码来源:DataSetHeaderWriter.cpp

示例15: WriteName

void DataSetHeaderWriter::WriteName(std::ofstream &os, const DataSetHeader &dc) const
{
	FileOutput::WriteString16(os, dc.GetName());
}
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:4,代码来源:DataSetHeaderWriter.cpp


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