QueenArmies::QueenBranch Class Reference

Custom brancher for Peacable queens. More...

## Public Member Functions

virtual bool | status (const Space &home) const
| Check status of brancher, return true if alternatives left.
virtual Gecode::Choice * | choice (Space &home)
| Return choice.
virtual Choice * | choice (const Space &, Archive &e)
| Return choice.
virtual ExecStatus | commit (Space &home, const Gecode::Choice &_c, unsigned int a)
| Perform commit for choice _c and alternative a.
virtual void | print (const Space &, const Gecode::Choice &_c, unsigned int a, std::ostream &o) const
| Print explanation.
virtual Actor * | copy (Space &home)
| Copy brancher during cloning.
virtual size_t | dispose (Space &)
| Delete brancher and return its size.
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int a) const
| Create no-good literal for choice c and alternative a.
unsigned int | id (void) const
| Return brancher id.
BrancherGroup | group (void) const
| Return group brancher belongs to.
void | group (BrancherGroup g)
| Add brancher to group g.
virtual | ~Actor (void)
| To avoid warnings.

## Static Public Member Functions

static void | post (QueenArmies &home)
| Post brancher.
static void * | operator new (size_t s, Space &home)
| Allocate memory from space.
static void | operator delete (void *p, Space &home)
| No-op for exceptions.
static void * | operator new (size_t s)
| Not used.
static void | operator delete (void *p)
| Not used.

## Additional Inherited Members

Protected Member Functions inherited from Gecode::Brancher
| Brancher (Home home)
| Constructor for creation.
| Brancher (Space &home, Brancher &b)
| Constructor for cloning b.

## Detailed Description

Custom brancher for Peacable queens.

Custom brancher that tries to place white queens so that they maximise the amount of un-attacked squares that become attacked.

Definition at line 158 of file queen-armies.cpp.

## Member Function Documentation

## status()

virtual bool QueenArmies::QueenBranch::status | ( | const Space & | home | ) | const

inline virtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 190 of file queen-armies.cpp.

## choice() [1/2]

virtual Gecode::Choice * QueenArmies::QueenBranch::choice | ( | Space & | home | ) |

inline virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 201 of file queen-armies.cpp.

## choice() [2/2]

virtual Choice * QueenArmies::QueenBranch::choice | ( | const Space & | ,
|  | Archive & | e )

inline virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 222 of file queen-armies.cpp.

## commit()

virtual ExecStatus QueenArmies::QueenBranch::commit | ( | Space & | home,
|  | const Gecode::Choice & | _c,
|  | unsigned int | a )

inline virtual

Perform commit for choice _c and alternative a.

Implements Gecode::Brancher.

Definition at line 230 of file queen-armies.cpp.

## print()

virtual void QueenArmies::QueenBranch::print | ( | const Space & | ,
|  | const Gecode::Choice & | _c,
|  | unsigned int | a,
|  | std::ostream & | o ) const

inline virtual

Print explanation.

Reimplemented from Gecode::Brancher.

Definition at line 240 of file queen-armies.cpp.

## copy()

virtual Actor * QueenArmies::QueenBranch::copy | ( | Space & | home | ) |

inline virtual

Copy brancher during cloning.

Implements Gecode::Actor.

Definition at line 248 of file queen-armies.cpp.

## post()

void QueenArmies::QueenBranch::post | ( | QueenArmies & | home | ) |

inline static

Post brancher.

Definition at line 252 of file queen-armies.cpp.

## dispose()

virtual size_t QueenArmies::QueenBranch::dispose | ( | Space & |  | ) |

inline virtual

Delete brancher and return its size.

Reimplemented from Gecode::Actor.

Definition at line 256 of file queen-armies.cpp.

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

- examples/queen-armies.cpp