本文整理汇总了C++中ParameterNameValueType::GetValueFloat方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterNameValueType::GetValueFloat方法的具体用法?C++ ParameterNameValueType::GetValueFloat怎么用?C++ ParameterNameValueType::GetValueFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterNameValueType
的用法示例。
在下文中一共展示了ParameterNameValueType::GetValueFloat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testRead
void CHPMultiDataFileReaderTest::testRead()
{
affymetrix_calvin_data::ProbeSetMultiDataExpressionData ex;
affymetrix_calvin_data::ProbeSetMultiDataGenotypeData gn;
ParameterNameValueType param;
CHPMultiDataData data2;
CHPMultiDataFileReader reader;
reader.SetFilename("../data/CHP_MultiData_file");
reader.Read(data2);
CPPUNIT_ASSERT(data2.GetAlgName() == L"sig");
CPPUNIT_ASSERT(data2.GetAlgVersion() == L"1.0");
CPPUNIT_ASSERT(data2.GetArrayType() == L"test3");
CPPUNIT_ASSERT(data2.GetEntryCount(ExpressionMultiDataType) == 1);
CPPUNIT_ASSERT(data2.GetEntryCount(GenotypeMultiDataType) == 2);
// expression
CPPUNIT_ASSERT(data2.GetNumMetricColumns(ExpressionMultiDataType) == 0);
data2.GetExpressionEntry(ExpressionMultiDataType, 0, ex);
CPPUNIT_ASSERT_DOUBLES_EQUAL(ex.quantification, 10.0f, 0.0001f);
CPPUNIT_ASSERT(ex.name == "ex1");
// genotype
CPPUNIT_ASSERT(data2.GetNumMetricColumns(GenotypeMultiDataType) == 2);
CPPUNIT_ASSERT(data2.GetMetricColumnName(GenotypeMultiDataType, 0) == L"int");
CPPUNIT_ASSERT(data2.GetMetricColumnName(GenotypeMultiDataType, 1) == L"float");
data2.GetGenotypeEntry(GenotypeMultiDataType, 0, gn);
CPPUNIT_ASSERT(gn.call == 1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(gn.confidence, 11.0f, 0.0001f);
CPPUNIT_ASSERT(gn.name == "gn1");
CPPUNIT_ASSERT(gn.metrics.size() == 2);
param = gn.metrics[0];
CPPUNIT_ASSERT(param.GetParameterType() == ParameterNameValueType::Int32Type);
CPPUNIT_ASSERT(param.GetValueInt32() == 1);
param = gn.metrics[1];
CPPUNIT_ASSERT(param.GetParameterType() == ParameterNameValueType::FloatType);
CPPUNIT_ASSERT_DOUBLES_EQUAL(param.GetValueFloat(), 2.0f, 0.00001f);
data2.GetGenotypeEntry(GenotypeMultiDataType, 1, gn);
CPPUNIT_ASSERT(gn.call == 2);
CPPUNIT_ASSERT_DOUBLES_EQUAL(gn.confidence, 22.0f, 0.0001f);
CPPUNIT_ASSERT(gn.name == "gn2");
CPPUNIT_ASSERT(gn.metrics.size() == 2);
param = gn.metrics[0];
CPPUNIT_ASSERT(param.GetParameterType() == ParameterNameValueType::Int32Type);
CPPUNIT_ASSERT(param.GetValueInt32() == 2);
param = gn.metrics[1];
CPPUNIT_ASSERT(param.GetParameterType() == ParameterNameValueType::FloatType);
CPPUNIT_ASSERT_DOUBLES_EQUAL(param.GetValueFloat(), 3.0f, 0.00001f);
}
示例2: GetGrid
/*
* Get the grid from the parameters.
*/
GridCoordinatesType CELConversionUtilities::GetGrid(CelFileData &inFile)
{
GridCoordinatesType grid;
ParameterNameValueType nvt;
grid.lowerleft.x = grid.lowerleft.y = 0;
grid.upperleft.x = grid.upperleft.y = 0;
grid.lowerright.x = grid.lowerright.y = 0;
grid.upperright.x = grid.upperright.y = 0;
if (inFile.FindAlgorithmParameter(GRIDULX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.upperleft.x = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDULY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.upperleft.y = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDURX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.upperright.x = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDURY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.upperright.y = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDLRX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.lowerright.x = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDLRY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.lowerright.y = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDLLX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.lowerleft.x = (int) nvt.GetValueFloat();
if (inFile.FindAlgorithmParameter(GRIDLLY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
grid.lowerleft.y = (int) nvt.GetValueFloat();
return grid;
}
示例3: GetGridCorners
/*
* Get the grid coordinates.
*/
affymetrix_fusion_io::FGridCoords CalvinCELDataAdapter::GetGridCorners()
{
affymetrix_fusion_io::FGridCoords zeroGrid;
affymetrix_fusion_io::FGridCoords grid;
ParameterNameValueType nvt;
if (calvinCel.FindAlgorithmParameter(GRIDULX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.upperleft.x = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDULY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.upperleft.y = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDURX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.upperright.x = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDURY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.upperright.y = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDLRX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.lowerright.x = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDLRY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.lowerright.y = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDLLX_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.lowerleft.x = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
if (calvinCel.FindAlgorithmParameter(GRIDLLY_PARAM_NAME, nvt) && nvt.GetParameterType() == ParameterNameValueType::FloatType)
{
grid.lowerleft.y = nvt.GetValueFloat();
}
else
{
return zeroGrid;
}
return grid;
}