CMR  1.3.0
Functions
hereditary_property.c File Reference
#include "hereditary_property.h"
#include <stdint.h>
#include <time.h>

Functions

static CMR_ERROR testHereditaryPropertyNaive (CMR *cmr, CMR_CHRMAT *current, HereditaryPropertyTest testFunction, void *testData, CMR_SUBMAT **psubmatrix, size_t numRemainingRows, size_t *remainingRows, size_t numRemainingColumns, size_t *remainingColumns, double timeLimit)
 Tests a submatrix of the given current matrix for the hereditary property defined by a given testFunction. More...
 
CMR_ERROR CMRtestHereditaryPropertyNaive (CMR *cmr, CMR_CHRMAT *matrix, HereditaryPropertyTest testFunction, void *testData, CMR_SUBMAT **psubmatrix, double timeLimit)
 Tests a given matrix for the hereditary property defined by a given testFunction. More...
 
CMR_ERROR CMRtestHereditaryPropertyGreedy (CMR *cmr, CMR_CHRMAT *matrix, HereditaryPropertyTest testFunction, void *testData, CMR_SUBMAT **psubmatrix, double timeLimit)
 Greedily tests a given matrix for the hereditary property defined by a given testFunction. More...
 

Function Documentation

◆ CMRtestHereditaryPropertyGreedy()

CMR_ERROR CMRtestHereditaryPropertyGreedy ( CMR cmr,
CMR_CHRMAT matrix,
HereditaryPropertyTest  testFunction,
void *  testData,
CMR_SUBMAT **  psubmatrix,
double  timeLimit 
)

Greedily tests a given matrix for the hereditary property defined by a given testFunction.

The algorithm finds the submatrix by successively zeroing out sets of rows or columns.

Parameters
cmrCMR environment.
matrixSome matrix not having the hereditary property.
testFunctionTest function.
testDataData to be forwarded to the test function.
psubmatrixPointer for storing a minimal submatrix not having the property.
timeLimitTime limit to impose.

◆ CMRtestHereditaryPropertyNaive()

CMR_ERROR CMRtestHereditaryPropertyNaive ( CMR cmr,
CMR_CHRMAT matrix,
HereditaryPropertyTest  testFunction,
void *  testData,
CMR_SUBMAT **  psubmatrix,
double  timeLimit 
)

Tests a given matrix for the hereditary property defined by a given testFunction.

The algorithm finds the submatrix by successively single zeroing out rows or columns.

Parameters
cmrCMR environment.
matrixSome matrix not having the hereditary property.
testFunctionTest function.
testDataData to be forwarded to the test function.
psubmatrixPointer for storing a minimal submatrix not having the property.
timeLimitTime limit to impose.

◆ testHereditaryPropertyNaive()

static CMR_ERROR testHereditaryPropertyNaive ( CMR cmr,
CMR_CHRMAT current,
HereditaryPropertyTest  testFunction,
void *  testData,
CMR_SUBMAT **  psubmatrix,
size_t  numRemainingRows,
size_t *  remainingRows,
size_t  numRemainingColumns,
size_t *  remainingColumns,
double  timeLimit 
)
static

Tests a submatrix of the given current matrix for the hereditary property defined by a given testFunction.

The algorithm finds the submatrix by successively single zeroing out rows or columns. The submatrix is specified by remainingRows and remainingColumns. The current matrix is modified and later deleted.

Parameters
cmrCMR environment.
currentSome matrix not having the hereditary property.
testFunctionTest function.
testDataData to be forwarded to the test function.
psubmatrixPointer for storing a minimal submatrix not having the property.
numRemainingRowsNumber of rows of submatrix to search in.
remainingRowsRows of submatrix to search in.
numRemainingColumnsNumber of columns of submatrix to search in.
remainingColumnsColumns of submatrix to search in.
timeLimitTime limit to impose.