Class interface representing a table comparator. To be used with a service implementing ISimpleTableOutput. More...
#include <arcane/core/ISimpleTableComparator.h>
Public Member Functions | |
| virtual void | init (ISimpleTableOutput *simple_table_output_ptr)=0 |
| Method allowing the service to be initialized. | |
| virtual void | clear ()=0 |
| Method allowing the data read by readReferenceFile() to be cleared. | |
| virtual void | print (Integer rank=0)=0 |
| Method allowing the read table to be displayed. | |
| virtual void | editRootDirectory (const Directory &root_directory)=0 |
| Method allowing the root directory to be modified. This allows writing or searching for reference files elsewhere than in the directory determined by the implementation. | |
| virtual bool | writeReferenceFile (Integer rank=-1)=0 |
| Method allowing reference files to be written. | |
| virtual bool | readReferenceFile (Integer rank=-1)=0 |
| Method allowing reference files to be read. | |
| virtual bool | isReferenceExist (Integer rank=-1)=0 |
| Method allowing to check if the reference files exist. | |
| virtual bool | compareWithReference (Integer rank=-1, bool compare_dimension_too=false)=0 |
| Method allowing the ISimpleTableOutput object to be compared to the reference files. | |
| virtual bool | compareElemWithReference (const String &column_name, const String &row_name, Integer rank=-1)=0 |
| Method allowing only an element to be compared. Both SimpleTableInternals are represented by Refs, so they are always up to date. This method can be used during calculation, allowing to compare values as the calculation progresses, instead of performing a final comparison at the end (it is still possible to do both). | |
| virtual bool | compareElemWithReference (Real elem, const String &column_name, const String &row_name, Integer rank=-1)=0 |
| Method allowing a value to be compared with a value from the reference table. This method does not need an internal 'toCompare' (setInternalToCompare() unnecessary). | |
| virtual bool | addColumnForComparing (const String &column_name)=0 |
| Method allowing a column to be added to the list of columns to be compared. | |
| virtual bool | addRowForComparing (const String &row_name)=0 |
| Method allowing a row to be added to the list of rows to be compared. | |
| virtual void | isAnArrayExclusiveColumns (bool is_exclusive)=0 |
| Method allowing definition whether the array of columns represents the columns to include in the comparison (false/default) or represents the columns to exclude from the comparison (true). | |
| virtual void | isAnArrayExclusiveRows (bool is_exclusive)=0 |
| Method allowing definition whether the array of rows represents the rows to include in the comparison (false/default) or represents the rows to exclude from the comparison (true). | |
| virtual void | editRegexColumns (const String ®ex_column)=0 |
| Method allowing a regular expression to be added to determine the columns to compare. | |
| virtual void | editRegexRows (const String ®ex_row)=0 |
| Method allowing a regular expression to be added to determine the rows to compare. | |
| virtual void | isARegexExclusiveColumns (bool is_exclusive)=0 |
| Method allowing to request that the regular expression excludes columns instead of including them. | |
| virtual void | isARegexExclusiveRows (bool is_exclusive)=0 |
| Method allowing to request that the regular expression excludes rows instead of including them. | |
| virtual bool | addEpsilonColumn (const String &column_name, Real epsilon)=0 |
| Method allowing an epsilon to be defined for a given column. This epsilon must be positive to be taken into account. If there is a conflict with a row epsilon (defined with addEpsilonRow()), the largest epsilon is taken into account. | |
| virtual bool | addEpsilonRow (const String &row_name, Real epsilon)=0 |
| Method allowing an epsilon to be defined for a given row. This epsilon must be positive to be taken into account. If there is a conflict with a column epsilon (defined with addEpsilonColumn()), the largest epsilon is taken into account. | |
Class interface representing a table comparator. To be used with a service implementing ISimpleTableOutput.
The difference with ISimpleTableInternalComparator is that we compare a SimpleTableInternal contained in an ISimpleTableOutput with a SimpleTableInternal generated from a reference file.
This interface also allows generating the reference files using the directory name and the table name of the ISimpleTableOutput, facilitating the process.
Definition at line 46 of file ISimpleTableComparator.h.
|
pure virtual |
Method allowing a column to be added to the list of columns to be compared.
| column_name | The name of the column to compare. |
|
pure virtual |
Method allowing an epsilon to be defined for a given column. This epsilon must be positive to be taken into account. If there is a conflict with a row epsilon (defined with addEpsilonRow()), the largest epsilon is taken into account.
| column_name | The name of the column where the epsilon will be taken into account. |
| epsilon | The epsilon error margin. |
|
pure virtual |
Method allowing an epsilon to be defined for a given row. This epsilon must be positive to be taken into account. If there is a conflict with a column epsilon (defined with addEpsilonColumn()), the largest epsilon is taken into account.
| column_name | The name of the row where the epsilon will be taken into account. |
| epsilon | The epsilon error margin. |
|
pure virtual |
Method allowing a row to be added to the list of rows to be compared.
| row_name | The name of the row to compare. |
|
pure virtual |
Method allowing the data read by readReferenceFile() to be cleared.
|
pure virtual |
Method allowing only an element to be compared. Both SimpleTableInternals are represented by Refs, so they are always up to date. This method can be used during calculation, allowing to compare values as the calculation progresses, instead of performing a final comparison at the end (it is still possible to do both).
| column_name | The name of the column where the element is located. |
| row_name | The name of the row where the element is located. |
| rank | The process that must compare its results (-1 for all processes). |
|
pure virtual |
Method allowing a value to be compared with a value from the reference table. This method does not need an internal 'toCompare' (setInternalToCompare() unnecessary).
| elem | The value to be compared. |
| column_name | The name of the column where the reference element is located. |
| row_name | The name of the row where the reference element is located. |
| rank | The process that must compare its results (-1 for all processes). |
|
pure virtual |
Method allowing the ISimpleTableOutput object to be compared to the reference files.
| rank | The process that must compare its results (-1 for all processes). |
| compare_dimension_too | Whether the dimensions of the value tables should also be compared. |
|
pure virtual |
Method allowing a regular expression to be added to determine the columns to compare.
| regex_column | The regular expression (ECMAScript format). |
|
pure virtual |
Method allowing a regular expression to be added to determine the rows to compare.
| regex_row | The regular expression (ECMAScript format). |
|
pure virtual |
Method allowing the root directory to be modified. This allows writing or searching for reference files elsewhere than in the directory determined by the implementation.
By default, for the csv implementation, the root directory is: ./output/csv_ref/
| root_directory | The new root directory. |
|
pure virtual |
Method allowing the service to be initialized.
The pointer to an ISimpleTableOutput implementation must contain the values to be compared or written as reference values and the destination location of the output files, so that the location of the reference files is automatically determined.
| simple_table_output_ptr | An implementation of ISimpleTableOutput. |
|
pure virtual |
Method allowing definition whether the array of columns represents the columns to include in the comparison (false/default) or represents the columns to exclude from the comparison (true).
| is_exclusive | true if the columns must be excluded. |
|
pure virtual |
Method allowing definition whether the array of rows represents the rows to include in the comparison (false/default) or represents the rows to exclude from the comparison (true).
| is_exclusive | true if the rows must be excluded. |
|
pure virtual |
Method allowing to request that the regular expression excludes columns instead of including them.
| is_exclusive | If the regular expression is exclusive. |
|
pure virtual |
Method allowing to request that the regular expression excludes rows instead of including them.
| is_exclusive | If the regular expression is exclusive. |
|
pure virtual |
Method allowing to check if the reference files exist.
| rank | The process that must look for its file (-1 for all processes). |
|
pure virtual |
Method allowing the read table to be displayed.
| rank | The process that must display its table (-1 for all processes). |
|
pure virtual |
Method allowing reference files to be read.
The type of the reference files must correspond to the implementation of this chosen interface (example: .csv file -> SimpleCsvComparatorService).
| rank | The process that must read its file (-1 for all processes). |
|
pure virtual |
Method allowing reference files to be written.
| rank | The process that must write its file (-1 for all processes). |