permlib::partition::Refinement< PERM > Class Template Reference

base class for a $\mathcal P$-refinement which is used in an R-base and bound to an initial partition More...

#include <refinement.h>

Inheritance diagram for permlib::partition::Refinement< PERM >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< Refinement< PERM > > 
RefinementPtr
typedef std::vector
< RefinementPtr >
::const_iterator 
RefinementPtrIterator
typedef boost::shared_ptr
< Refinement< PERM > > 
RefinementPtr
typedef std::vector
< RefinementPtr >
::const_iterator 
RefinementPtrIterator

Public Member Functions

 Refinement (ulong n, RefinementType type)
 constructor
virtual ~Refinement ()
 destructor
bool initializeAndApply (Partition &pi)
 applies (left-)refinement to partition and initializes refinement for future use in R-base
virtual uint apply (Partition &pi) const =0
 applies (left-)refinement to pi which is the original partition this refinement was initialized to
virtual uint apply2 (Partition &pi, const PERM &t) const
 applies (right-)refinement to pi which is the image of the original partition this refinement was initialized to under t
void undo (Partition &pi, uint count) const
 reverts the last count elementary intersections of partition pi
RefinementType type () const
 the type of this refinement
uint alternatives () const
 number of sibling of this refinement in the search tree
RefinementPtrIterator backtrackBegin () const
 iterator to begin of refinement siblings in the search tree
RefinementPtrIterator backtrackEnd () const
 iterator to end of refinement siblings in the search tree
virtual bool init (Partition &pi)=0
 initializes refinement
virtual void sort (const BaseSorterByReference &, const Partition *)
 sorts siblings in the search tree
 Refinement (ulong n, RefinementType type)
 constructor
virtual ~Refinement ()
 destructor
bool initializeAndApply (Partition &pi)
 applies (left-)refinement to partition and initializes refinement for future use in R-base
virtual uint apply (Partition &pi) const =0
 applies (left-)refinement to pi which is the original partition this refinement was initialized to
virtual uint apply2 (Partition &pi, const PERM &t) const
 applies (right-)refinement to pi which is the image of the original partition this refinement was initialized to under t
void undo (Partition &pi, uint count) const
 reverts the last count elementary intersections of partition pi
RefinementType type () const
 the type of this refinement
uint alternatives () const
 number of sibling of this refinement in the search tree
RefinementPtrIterator backtrackBegin () const
 iterator to begin of refinement siblings in the search tree
RefinementPtrIterator backtrackEnd () const
 iterator to end of refinement siblings in the search tree
virtual bool init (Partition &pi)=0
 initializes refinement
virtual void sort (const BaseSorterByReference &, const Partition *)
 sorts siblings in the search tree

Protected Member Functions

bool initialized () const
 true iff refinement is initalized
bool initialized () const
 true iff refinement is initalized

Protected Attributes

ulong m_n
 length of partitions to work with
std::vector< RefinementPtr > m_backtrackRefinements
 refinement siblings in the search tree
std::list< int > m_cellPairs
 indices of elementary intersections to apply during refinement application

Detailed Description

template<class PERM>
class permlib::partition::Refinement< PERM >

base class for a $\mathcal P$-refinement which is used in an R-base and bound to an initial partition


Member Function Documentation

template<class PERM>
virtual uint permlib::partition::Refinement< PERM >::apply ( Partition pi  )  const [pure virtual]
template<class PERM>
virtual uint permlib::partition::Refinement< PERM >::apply ( Partition pi  )  const [pure virtual]
template<class PERM>
virtual uint permlib::partition::Refinement< PERM >::apply2 ( Partition pi,
const PERM &  t 
) const [virtual]

applies (right-)refinement to pi which is the image of the original partition this refinement was initialized to under t

See also:
undo
apply
Returns:
number of elementary intersections that were needed for refinement application

Reimplemented in permlib::partition::GroupRefinement< PERM, TRANS >, permlib::partition::SetImageRefinement< PERM >, permlib::partition::GroupRefinement< PERM, TRANS >, and permlib::partition::SetImageRefinement< PERM >.

template<class PERM >
uint permlib::partition::Refinement< PERM >::apply2 ( Partition pi,
const PERM &  t 
) const [inline, virtual]

applies (right-)refinement to pi which is the image of the original partition this refinement was initialized to under t

See also:
undo
apply
Returns:
number of elementary intersections that were needed for refinement application

Reimplemented in permlib::partition::GroupRefinement< PERM, TRANS >, permlib::partition::SetImageRefinement< PERM >, permlib::partition::GroupRefinement< PERM, TRANS >, and permlib::partition::SetImageRefinement< PERM >.

template<class PERM>
bool permlib::partition::Refinement< PERM >::initializeAndApply ( Partition pi  ) 

applies (left-)refinement to partition and initializes refinement for future use in R-base

Returns:
true iff this is a strict refinement
template<class PERM >
bool permlib::partition::Refinement< PERM >::initializeAndApply ( Partition pi  )  [inline]

applies (left-)refinement to partition and initializes refinement for future use in R-base

Returns:
true iff this is a strict refinement

The documentation for this class was generated from the following files:
Generated on Fri Jun 18 22:00:26 2010 for PermLib by  doxygen 1.6.3