![]() |
CMR
1.3.0
|
Classes | |
| class | binary_linear_space |
| struct | bipartite_graph_bfs_node |
| struct | bipartite_graph_dimensions |
Functions | |
| template<typename MatroidType , typename MatrixType > | |
| std::pair< bool, decomposed_matroid * > | decompose_binary_matroid (MatroidType &matroid, MatrixType &matrix, matroid_element_set extra_elements, bool construct_decomposition, logger &log) |
| Forward declaration. More... | |
| template<typename MatroidType , typename MatrixType > | |
| std::pair< bool, decomposed_matroid * > | decompose_with_minor_sequence (matroid_permuted< MatroidType > &permuted_matroid, matrix_permuted< MatrixType > &permuted_matrix, nested_minor_sequence &nested_minors, matroid_element_set extra_elements, bool construct_decomposition, logger &log) |
| template<typename MatroidType , typename MatrixType > | |
| matroid_graph * | construct_small_matroid_graph (MatroidType &matroid, MatrixType &matrix) |
| std::ostream & | operator<< (std::ostream &stream, const binary_linear_space &space) |
| template<typename MatrixType , typename StartNodesContainerType , typename EndNodesContainerType > | |
| bool | bipartite_graph_bfs (const MatrixType &matrix, const bipartite_graph_dimensions &dimensions, const StartNodesContainerType &start_nodes, const EndNodesContainerType &end_nodes, bool reach_all, std::vector< bipartite_graph_bfs_node > &result) |
|
inline |
Does a breadth-first-search on the bipartite graph defined by a submatrix of a given matrix. Running time: O(height * width)
| matrix | Given matrix |
| dimensions | Object for row/column-to-index calculations |
| start_nodes | Set of starting nodes for search |
| end_nodes | Set of nodes to be found |
| reach_all | Whether we'd like to find all end nodes, or just one |
| result | Whether all resp. one end node was found. |
Initialize datastructure
Start bfs
row -> columns
column -> rows
| matroid_graph* tu::construct_small_matroid_graph | ( | MatroidType & | matroid, |
| MatrixType & | matrix | ||
| ) |
Create the graph for 2 x w or h x 2 matrices.
| matroid | |
| matrix |
0 1
1 0
1 1
| std::pair< bool, decomposed_matroid * > tu::decompose_binary_matroid | ( | MatroidType & | matroid, |
| MatrixType & | matrix, | ||
| matroid_element_set | extra_elements, | ||
| bool | construct_decomposition, | ||
| logger & | log | ||
| ) |
Forward declaration.
Decomposes a given binary matroid.
| matroid | |
| matrix | |
| construct_decomposition |
Identifies a W_3 minor in the upper left corner or finds a separation
Separation case
Filter or copy extra_elements depending on type of separation
Identifies a W_3 minor in the upper left corner or finds a separation
Separation case
Filter or copy extra_elements depending on type of separation
| std::pair<bool, decomposed_matroid*> tu::decompose_with_minor_sequence | ( | matroid_permuted< MatroidType > & | permuted_matroid, |
| matrix_permuted< MatrixType > & | permuted_matrix, | ||
| nested_minor_sequence & | nested_minors, | ||
| matroid_element_set | extra_elements, | ||
| bool | construct_decomposition, | ||
| logger & | log | ||
| ) |
Filter or copy extra_elements depending on type of separation
|
inline |
Streams a binary linear vector space.
| stream | Output stream |
| space | The given vector space |