CMR
1.3.0
|
#include <separation.hpp>
Public Types | |
typedef std::pair< std::size_t, std::size_t > | split_type |
typedef std::pair< std::size_t, std::size_t > | witness_type |
Public Member Functions | |
separation () | |
separation (split_type split) | |
separation (split_type split, witness_type witness1) | |
separation (split_type split, witness_type witness1, witness_type witness2) | |
separation (const separation &other) | |
separation & | operator= (const separation &other) |
~separation () | |
separation | transposed () |
int | upper_right_rank () const |
int | lower_left_rank () const |
int | rank () const |
const std::pair< size_t, size_t > & | split () const |
bool | is_valid () const |
const witness_type & | witness (size_t index=0) const |
void | set_special_swap (char type, size_t index) |
bool | has_special_swap () const |
bool | has_special_row_swap () const |
size_t | get_special_swap_index () const |
template<typename MatroidType , typename MatrixType > | |
void | create_components (const MatroidType &matroid, const MatrixType &matrix, integer_matroid &upper_left_matroid, integer_matrix &upper_left_matrix, integer_matroid &lower_right_matroid, integer_matrix &lower_right_matrix) const |
Models different types of matroid separations.
typedef std::pair<std::size_t, std::size_t> tu::separation::split_type |
typedef std::pair<std::size_t, std::size_t> tu::separation::witness_type |
tu::separation::separation | ( | ) |
Constructs a separation which is none.
tu::separation::separation | ( | split_type | split | ) |
Constructs a 1-separation.
split | Size of the first component, which must be at upper-left |
tu::separation::separation | ( | split_type | split, |
witness_type | witness1 | ||
) |
Constructs a 2-separation.
split | Size of the first component, which must be at upper-left |
witness1 | A witnessing one in the rank 1 part |
tu::separation::separation | ( | split_type | split, |
witness_type | witness1, | ||
witness_type | witness2 | ||
) |
Constructs a 3-separation.
split | Size of the first component, which must be at upper-left |
witness1 | First witnessing one in the rank 2 part |
witness2 | Second witnessing one in the rank 2 part |
tu::separation::separation | ( | const separation & | other | ) |
Copy constructor
other | Another separation |
tu::separation::~separation | ( | ) |
Destructor
|
inline |
Creates both components as matroids and representation matrices.
matroid | The original matroid |
matrix | Representation matrix of the given original matroid |
upper_left_matroid | New upper left component matroid |
upper_left_matrix | New upper left component representation matrix |
lower_right_matroid | New lower right component matroid |
lower_right_matrix | New lower right component representation matrix |
1-separation
2-separation with lower left rank 1
2-separation with upper right rank 1
3-separation
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
separation & tu::separation::operator= | ( | const separation & | other | ) |
Assignment operator
other | Another separation |
|
inline |
|
inline |
Sets a special swap needed for 2-separations.
type | Type of the special swap. Can be 'r' and 'c' |
index | Row or column index of the swap |
|
inline |
separation tu::separation::transposed | ( | ) |
|
inline |
|
inline |
Returns a specific witness.
index | Index of the witness |