Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::CN94Proposal::Recolor Class Reference

#include <cn94.hpp>

Inheritance diagram for Arak::CN94Proposal::Recolor:

Inheritance graph
[legend]
Collaboration diagram for Arak::CN94Proposal::Recolor:

Collaboration graph
[legend]
List of all members.

Detailed Description

Recolors a quadrilateral region of the coloring by replacing two interior edges with two new interior edges that connect the endpoints of the original edges.

Definition at line 180 of file cn94.hpp.

Public Member Functions

 Recolor ()
void reset (Coloring::IntEdgeHandle edge1, Coloring::IntEdgeHandle edge2, bool joinSourceToSource, bool convex)
 Resets this move.

bool isConvex ()
 Determines if the recolored region is convex or not.

virtual void execute (Coloring &c)
 Updates the supplied coloring according to this move.

virtual void undo (Coloring &c)
 Updates the supplied Coloring so that the effects of performing this move are undone.


Protected Attributes

Coloring::IntEdgeHandle edge1
 The first of the two edges.

Coloring::IntEdgeHandle edge2
 The second of the two edges.

bool joinSourceToSource
 This flag is true if the source of edge1 should be joined to the source of edge2 (and false if it should be joined to the target of edge2).

bool convex
 This flag is true if the recolored quadrilateral is convex.


Friends

class CN94Proposal
class ModifiedCN94Proposal


Constructor & Destructor Documentation

Arak::CN94Proposal::Recolor::Recolor  )  [inline]
 

Definition at line 211 of file cn94.hpp.


Member Function Documentation

void CN94Proposal::Recolor::execute Coloring c  )  [virtual]
 

Updates the supplied coloring according to this move.

It is an error to call this method if the move is not valid for the supplied coloring.

Parameters:
c a coloring to be updated

Implements Arak::ColoringMove.

Definition at line 95 of file cn94.cpp.

References edge1, edge2, joinSourceToSource, Arak::Coloring::recolorQuadrilateral(), and Arak::Coloring::VertexHandle.

Referenced by undo().

bool Arak::CN94Proposal::Recolor::isConvex  )  [inline]
 

Determines if the recolored region is convex or not.

Returns:
true if the recolored region is convex

Definition at line 236 of file cn94.hpp.

References convex.

Referenced by Arak::CN94Proposal::ll(), and Arak::CN94Proposal::rll().

void CN94Proposal::Recolor::reset Coloring::IntEdgeHandle  edge1,
Coloring::IntEdgeHandle  edge2,
bool  joinSourceToSource,
bool  convex
 

Resets this move.

Parameters:
edge1 the first of the two edges
edge2 the second of the two edges
joinSourceToSource true if the source of edge1 should be joined to the source of edge2 (and false if it should be joined to the target of edge2)
convex true if the recolored quadrilateral is convex

Definition at line 85 of file cn94.cpp.

References Arak::Coloring::IntEdgeHandle.

Referenced by Arak::CN94Proposal::sampleRecolor().

void CN94Proposal::Recolor::undo Coloring c  )  [virtual]
 

Updates the supplied Coloring so that the effects of performing this move are undone.

The semantics of this method ensure that applying execute(Coloring&) and then undo(Coloring&) to the same coloring leaves the coloring invariant. It is an error to call this method if this undo is not valid for the supplied coloring.

Parameters:
c a coloring to be updated

Implements Arak::ColoringMove.

Definition at line 108 of file cn94.cpp.

References execute().


Friends And Related Function Documentation

friend class CN94Proposal [friend]
 

Definition at line 182 of file cn94.hpp.

friend class ModifiedCN94Proposal [friend]
 

Definition at line 183 of file cn94.hpp.


Member Data Documentation

bool Arak::CN94Proposal::Recolor::convex [protected]
 

This flag is true if the recolored quadrilateral is convex.

Definition at line 207 of file cn94.hpp.

Referenced by isConvex().

Coloring::IntEdgeHandle Arak::CN94Proposal::Recolor::edge1 [protected]
 

The first of the two edges.

Definition at line 190 of file cn94.hpp.

Referenced by execute().

Coloring::IntEdgeHandle Arak::CN94Proposal::Recolor::edge2 [protected]
 

The second of the two edges.

Definition at line 195 of file cn94.hpp.

Referenced by execute().

bool Arak::CN94Proposal::Recolor::joinSourceToSource [protected]
 

This flag is true if the source of edge1 should be joined to the source of edge2 (and false if it should be joined to the target of edge2).

Definition at line 202 of file cn94.hpp.

Referenced by execute().


The documentation for this class was generated from the following files:
Generated on Wed May 25 14:40:38 2005 for Arak by doxygen 1.3.6