#include <NumericFileComparison.hpp>
Public Member Functions | |
NumericFileComparison (std::string fileName1, std::string fileName2) | |
~NumericFileComparison () | |
bool | CompareFiles (double absTolerance=DBL_EPSILON, unsigned ignoreFirstFewLines=0) |
Private Attributes | |
std::string | mFilename1 |
std::string | mFilename2 |
std::ifstream * | mpFile1 |
std::ifstream * | mpFile2 |
Compare files of numbers to see if they match to within a given tolerance.
Definition at line 37 of file NumericFileComparison.hpp.
NumericFileComparison::NumericFileComparison | ( | std::string | fileName1, | |
std::string | fileName2 | |||
) | [inline] |
Specify two files to compare, and open them for reading. Actual comparison is done by calling CompareFiles.
fileName1 | first file | |
fileName2 | second file |
Definition at line 53 of file NumericFileComparison.hpp.
NumericFileComparison::~NumericFileComparison | ( | ) | [inline] |
Close the files being compared.
Definition at line 78 of file NumericFileComparison.hpp.
bool NumericFileComparison::CompareFiles | ( | double | absTolerance = DBL_EPSILON , |
|
unsigned | ignoreFirstFewLines = 0 | |||
) | [inline] |
Compare the files.
absTolerance | absolute tolerance on difference between numbers. | |
ignoreFirstFewLines | How many lines to ignore from the comparison |
Definition at line 98 of file NumericFileComparison.hpp.
References mFilename1, mFilename2, mpFile1, and mpFile2.
std::string NumericFileComparison::mFilename1 [private] |
First filename
Definition at line 40 of file NumericFileComparison.hpp.
Referenced by CompareFiles().
std::string NumericFileComparison::mFilename2 [private] |
Second filename
Definition at line 41 of file NumericFileComparison.hpp.
Referenced by CompareFiles().
std::ifstream* NumericFileComparison::mpFile1 [private] |
First file
Definition at line 43 of file NumericFileComparison.hpp.
Referenced by CompareFiles(), NumericFileComparison(), and ~NumericFileComparison().
std::ifstream* NumericFileComparison::mpFile2 [private] |
Second file
Definition at line 44 of file NumericFileComparison.hpp.
Referenced by CompareFiles(), NumericFileComparison(), and ~NumericFileComparison().