Commit f120d2ce authored by Ben Huber's avatar Ben Huber

reduced unittest execution times (relates #243)

parent d7c9e416
Pipeline #1219 failed with stages
in 15 minutes and 25 seconds
......@@ -27,8 +27,8 @@ static misc::UnitTest trasd_frr("TRASD", "Fixed_Rank_Recovery", [](){
auto myTRASD = TRASD;
myTRASD.maxIterations = 500;
myTRASD.targetRelativeResidual = 1e-6;
myTRASD.maxIterations = 100;
myTRASD.targetRelativeResidual = 1e-3;
for(const auto d : orders) {
size_t residualSucc = 0, ErrorSucc = 0;
......@@ -52,8 +52,8 @@ static misc::UnitTest trasd_frr("TRASD", "Fixed_Rank_Recovery", [](){
myTRASD(solution, measurments);
const double error = frob_norm(target-solution)/targetNorm;
const double residual = measurments.test(solution);
if(residual < 1e-6) { residualSucc++; }
if(error < 1e-4) { ErrorSucc++; }
if(residual < 1e-3) { residualSucc++; }
if(error < 3e-3) { ErrorSucc++; }
}
MTEST(residualSucc >= successThreshold, "Only " << residualSucc << " of " << runs << " were succesfull in terms of residual.");
......@@ -69,8 +69,8 @@ static misc::UnitTest trasd_rar("TRASD", "Rank_Adaptive_Recovery", [](){
auto myTRASD = TRASD;
myTRASD.maxIterations = 500;
myTRASD.targetRelativeResidual = 1e-6;
myTRASD.maxIterations = 100;
myTRASD.targetRelativeResidual = 1e-3;
for(const auto d : orders) {
size_t residualSucc = 0, ErrorSucc = 0;
......@@ -94,8 +94,8 @@ static misc::UnitTest trasd_rar("TRASD", "Rank_Adaptive_Recovery", [](){
myTRASD(solution, measurments, std::vector<size_t>(d-1, 10));
const double error = frob_norm(target-solution)/targetNorm;
const double residual = measurments.test(solution);
if(residual < 1e-4) { residualSucc++; }
if(error < 1e-4) { ErrorSucc++; }
if(residual < 1e-3) { residualSucc++; }
if(error < 3e-3) { ErrorSucc++; }
}
MTEST(residualSucc >= successThreshold, "Only " << residualSucc << " of " << runs << " were succesfull in terms of residual.");
......
......@@ -115,7 +115,7 @@ static misc::UnitTest tensor_rnd_add_sub("Tensor", "Random_Add_Sub", [](){
std::vector<size_t> dimensions;
std::vector<size_t> idxPow(5, 0);
for(size_t d = 0; d < 10; ++d) {
for(size_t d = 0; d < 5; ++d) {
std::vector<size_t> opDim(dimensions);
opDim.insert(opDim.end(), dimensions.begin(), dimensions.end());
std::uniform_int_distribution<size_t> numDist (0, misc::product(dimensions));
......
......@@ -32,7 +32,7 @@ static misc::UnitTest alg_largestEntry("Algorithm", "LargestEntry", [](){
std::uniform_int_distribution<size_t> dimDist(1, 4);
std::uniform_int_distribution<size_t> rankDist(1, 5);
const size_t D = 15;
const size_t D = 7;
for(size_t k = 0; k < 3; ++k) {
std::vector<size_t> stateDims;
......
......@@ -28,7 +28,7 @@ using namespace xerus;
static misc::UnitTest alg_adf_inverseidx("Algorithm", "adf_inverse_index_ratios", [](){
const size_t D = 6;
const size_t N = 10;
const size_t N = 5;
const size_t R = 3;
const size_t CS = 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment