Loading...
Searching...
No Matches
bliss::Partition Class Reference

A class for refinable, backtrackable ordered partitions. More...

`#include <partition.hh>`

## Classes

class | Cell
| Data structure for holding information about a cell in a Partition. More...

## Public Types

typedef unsigned int | BacktrackPoint

## Public Member Functions

BacktrackPoint | set_backtrack_point ()
void | goto_backtrack_point (BacktrackPoint p)
Cell * | individualize (Cell *const cell, const unsigned int element)
Cell * | get_cell (const unsigned int e) const
void | init (const unsigned int N)
bool | is_discrete () const
size_t | print (FILE *const fp, const bool add_newline=true) const
size_t | print_signature (FILE *const fp, const bool add_newline=true) const
void | clear_ivs (Cell *const cell)

## Detailed Description

A class for refinable, backtrackable ordered partitions.

This is rather a data structure with some helper functions than a proper self-contained class. That is, for efficiency reasons the fields of this class are directly manipulated from bliss::AbstractGraph and its subclasses. Conversely, some methods of this class modify the fields of bliss::AbstractGraph, too.

## Member Typedef Documentation

## BacktrackPoint

typedef unsigned int bliss::Partition::BacktrackPoint

Type for backtracking points.

## Member Function Documentation

## clear_ivs()

void bliss::Partition::clear_ivs | ( | Cell *const | cell | ) |

Clear the invariant_values of the elements in the Cell cell.

## get_cell()

Cell * bliss::Partition::get_cell | ( | const unsigned int | e | ) | const

inline

Get the cell of the element e

## goto_backtrack_point()

void bliss::Partition::goto_backtrack_point | ( | BacktrackPoint | p | ) |

Backtrack to the point p and remove it.

## individualize()

Partition::Cell * bliss::Partition::individualize | ( | Partition::Cell *const | cell,
|  | const unsigned int | element )

Split the non-unit Cell cell = {element,e1,e2,...,en} containing the element element in two: cell = {e1,...,en} and newcell = {element}.

Parameters

  cell | a non-unit Cell
  element | an element in cell

Returns
  the new unit Cell newcell

## init()

void bliss::Partition::init | ( | const unsigned int | N | ) |

Initialize the partition to the unit partition (all elements in one cell) over the N > 0 elements {0,...,N-1}.

## is_discrete()

bool bliss::Partition::is_discrete | ( |  | ) | const

inline

Returns true iff the partition is discrete, meaning that all the elements are in their own cells.

## print()

size_t bliss::Partition::print | ( | FILE *const | fp,
|  | const bool | add_newline = true ) const

Print the partition into the file stream fp.

## print_signature()

size_t bliss::Partition::print_signature | ( | FILE *const | fp,
|  | const bool | add_newline = true ) const

Print the partition cell sizes into the file stream fp.

## set_backtrack_point()

Partition::BacktrackPoint bliss::Partition::set_backtrack_point | ( |  | ) |

Get a new backtrack point for the current partition

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

- src/partition.hh
- src/partition.cc