CMR  1.3.0
Public Types | Public Member Functions | List of all members
tu::ghouila_houri_enumerator Class Reference

Public Types

typedef signed char choice_type
 
typedef std::vector< choice_typechoice_vector_type
 

Public Member Functions

 ghouila_houri_enumerator (const integer_matrix &matrix)
 
bool check_sum ()
 
bool choose_partition (size_t row=0)
 
bool choose_subset (size_t row=0)
 
bool check ()
 

Detailed Description

Class to enumerate subset-2-partitions for a ghouila-houri test

Member Typedef Documentation

◆ choice_type

◆ choice_vector_type

Constructor & Destructor Documentation

◆ ghouila_houri_enumerator()

tu::ghouila_houri_enumerator::ghouila_houri_enumerator ( const integer_matrix matrix)
inline

Constructs an enumerator.

Parameters
matrixThe matrix to be tested

Member Function Documentation

◆ check()

bool tu::ghouila_houri_enumerator::check ( )
inline

Tests the given matrix for total unimodularity using rows.

Returns
true if and only if it is totally unimodular

◆ check_sum()

bool tu::ghouila_houri_enumerator::check_sum ( )
inline

Tests a sum induced by a 2-partition of the selected rows

Returns
true if and only if the sum along each column is valid

◆ choose_partition()

bool tu::ghouila_houri_enumerator::choose_partition ( size_t  row = 0)
inline

Recursively enumerates both possible choices for a given row.

Parameters
rowThe given row
Returns
true if and only if one of the enumerations succeeded

◆ choose_subset()

bool tu::ghouila_houri_enumerator::choose_subset ( size_t  row = 0)
inline

Recursively enumerates all subset-choices for a given row. Finally it starts the enumeration of all the partitions of this subset.

Parameters
rowThe given row
Returns
true if and only if the further enumerations succeeded all.

The documentation for this class was generated from the following file: