import { MetaTable, TableInterface, TestcaseDefinitionInterface } from '../model/index.js'; import { LoggerInterface } from '../logger/index.js'; import { MetaRowColumn } from './Meta.js'; /** * Options for initializing a TableMatrix. */ export interface TableMatrixOptions { /** * The file name of the table. */ fileName: string; /** * The human-readable name of the table. */ tableName: string; /** * Logger instance for logging operations. */ logger: LoggerInterface; /** * An array of meta information for each row. */ rows?: MetaRowColumn[]; /** * An array of meta information for each column. */ columns?: MetaRowColumn[]; /** * The matrix data stored as an array of arrays. * Each inner array represents a row, with column data. */ data?: (string | undefined | number)[][]; } /** * Represents a matrix table. * * The TableMatrix class implements the TableInterface for matrix-style tables. * It stores the table meta information, row and column meta data, and the actual data matrix. */ export declare class TableMatrix implements TableInterface { /** * The type of the table, set to TABLE_TYPE_MATRIX_TABLE. */ readonly tableType: string; /** Logger instance used for logging. */ logger: LoggerInterface; /** The file name of the table. */ fileName: string; /** The human-readable name of the table. */ tableName: string; /** Array of meta information for the rows. */ rows: MetaRowColumn[]; /** Array of meta information for the columns. */ columns: MetaRowColumn[]; /** * The matrix data stored as an array of arrays. * Each inner array represents a row, containing data for each column. */ data: (string | undefined | number)[][]; /** * Constructs a new TableMatrix. * * @param opts - Options for initializing the TableMatrix, including file name, table name, logger, rows, columns, and data. */ constructor(opts: TableMatrixOptions); /** * Retrieves the meta information of the table. * * @returns A MetaTable object containing the file name, table name, and table type. */ get tableMeta(): MetaTable; /** * Returns the test case for the given name. * * The test case name in a matrix table follows the format: 'r:c'. * This method parses the test case name, extracts the row and column numbers, * and creates a new TestcaseDefinitionMatrix instance based on the corresponding data. * * @param testcaseName - The test case name in the format 'r:c'. * @returns The corresponding TestcaseDefinitionMatrix. * @throws Error if the test case name is invalid or out of range. */ getTestcaseForName(testcaseName: string): TestcaseDefinitionInterface; /** * Creates a test case name for the specified row and column numbers. * * @param rowNumber - The row number. * @param columnNumber - The column number. * @returns A test case name in the format 'r:c'. */ createTestcaseName(rowNumber: number, columnNumber: number): string; /** * Generator function that yields all test cases that should be executed. * * Iterates through the matrix data, creates test cases for each defined cell, and yields them. * For test cases with multiplicity greater than one, additional instances are generated with incremented names. * * @returns A generator yielding TestcaseDefinitionInterface instances. */ getTestcasesForExecution(): Generator; /** * Parses a test case name provided as a reference. * * The method supports both single test case names (e.g., "r5:c3") and ranges. * For a range, such as "[r2:c1-r4:c1]", it expands the range into individual test case names. * * @param testcaseName - The reference test case name or range. * @returns An array of test case names. * @throws Error if the test case name format is invalid. */ processRanges(testcaseName: string): string[]; } //# sourceMappingURL=TableMatrix.d.ts.map