Show
Ignore:
Timestamp:
08/03/09 08:09:16 (15 years ago)
Author:
vbarta
Message:

computing mean tolerance from variance

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/mat_checks.cpp

    r456 r465  
    1212    for (int i = 0; i < expected.length(); ++i) { 
    1313        if (!AreClose(expected(i), actual(i), tolerance)) { 
     14            return false; 
     15        } 
     16    } 
     17 
     18    return true; 
     19} 
     20 
     21bool AreClose(const itpp::vec &expected, const itpp::vec &actual, 
     22              const itpp::vec &tolerance) { 
     23    if ((expected.length() != actual.length()) || 
     24        (actual.length() != tolerance.length())) { 
     25        return false; 
     26    } 
     27 
     28    for (int i = 0; i < expected.length(); ++i) { 
     29        if (!AreClose(expected(i), actual(i), tolerance(i))) { 
    1430            return false; 
    1531        }