本文整理汇总了C++中RegressionTest类的典型用法代码示例。如果您正苦于以下问题:C++ RegressionTest类的具体用法?C++ RegressionTest怎么用?C++ RegressionTest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RegressionTest类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exportTest
void CdfExportTest::exportCdf()
{
string command = "./apt-cdf-export -c ../../../rawq/test/data/Test3.CDF -ps Pae_16SrRNA_s_at -ps AFFX-Athal-Actin_5_r_at > "
+ testDir + "/export.Test3.txt";
vector<RegressionCheck *> checks;
RegressionTest exportTest ("exportCdf", command.c_str(), checks);
Verbose::out (1, "\nDoing exportCdf()");
if (!exportTest.run())
{
Verbose::out (1, "Error in CdfExportTest::exportCdf(): " + exportTest.getErrorMsg());
numFailed++;
}
else
{
TextFileCheck exportCheck (testDir + "/export.Test3.txt",
"data/export.Test3.txt", 0);
if (exportCheck.check (errorMsg))
{
numPassed++;
}
else
{
Verbose::out (1, "Error in CdfExportTest::exportCdf(): " + errorMsg);
numFailed++;
}
}
}
示例2: TEST
TEST(RegressionTest, TestFormulate) {
pqxx::connection C("");
pqxx::work W(C);
RegressionTest T;
T.setName("test.module");
T.setModule("test.module.foo");
EXPECT_EQ(T.formulate(W), "INSERT INTO regressions (run_id, name, module) "
"VALUES (0, 'test.module', 'test.module.foo');");
}
示例3: differencesTest
void MD5CheckTest::testFileNotFound()
{
string command = md5app + " -v 2 -i file_does_not_exist";
vector<RegressionCheck *> checks;
RegressionTest differencesTest ("testFileNotFound", command.c_str(), checks);
Verbose::out (1, "\nDoing testFileNotFound()");
if (differencesTest.run() == false)
++numPassed;
else
{
Verbose::out (1, "Error in MD5CheckTest::testFileNotFound(): " + differencesTest.getErrorMsg());
++numFailed;
}
}
示例4: differencesTest
// ignore column with integer differences Cyto2.AntigenomicProbes.ProbeID
void File5EquivalentTest::testIgnoreListPositive()
{
string command = "./apt-file5-equivalent -e 0.005 -c 1.1 -d ./data/datasets_integer_diff.txt -i ./data/ignore_columns.txt ./data/demean_false_diff1.ref.a5 ./data/demean_false_diff2.ref.a5";
vector<RegressionCheck *> checks;
RegressionTest differencesTest ("testIgnoreListPositive", command, checks);
Verbose::out (1, "\nDoing testIgnoreListPositive()");
if (differencesTest.run()) {
++numPassed;
}
else {
Verbose::out (1, "Error in File5EquivalentTest::testIgnoreListPositive(): " + differencesTest.getErrorMsg());
++numFailed;
}
}
示例5: MixedFileCheck
void CelExtractTest::doExtractIntensitiesSubset()
{
string command = "./apt-cel-extract --probeset-ids=../../../regression-data/data/idata/cel-extract/HG-U133_Plus_2/ps.txt -o " + testDir + "/qt.extract.intensities.sub.txt -s ../../../regression-data/data/idata/lib/HG-U133_Plus_2/HG-U133_Plus_2.spf " + tissueCels;
vector<RegressionCheck *> checks;
checks.push_back(new MixedFileCheck(testDir + "/qt.extract.intensities.sub.txt",
"../../../regression-data/data/idata/cel-extract/HG-U133_Plus_2/qt.extract.intensities.sub.txt",
0.1,
0,0));
RegressionTest extractTest ("qt-doExtractIntensitiesSubset", command.c_str(), checks);
Verbose::out (1, "Doing qt-doExtractIntensitiesSubset()");
if (!extractTest.pass()) {
Verbose::out(1, "Error in qt-doExtractIntensitiesSubset():" + extractTest.getErrorMsg());
numFailed++;
}
else {
numPassed++;
}
}
示例6: setupTestVector
RegTestVec setupTestVector(RegTestMap& availableTests,
const RegTestSuite& testsToRun)
{
RegTestVec res;
for(RegTestSuite::const_iterator itr = testsToRun.begin();
itr != testsToRun.end();
itr++)
{
const std::string& curTest = *itr;
std::size_t delim = curTest.find_first_of(' ');
std::string name;
std::string arg;
if(delim == string::npos) {
name = curTest;
} else {
arg = curTest.substr(delim+1);
name = curTest.substr(0, delim);
}
coreprintln("curTest: %s name: %s",
curTest.c_str(), name.c_str());
RegTestMap::iterator regItr = availableTests.find(name);
if(regItr != availableTests.end()) {
RegressionTest* reg =
regItr->second(regItr->first.c_str());
reg->setArg(arg);
res.push_back(reg);
coreprintln("push_back: %s", reg->getTestName());
} else {
coreprintln_warn("WARNING: Test not found: %s", name.c_str());
}
}
return res;
}
示例7: getRegressionTest
ssize_t Device::getProperty(const RTCDeviceProperty prop)
{
size_t iprop = (size_t)prop;
/* get name of internal regression test */
if (iprop >= 2000000 && iprop < 3000000)
{
RegressionTest* test = getRegressionTest(iprop-2000000);
if (test) return (ssize_t) test->name.c_str();
else return 0;
}
/* run internal regression test */
if (iprop >= 3000000 && iprop < 4000000)
{
RegressionTest* test = getRegressionTest(iprop-3000000);
if (test) return test->run();
else return 0;
}
/* documented properties */
switch (prop)
{
case RTC_DEVICE_PROPERTY_VERSION_MAJOR: return RTC_VERSION_MAJOR;
case RTC_DEVICE_PROPERTY_VERSION_MINOR: return RTC_VERSION_MINOR;
case RTC_DEVICE_PROPERTY_VERSION_PATCH: return RTC_VERSION_PATCH;
case RTC_DEVICE_PROPERTY_VERSION : return RTC_VERSION;
#if defined(EMBREE_TARGET_SIMD4) && defined(EMBREE_RAY_PACKETS)
case RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED: return hasISA(SSE2);
#else
case RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED: return 0;
#endif
#if defined(EMBREE_TARGET_SIMD8) && defined(EMBREE_RAY_PACKETS)
case RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED: return hasISA(AVX);
#else
case RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED: return 0;
#endif
#if defined(EMBREE_TARGET_SIMD16) && defined(EMBREE_RAY_PACKETS)
case RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED: return hasISA(AVX512KNL) | hasISA(AVX512SKX);
#else
case RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED: return 0;
#endif
#if defined(EMBREE_RAY_PACKETS)
case RTC_DEVICE_PROPERTY_RAY_STREAM_SUPPORTED: return 1;
#else
case RTC_DEVICE_PROPERTY_RAY_STREAM_SUPPORTED: return 0;
#endif
#if defined(EMBREE_RAY_MASK)
case RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED: return 1;
#else
case RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED: return 0;
#endif
#if defined(EMBREE_BACKFACE_CULLING)
case RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED: return 1;
#else
case RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED: return 0;
#endif
#if defined(EMBREE_FILTER_FUNCTION)
case RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED: return 1;
#else
case RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED: return 0;
#endif
#if defined(EMBREE_IGNORE_INVALID_RAYS)
case RTC_DEVICE_PROPERTY_IGNORE_INVALID_RAYS_ENABLED: return 1;
#else
case RTC_DEVICE_PROPERTY_IGNORE_INVALID_RAYS_ENABLED: return 0;
#endif
#if defined(TASKING_INTERNAL)
case RTC_DEVICE_PROPERTY_TASKING_SYSTEM: return 0;
#endif
#if defined(TASKING_TBB)
case RTC_DEVICE_PROPERTY_TASKING_SYSTEM: return 1;
#endif
#if defined(TASKING_PPL)
case RTC_DEVICE_PROPERTY_TASKING_SYSTEM: return 2;
#endif
#if defined(EMBREE_GEOMETRY_TRIANGLE)
case RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED: return 1;
#else
case RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED: return 0;
#endif
#if defined(EMBREE_GEOMETRY_QUAD)
case RTC_DEVICE_PROPERTY_QUAD_GEOMETRY_SUPPORTED: return 1;
#else
case RTC_DEVICE_PROPERTY_QUAD_GEOMETRY_SUPPORTED: return 0;
#endif
//.........这里部分代码省略.........
示例8: getRegressionTest
ssize_t Device::getParameter1i(const RTCParameter parm)
{
size_t iparm = (size_t)parm;
/* get name of internal regression test */
if (iparm >= 2000000 && iparm < 3000000)
{
RegressionTest* test = getRegressionTest(iparm-2000000);
if (test) return (ssize_t) test->name.c_str();
else return 0;
}
/* run internal regression test */
if (iparm >= 3000000 && iparm < 4000000)
{
RegressionTest* test = getRegressionTest(iparm-3000000);
if (test) return test->run();
else return 0;
}
/* documented parameters */
switch (parm)
{
case RTC_CONFIG_VERSION_MAJOR: return RTCORE_VERSION_MAJOR;
case RTC_CONFIG_VERSION_MINOR: return RTCORE_VERSION_MINOR;
case RTC_CONFIG_VERSION_PATCH: return RTCORE_VERSION_PATCH;
case RTC_CONFIG_VERSION : return RTCORE_VERSION;
case RTC_CONFIG_INTERSECT1: return 1;
#if defined(EMBREE_TARGET_SIMD4) && defined(EMBREE_RAY_PACKETS)
case RTC_CONFIG_INTERSECT4: return hasISA(SSE2);
#else
case RTC_CONFIG_INTERSECT4: return 0;
#endif
#if defined(EMBREE_TARGET_SIMD8) && defined(EMBREE_RAY_PACKETS)
case RTC_CONFIG_INTERSECT8: return hasISA(AVX);
#else
case RTC_CONFIG_INTERSECT8: return 0;
#endif
#if defined(EMBREE_TARGET_SIMD16) && defined(EMBREE_RAY_PACKETS)
case RTC_CONFIG_INTERSECT16: return hasISA(AVX512KNL) | hasISA(AVX512SKX);
#else
case RTC_CONFIG_INTERSECT16: return 0;
#endif
#if defined(EMBREE_RAY_PACKETS)
case RTC_CONFIG_INTERSECT_STREAM: return 1;
#else
case RTC_CONFIG_INTERSECT_STREAM: return 0;
#endif
#if defined(EMBREE_RAY_MASK)
case RTC_CONFIG_RAY_MASK: return 1;
#else
case RTC_CONFIG_RAY_MASK: return 0;
#endif
#if defined(EMBREE_BACKFACE_CULLING)
case RTC_CONFIG_BACKFACE_CULLING: return 1;
#else
case RTC_CONFIG_BACKFACE_CULLING: return 0;
#endif
#if defined(EMBREE_INTERSECTION_FILTER)
case RTC_CONFIG_INTERSECTION_FILTER: return 1;
#else
case RTC_CONFIG_INTERSECTION_FILTER: return 0;
#endif
#if defined(EMBREE_INTERSECTION_FILTER_RESTORE)
case RTC_CONFIG_INTERSECTION_FILTER_RESTORE: return 1;
#else
case RTC_CONFIG_INTERSECTION_FILTER_RESTORE: return 0;
#endif
#if defined(EMBREE_IGNORE_INVALID_RAYS)
case RTC_CONFIG_IGNORE_INVALID_RAYS: return 1;
#else
case RTC_CONFIG_IGNORE_INVALID_RAYS: return 0;
#endif
#if defined(TASKING_INTERNAL)
case RTC_CONFIG_TASKING_SYSTEM: return 0;
#endif
#if defined(TASKING_TBB)
case RTC_CONFIG_TASKING_SYSTEM: return 1;
#endif
#if defined(TASKING_PPL)
case RTC_CONFIG_TASKING_SYSTEM: return 2;
#endif
#if defined(EMBREE_GEOMETRY_TRIANGLES)
case RTC_CONFIG_TRIANGLE_GEOMETRY: return 1;
#else
case RTC_CONFIG_TRIANGLE_GEOMETRY: return 0;
//.........这里部分代码省略.........
示例9: main
int main(int argc, char** argv)
{
if(argc!=2)
{
std::cout<<"Usage: regression.exe configurationFile\n";
return 1;
}
std::string parameterFile(argv[1]);
RegressionManager manager;
bool status = true;
status = manager.init(parameterFile);
if(status)
{
manager.makeRegression();
}
if(!status)
std::cout<<"FATAL: A fatal error occured - QUIT -\n";
else
std::cout<<"- Finish - All good -\n";
/*
TFile *file = new TFile("GBR_Clustering_70pre11_Photons_EG_results.root","READ");
const std::vector<std::string> *varlist = (std::vector<std::string>*)file->Get("varlistEB");
const GBRForest *forest = (GBRForest*)file->Get("EBCorrection");
int numvars = varlist->size();
int numtrees = forest->Trees().size();
printf("liste des variables \n");
for (int ivar = 0; ivar<numvars; ++ivar) {
printf("%i: %s\n",ivar, varlist->at(ivar).c_str());
}
printf("nombre de trees : %i \n",numtrees);
TTree *dtree;
TFile *fdin = TFile::Open("~/eos/cms/store/group/phys_egamma/lgray/PhotonRegressionTrees_23012014_v2-runPhotonRegressionTrees_cfg/runPhotonRegressionTrees_cfg-step4_RECO_EI-0006AD69-4A69-E211-922D-002354EF3BE4.root");
TDirectory *ddir = (TDirectory*)fdin->FindObjectAny("egSCTree");
dtree = (TTree*)ddir->Get("SuperClusterTree");
float* Input;
Input = new float[numvars];
dtree->SetBranchAddress("scEta",&Input[0]);
dtree->SetBranchAddress("scPhi",&Input[1]);
dtree->SetBranchAddress("scEtaWidth",&Input[2]);
dtree->SetBranchAddress("scPhiWidth",&Input[3]);
double Output;
for (int i=0;i<100;i++){
dtree->GetEntry(i);
//printf(" eta =%f phi =%f etawidth = %f phiwidth = %f \n",scEta,scPhi, scEtaWidth, scPhiWidth);
//Input[0]=scEta;
//Input[1]=scPhi;
//Input[2]=scEtaWidth;
//Input[3]=scPhiWidth;
Output=forest->GetResponse(Input);
printf("Ecor/Eraw = %f \n",Output);
}
*/
RegressionTest test;
test.init("GBR_Clustering_70pre11_Photons_EG_results.root","~/eos/cms/store/group/phys_egamma/lgray/PhotonRegressionTrees_23012014_v2-runPhotonRegressionTrees_cfg/runPhotonRegressionTrees_cfg-step4_RECO_EI-FA47A89F-906A-E211-9ABF-003048FFCBB0.root","egSCTree","SuperClusterTree");
test.PlotResponse();
return status;
}