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

#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)
 
separationoperator= (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_typewitness (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
 

Detailed Description

Models different types of matroid separations.

Member Typedef Documentation

◆ split_type

typedef std::pair<std::size_t, std::size_t> tu::separation::split_type

◆ witness_type

typedef std::pair<std::size_t, std::size_t> tu::separation::witness_type

Constructor & Destructor Documentation

◆ separation() [1/5]

tu::separation::separation ( )

Constructs a separation which is none.

◆ separation() [2/5]

tu::separation::separation ( split_type  split)

Constructs a 1-separation.

Parameters
splitSize of the first component, which must be at upper-left

◆ separation() [3/5]

tu::separation::separation ( split_type  split,
witness_type  witness1 
)

Constructs a 2-separation.

Parameters
splitSize of the first component, which must be at upper-left
witness1A witnessing one in the rank 1 part

◆ separation() [4/5]

tu::separation::separation ( split_type  split,
witness_type  witness1,
witness_type  witness2 
)

Constructs a 3-separation.

Parameters
splitSize of the first component, which must be at upper-left
witness1First witnessing one in the rank 2 part
witness2Second witnessing one in the rank 2 part

◆ separation() [5/5]

tu::separation::separation ( const separation other)

Copy constructor

Parameters
otherAnother separation

◆ ~separation()

tu::separation::~separation ( )

Destructor

Member Function Documentation

◆ create_components()

template<typename MatroidType , typename MatrixType >
void tu::separation::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
inline

Creates both components as matroids and representation matrices.

Parameters
matroidThe original matroid
matrixRepresentation matrix of the given original matroid
upper_left_matroidNew upper left component matroid
upper_left_matrixNew upper left component representation matrix
lower_right_matroidNew lower right component matroid
lower_right_matrixNew lower right component representation matrix

1-separation

2-separation with lower left rank 1

2-separation with upper right rank 1

3-separation

◆ get_special_swap_index()

size_t tu::separation::get_special_swap_index ( ) const
inline
Returns
The row / column index of a special swap

◆ has_special_row_swap()

bool tu::separation::has_special_row_swap ( ) const
inline
Returns
true if and only if this separation hsa a special row swap

◆ has_special_swap()

bool tu::separation::has_special_swap ( ) const
inline
Returns
true if and only if this separation has a special swap

◆ is_valid()

bool tu::separation::is_valid ( ) const
inline
Returns
true if and only if it is a real separation

◆ lower_left_rank()

int tu::separation::lower_left_rank ( ) const
inline
Returns
Rank in the lower left part

◆ operator=()

separation & tu::separation::operator= ( const separation other)

Assignment operator

Parameters
otherAnother separation
Returns
This separation

◆ rank()

int tu::separation::rank ( ) const
inline
Returns
Total rank in lower left and upper right parts

◆ set_special_swap()

void tu::separation::set_special_swap ( char  type,
size_t  index 
)
inline

Sets a special swap needed for 2-separations.

Parameters
typeType of the special swap. Can be 'r' and 'c'
indexRow or column index of the swap

◆ split()

const std::pair<size_t, size_t>& tu::separation::split ( ) const
inline
Returns
The split

◆ transposed()

separation tu::separation::transposed ( )
Returns
A separation with the transposed details

◆ upper_right_rank()

int tu::separation::upper_right_rank ( ) const
inline
Returns
Rank in the upper right part

◆ witness()

const witness_type& tu::separation::witness ( size_t  index = 0) const
inline

Returns a specific witness.

Parameters
indexIndex of the witness
Returns
The position of the witnessing one entry

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