Generated on Mon Jun 23 17:18:20 2008 for ell-2.3.0 by doxygen 1.5.1

ell::S_LP Class Reference

#include <S_LP.hh>

Inheritance diagram for ell::S_LP:

Inheritance graph
[legend]

Detailed Description

Definition at line 12 of file S_LP.hh.

Public Types

typedef size_t Move
typedef biu::VirtualList<
State
NeighborList
typedef std::auto_ptr< NeighborListNeighborListPtr

Public Member Functions

virtual StateapplyNeighborChange (const size_t index, State *const neigh) const
virtual Stateclone () const=0
virtual CSequencecompress (CSequence &toFill) const=0
virtual CSequence compress (void) const =0
virtual StatefromString (const std::string &stringRep) const =0
virtual double getEnergy () const
virtual int getFitness () const
virtual unsigned int getMinimalDistance (const State &state2) const =0
virtual StategetNeighbor (const size_t index, State *neigh) const
virtual NeighborListPtr getNeighborList () const
virtual size_t getNeighborNumber (void) const
virtual StategetRandomNeighbor (State *inPlaceNeigh=NULL) const
virtual NeighborListPtr getRandomNeighborList () const
virtual bool operator!= (const State &state2) const
virtual bool operator== (const State &state2) const
 S_LP (const S_LP &state)
 S_LP (biu::LatticeProtein_I *latProt, biu::LatticeMoveSet *moveSet)
virtual std::string toString () const
virtual Stateuncompress (const CSequence &cseq)=0
virtual Stateuncompress (const CSequence &cseq, State *toFill=NULL) const =0
virtual StateundoNeighborChange (const size_t index, State *const neigh) const
virtual ~S_LP ()

Protected Attributes

biu::LatticeProtein_I * latProt
biu::LatticeMoveSet * moveSet


Member Typedef Documentation

typedef size_t ell::S_LP::Move

Each move is defined by a value of type Move.

Definition at line 22 of file S_LP.hh.

typedef biu::VirtualList<State> ell::State::NeighborList [inherited]

Virtual list of neighbor states which can be accessed by a STL-like iterator.

Definition at line 43 of file State.hh.

typedef std::auto_ptr<NeighborList> ell::State::NeighborListPtr [inherited]

An autopointer to a NeighborList.

Definition at line 46 of file State.hh.


Constructor & Destructor Documentation

ell::S_LP::S_LP ( biu::LatticeProtein_I *  latProt,
biu::LatticeMoveSet *  moveSet 
)

Constructs a lattice protein specific State.

Parameters:
latProt the lattice protein used by this State
moveSet the move set used by this State

Definition at line 9 of file S_LP.cc.

ell::S_LP::S_LP ( const S_LP state  ) 

Definition at line 13 of file S_LP.cc.

ell::S_LP::~S_LP (  )  [virtual]

Definition at line 17 of file S_LP.cc.


Member Function Documentation

State * ell::S_LP::applyNeighborChange ( const size_t  index,
State *const   neigh 
) const [virtual]

Applies the necessary changes to a given state to get the neighbor. Note: neigh is expected to be a copy (i.e. *this == *neigh) and therefore direct changes are possible or to be NULL. If (neigh==NULL) a copy of this has to be generated, modified, and returned.

Parameters:
index the neighbor to generate
neigh a copy of this the changes should be applied to
Returns:
the neighbor state of the given index or NULL if the index is out of range

Implements ell::IterableNeighbors.

Definition at line 139 of file S_LP.cc.

virtual State* ell::S_LP::clone (  )  const [pure virtual]

Returns a pointer to a clone of the current state.

Implements ell::State.

Implemented in ell::S_LP_PullM.

virtual CSequence& ell::S_LP::compress ( CSequence toFill  )  const [pure virtual]

Access to a compressed sequence representation of the state.

Parameters:
toFill a data structure to write the compressed representation too
Returns:
the compressed sequence representation

Implements ell::State.

Implemented in ell::S_LP_PullM.

virtual CSequence ell::S_LP::compress ( void   )  const [pure virtual]

Access to a compressed sequence representation of the state.

Returns:
the compressed sequence representation

Implements ell::State.

Implemented in ell::S_LP_PullM.

virtual State* ell::S_LP::fromString ( const std::string &  stringRep  )  const [pure virtual]

Returns a new State based on the current state. The new state differs only by the information given by stringRep.

Implements ell::State.

Implemented in ell::S_LP_PullM.

double ell::S_LP::getEnergy (  )  const [virtual]

Returns the state specific energy.

Implements ell::State.

Definition at line 23 of file S_LP.cc.

int ell::S_LP::getFitness (  )  const [virtual]

Returns the state specific fitness.

Implements ell::State.

Definition at line 29 of file S_LP.cc.

virtual unsigned int ell::State::getMinimalDistance ( const State state2  )  const [pure virtual, inherited]

Returns the minimal number of steps via valid neighbored states from this to another valid State.

Parameters:
state2 the State to reach

Implemented in ell::S_LP_PullM, ell::S_RNAfe_SingleM, and ell::S_SG_Ising.

State * ell::S_LP::getNeighbor ( const size_t  index,
State neigh 
) const [virtual]

Access to a specific neighbor.

Parameters:
index the index of the neighbor in [0, getNeighborNumber())
neigh if != NULL this state should be converted into the neighbor otherwise a new one is created and returned
Returns:
the new neighbor state or NULL if the index is >= getNeighborNumber()

Implements ell::IterableNeighbors.

Definition at line 102 of file S_LP.cc.

State::NeighborListPtr ell::S_LP::getNeighborList (  )  const [virtual]

Returns a virtual list of all VALID neighbored states in the energy landscape in a specific order.

Implements ell::State.

Definition at line 62 of file S_LP.cc.

size_t ell::S_LP::getNeighborNumber ( void   )  const [virtual]

How many neighbor indices are accessible.

Returns:
the number of neighbors

Implements ell::IterableNeighbors.

Definition at line 96 of file S_LP.cc.

State * ell::S_LP::getRandomNeighbor ( State inPlaceNeigh = NULL  )  const [virtual]

Returns a VALID random neighbored state. If a state is given, this is changed to a neighbor.

Implements ell::State.

Definition at line 71 of file S_LP.cc.

State::NeighborListPtr ell::S_LP::getRandomNeighborList (  )  const [virtual]

Returns a virtual list of all VALID neighbored states in the energy landscape in a random order. If a state is given, this is changed to a neighbor.

Implements ell::State.

Definition at line 67 of file S_LP.cc.

bool ell::S_LP::operator!= ( const State state2  )  const [virtual]

Implements ell::State.

Definition at line 57 of file S_LP.cc.

bool ell::S_LP::operator== ( const State state2  )  const [virtual]

Implements ell::State.

Definition at line 47 of file S_LP.cc.

std::string ell::S_LP::toString (  )  const [virtual]

Returns a specific std::string representation of this State.

Implements ell::State.

Definition at line 41 of file S_LP.cc.

virtual State* ell::S_LP::uncompress ( const CSequence cseq  )  [pure virtual]

Uncompresses a compressed sequence representation into a this State object.

Parameters:
cseq the compressed sequence representation of a state
Returns:
this or NULL in error case

Implements ell::State.

Implemented in ell::S_LP_PullM.

virtual State* ell::S_LP::uncompress ( const CSequence cseq,
State toFill = NULL 
) const [pure virtual]

Uncompresses a compressed sequencce representation into a new State object.

Parameters:
cseq the compressed sequence representation of a state
toFill a state object to uncompress too or NULL if a new object has to be created
Returns:
new State object that is encoded in cseq or NULL in error case.

Implements ell::State.

Implemented in ell::S_LP_PullM.

State * ell::S_LP::undoNeighborChange ( const size_t  index,
State *const   neigh 
) const [virtual]

Undo the changes done to this state to generate the given neighbor. The goal is to do less operations than doing a full copy like (*neigh = *this).

Parameters:
index the neighbor index that was applied last [ 0, getNeighborNumber() )
neigh the state resulting from the last changes ( != NULL)
Returns:
the copy of this object via undoing the last changes in neigh

Implements ell::IterableNeighbors.

Definition at line 125 of file S_LP.cc.


Field Documentation

biu::LatticeProtein_I* ell::S_LP::latProt [protected]

Definition at line 16 of file S_LP.hh.

biu::LatticeMoveSet* ell::S_LP::moveSet [protected]

Definition at line 17 of file S_LP.hh.


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