Generated on Tue Dec 16 13:35:05 2008 for ell-3.0.0 by doxygen 1.5.1

ell::State Class Reference

#include <State.hh>

Inheritance diagram for ell::State:

Inheritance graph
[legend]

Detailed Description

An object of the class State represents a state in the energy landscape. It handles its fitness and neighborhood concerning the landscape.

A State is always valid in the subclass.

Author:
Martin Mann, Sebastian Will, Andreas Richter

Definition at line 37 of file State.hh.

Public Types

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

Public Member Functions

virtual Stateclone (State *toFill=NULL) 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=0
virtual const std::string & getID (void) const =0
virtual unsigned int getMinimalDistance (const State &state2) const =0
virtual NeighborListPtr getNeighborList () const=0
virtual StategetRandomNeighbor (State *inPlaceNeigh=NULL) const=0
virtual NeighborListPtr getRandomNeighborList () const=0
virtual bool operator!= (const State &state2) const =0
virtual bool operator< (const State &state2) const
virtual bool operator== (const State &state2) const =0
 State ()
virtual std::string & toString (std::string &toFill) const =0
virtual std::string toString () const=0
virtual Stateuncompress (const CSequence &cseq)=0
virtual Stateuncompress (const CSequence &cseq, State *toFill) const =0
virtual ~State ()

Static Public Member Functions

static bool less (const State *s1, const State *s2)


Member Typedef Documentation

typedef biu::VirtualList<State> ell::State::NeighborList

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

Definition at line 44 of file State.hh.

typedef std::auto_ptr<NeighborList> ell::State::NeighborListPtr

An autopointer to a NeighborList.

Definition at line 47 of file State.hh.


Constructor & Destructor Documentation

ell::State::State (  )  [inline]

Definition at line 49 of file State.hh.

virtual ell::State::~State (  )  [inline, virtual]

Definition at line 52 of file State.hh.


Member Function Documentation

virtual State* ell::State::clone ( State toFill = NULL  )  const [pure virtual]

Returns a pointer to a clone of the current state.

Parameters:
toFill a State to make a copy of this, or NULL if a new State should be created
Returns:
a pointer to a copy of this state, if toFill is != NULL the return value corresponds to the updated state pointed to by toFill, otherwise a new object is created !!!

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.

virtual CSequence& ell::State::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

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

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

Access to a compressed sequence representation of the state.

Returns:
the compressed sequence representation

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

virtual State* ell::State::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.

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.

virtual double ell::State::getEnergy (  )  const [pure virtual]

Returns the state specific energy.

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.

virtual const std::string& ell::State::getID ( void   )  const [pure virtual]

Access to a State subclass specific ID string to identify instances of this class.

Returns:
the subclass specific ID string

Implemented in ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.

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

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, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

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

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

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

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

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

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.

virtual NeighborListPtr ell::State::getRandomNeighborList (  )  const [pure 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.

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

bool ell::State::less ( const State s1,
const State s2 
) [inline, static]

Comparison function that compares two State pointer based on the less than operator '<' of the first State. The function can be used in STL algorithms, e.g. if only State pointer are stored but the ordering should be based on the object order.

Parameters:
s1 the State pointer of the object that is asked to be smaller (!=NULL)
s2 the State pointer of the object that is asked to be bigger (!=NULL)
Returns:
s1->operator <(*s1);

Reimplemented in ell::S_Explicit.

Definition at line 206 of file State.hh.

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

bool ell::State::operator< ( const State state2  )  const [inline, virtual]

Implements a unique order on states based on their energy and string representation. A state is smaller than another one iff it has smaller energy or it has equal energy and a lexicographically smaller string representation (tie breaker).

This function will be overwritten to achive a better performance than calling getEnergy() and getString().

If the energy function is non-degenerate the string comparison is obsolete.

Parameters:
state2 the State object to compare to
Returns:
true if this state is smaller than state2 according to the unique order of the states

Reimplemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, and ell::S_Explicit.

Definition at line 190 of file State.hh.

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

virtual std::string& ell::State::toString ( std::string &  toFill  )  const [pure virtual]

Fill the given string with a specific std::string representation of this State.

Parameters:
toFill the string to overwrite
Returns:
the changed toFill in parameter

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

virtual std::string ell::State::toString (  )  const [pure virtual]

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

Implemented in ell::S_LP, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

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

Uncompresses a compressed sequencce representation into a this State object.

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

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, and ell::S_SG_Ising.

virtual State* ell::State::uncompress ( const CSequence cseq,
State toFill 
) 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.

Implemented in ell::S_LP, ell::S_LP_PullM, ell::S_RNAfe_SingleM, ell::S_RNAfe_SingleM_TB, ell::S_Explicit, ell::S_SG_Ising, and ell::S_SG_NPP.


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