Generated on Tue Dec 16 12:50:08 2008 for BIU-2.2.0 by doxygen 1.5.1

biu::PivotMoveSet Class Reference

#include <PivotMoveSet.hh>

Inheritance diagram for biu::PivotMoveSet:

Inheritance graph
[legend]

Detailed Description

This class handles pivot moves on LatticeProtein objects. The pivot moves are implemented as point mutations on the relative move string.

Author:
Martin Mann, Sebastian Will, Andreas Richter

Definition at line 17 of file PivotMoveSet.hh.

Public Member Functions

virtual LatticeProteinapplyMove (const LatticeProtein *const toChange, size_t moveIndex)
virtual LatticeProteinapplyMoveInPlace (LatticeProtein *toChange, size_t moveIndex)
PivotMoveSetclone ()
virtual size_t getMoveNumber (const LatticeProtein *const lp) const
 PivotMoveSet (const LatticeModel *lattice)
virtual LatticeProteinundoLastMove (LatticeProtein *toUndo)
virtual ~PivotMoveSet ()

Protected Attributes

LatticeProteinlastChangedObject
size_t lastOverwritePos
Move lastOverwrittenMove
const LatticeModellattice


Constructor & Destructor Documentation

biu::PivotMoveSet::PivotMoveSet ( const LatticeModel lattice  ) 

Definition at line 5 of file PivotMoveSet.cc.

biu::PivotMoveSet::~PivotMoveSet (  )  [virtual]

Definition at line 12 of file PivotMoveSet.cc.


Member Function Documentation

LatticeProtein * biu::PivotMoveSet::applyMove ( const LatticeProtein *const   toChange,
size_t  moveIndex 
) [virtual]

Applies a pivot move to the given LatticeProtein on the specified position and returns a new LatticeProtein object as result.

Parameters:
toChange the initial state
moveIndex the move index (has to be less than the return value of getMoveNumber())
Returns:
a new LatticeProtein object neighbored to the todo object
In case of invalid moves, the behaviour of the program is not specified.

Implements biu::LatticeMoveSet.

Definition at line 22 of file PivotMoveSet.cc.

LatticeProtein * biu::PivotMoveSet::applyMoveInPlace ( LatticeProtein toChange,
size_t  moveIndex 
) [virtual]

Applies a pivot move to the given LatticeProtein on the specified position INPLACE and returns the modified object as result.

Parameters:
toChange the initial state to modify
moveIndex the move index (has to be less than the return value of getMoveNumber())
Returns:
the modified LatticeProtein
In case of invalid moves, the behaviour of the program is not specified.

Implements biu::LatticeMoveSet.

Definition at line 29 of file PivotMoveSet.cc.

PivotMoveSet * biu::PivotMoveSet::clone (  )  [virtual]

Implements biu::LatticeMoveSet.

Definition at line 16 of file PivotMoveSet.cc.

size_t biu::PivotMoveSet::getMoveNumber ( const LatticeProtein *const   lp  )  const [virtual]

Returns the number of available moves by this MoveSet.

Implements biu::LatticeMoveSet.

Definition at line 79 of file PivotMoveSet.cc.

LatticeProtein * biu::PivotMoveSet::undoLastMove ( LatticeProtein toUndo  )  [virtual]

Undo of last move performed on LatticeProtein toUndo. Undo is performed in place!

Implements biu::LatticeMoveSet.

Definition at line 88 of file PivotMoveSet.cc.


Field Documentation

pointer to the last object that was changed

Definition at line 26 of file PivotMoveSet.hh.

last position that was overwritten

Definition at line 24 of file PivotMoveSet.hh.

the last move overwritten by this moveset

Definition at line 22 of file PivotMoveSet.hh.

const LatticeModel* biu::LatticeMoveSet::lattice [protected, inherited]

the lattice model this move set bases on

Definition at line 24 of file LatticeMoveSet.hh.


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