Rosetta 3.4
Public Types | Public Member Functions | Protected Member Functions
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G > Class Template Reference

An edge between a background node and a first class node. More...

#include <AdditionalBackgroundNodesInteractionGraph.hh>

Inheritance diagram for core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >:
Inheritance graph
[legend]
Collaboration diagram for core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeListIter

Public Member Functions

virtual ~BackgroundToFirstClassEdge ()
 virtual destructor. The edge removes itself from the graph by informing the two vertices its incident upon to drop it from their edge lists. Constant time edge removal.
 BackgroundToFirstClassEdge (AdditionalBackgroundNodesInteractionGraph< V, E, G > *owner, int fc_node_index, int bg_node_index)
 BackgroundToFirstClassEdge constructor - no default or copy constructors; no operator =.
int get_first_class_node_index () const
int get_background_node_index () const
int get_other_ind (FirstClassNode< V, E, G > *) const
 returns the index of the second class node
int get_other_ind (BackgroundNode< V, E, G > *) const
 returns the index of the first class node
FirstClassNode< V, E, G > * get_other_node (BackgroundNode< V, E, G > *) const
 returns a pointer to the first class node
BackgroundNode< V, E, G > * get_other_node (FirstClassNode< V, E, G > *) const
 returns a pointer to the second class node
void set_pos_in_owners_list (BackgroundEdgeListIter)
 stores the iterator to this edge in the owning graph's list of background-to-first-class edges.
void set_pos_in_node_edgevector (FirstClassNode< V, E, G > *caller, int pos)
 stores the index of this edge in its first class node's edge vector
void set_pos_in_node_edgevector (BackgroundNode< V, E, G > *caller, int pos)
 stores the index of this edge in its second class node's edge vector
bool same_edge (int fc_node_index, int bg_node_index) const
 returns true if this node is incident upon the two input vertex indices
virtual void prepare_for_simulated_annealing ()=0
virtual unsigned int count_static_memory () const =0
virtual unsigned int count_dynamic_memory () const
 Returns an int representing the amount of memory in bytes used by this node.

Protected Member Functions

FirstClassNode< V, E, G > * get_first_class_node () const
BackgroundNode< V, E, G > * get_background_node () const
AdditionalBackgroundNodesInteractionGraph
< V, E, G > * 
get_owner () const

Detailed Description

template<typename V, typename E, typename G>
class core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >

An edge between a background node and a first class node.

BackgroundToFirstClassEdge

Detailed:
Remarks:
Only derived classes can get non-const access to the FirstClassNode and BackgroundNode members. Const access is provided as a public method. Non-instantiable due to pure virtual methods. Not sure what the 'pos_in_fc_nodes_edge_list_' and other Iterator returning methods are used for.

Member Typedef Documentation

template<typename V, typename E, typename G>
typedef std::list< BackgroundToFirstClassEdge< V, E, G >* >::iterator core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::BackgroundEdgeListIter

Constructor & Destructor Documentation

template<typename V , typename E , typename G >
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::~BackgroundToFirstClassEdge ( ) [virtual]

virtual destructor. The edge removes itself from the graph by informing the two vertices its incident upon to drop it from their edge lists. Constant time edge removal.

BackgroundToFirstClassEdge::~BackgroundToFirstClassEdge

template<typename V , typename E , typename G >
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::BackgroundToFirstClassEdge ( AdditionalBackgroundNodesInteractionGraph< V, E, G > *  owner,
int  fc_node_index,
int  bg_node_index 
)

BackgroundToFirstClassEdge constructor - no default or copy constructors; no operator =.

BackgroundToFirstClassEdge::BackgroundToFirstClassEdge

Detailed:
This class of edge connects first class and second class nodes. This class of edge is very unlikely to hold the same kind of data in a (concrete) derived class. e.g. The SASABackgroundEdge holds pre-computed rotamer sphere overlaps for each rotamer-on-a-SASANode and the single-(fixed)-rotamer-on-a-background residue. The first class edge does not attempt to store precomputed sphere overlaps as they would be prohibitively expensive.
Parameters:
owner- [in] - the owning graph fc_node_index - [in] - the index of the first class node bg_node_index - [in] - the index of the second class node

References core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_background_node().


Member Function Documentation

template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::count_dynamic_memory ( ) const [virtual]

Returns an int representing the amount of memory in bytes used by this node.

BackgroundToFirstClassEdge::count_dynamic_memory

Remarks:
return 0 because no memory is dynamically allocated for these edges.

Reimplemented in core::pack::interaction_graph::HPatchBackgroundEdge< V, E, G >, and core::pack::interaction_graph::SurfaceBackgroundEdge< V, E, G >.

template<typename V, typename E, typename G>
virtual unsigned int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::count_static_memory ( ) const [pure virtual]
template<typename V, typename E, typename G>
BackgroundNode< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_background_node ( ) const [inline, protected]
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_background_node_index ( ) const [inline]
template<typename V, typename E, typename G>
FirstClassNode< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_first_class_node ( ) const [inline, protected]
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_first_class_node_index ( ) const [inline]
template<typename V , typename E , typename G >
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_other_ind ( BackgroundNode< V, E, G > *  ) const

returns the index of the first class node

BackgroundToFirstClassEdge::get_other_ind

Detailed:
A second class vertex may request a BackgroundToFirstClassEdge for the index of the first class node the edge connects it to by invoking edge->get_other_ind( this ); The this pointer simply tells the compiler which of the two overloaded get_other_ind() methods to invoke.
Parameters:
(unnamedparameter) - [in] - second class nodes want information about first class nodes when they refer to "the other node". The compiler resolves which of the two overloaded methods to invoke.
template<typename V , typename E , typename G >
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_other_ind ( FirstClassNode< V, E, G > *  ) const

returns the index of the second class node

BackgroundToFirstClassEdge::get_other_ind

Detailed:
A first class vertex may request a BackgroundToFirstClassEdge for the index of the background node the edge connects it to by invoking edge->get_other_ind( this ); The this pointer simply tells the compiler which of the two overloaded get_other_ind() methods to invoke.
Parameters:
(unnamedparameter) - [in] - First Class nodes want information about second class nodes when they refer to "the other node". The compiler resolves which of the two overloaded methods to invoke.
template<typename V , typename E , typename G >
FirstClassNode< V, E, G > * core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_other_node ( BackgroundNode< V, E, G > *  ) const

returns a pointer to the first class node

BackgroundToFirstClassEdge::get_other_node

Detailed:
unnamed parameter is usually the this pointer where the method is invoked inside a method of a second class node. the pointer type must be resolved at compile time. Same ideas here as in get_other_ind()
template<typename V , typename E , typename G >
BackgroundNode< V, E, G > * core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_other_node ( FirstClassNode< V, E, G > *  ) const

returns a pointer to the second class node

BackgroundToFirstClassEdge::get_other_node

Detailed:
unnamed parameter is usually the this pointer where the method is invoked inside a method of a first class node. the pointer type must be resolved at compile time. Same ideas here as in get_other_ind()
template<typename V, typename E, typename G>
AdditionalBackgroundNodesInteractionGraph< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::get_owner ( ) const [inline, protected]
template<typename V, typename E, typename G>
virtual void core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::prepare_for_simulated_annealing ( ) [pure virtual]
template<typename V , typename E , typename G >
bool core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::same_edge ( int  fc_node_index,
int  bg_node_index 
) const

returns true if this node is incident upon the two input vertex indices

BackgroundToFirstClassEdge::same_edge

Parameters:
fc_node_index- [in] - the index of the first class node bg_node_index - [in] - the index of the second class node
Remarks:
This graph setup will not support multigraphs: graphs that include multiple edges to the same vertices. In my (apl) original dynamic programming algorithm I didn't want to support multigraphs either; but in the adaptive dynamic programming implementation, multiple copies of "the same" edge ended up saving time -- though maybe not memory. So, this framework here will not readily support adaptive dynamic programming; but that's ok.
template<typename V , typename E , typename G >
void core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::set_pos_in_node_edgevector ( BackgroundNode< V, E, G > *  caller,
int  pos 
)

stores the index of this edge in its second class node's edge vector

BackgroundToFirstClassEdge::set_pos_in_node_edgevector

Detailed:
again, first (unnamed) parameter is the this pointer where the method has been invoked inside a method of the second class node.
Parameters:
(unnamedparameter) - [in] - pointer identifying the type of the node that invoked this overloaded method. pos - [in] - the position of this node in the edge vector of the second class node
template<typename V , typename E , typename G >
void core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::set_pos_in_node_edgevector ( FirstClassNode< V, E, G > *  caller,
int  pos 
)

stores the index of this edge in its first class node's edge vector

BackgroundToFirstClassEdge::set_pos_in_node_edgevector

Detailed:
again, first (unnamed) parameter is the 'this' pointer where the method has been invoked inside a method of the first class node.
Parameters:
(unnamedparameter) - [in] - pointer identifying the type of the node that invoked this overloaded method. pos - [in] - the position of 'this' edge in the edge vector of the first class node
template<typename V , typename E , typename G >
void core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::set_pos_in_owners_list ( BackgroundEdgeListIter  iter)

stores the iterator to this edge in the owning graph's list of background-to-first-class edges.

BackgroundToFirstClassEdge::set_pos_in_owners_list

Detailed:
required for constant time edge deletion

Referenced by core::pack::interaction_graph::AdditionalBackgroundNodesInteractionGraph< V, E, G >::add_background_edge().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines