Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G > Class Template Referenceabstract

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]

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. More...
 
 BackgroundToFirstClassEdge (AdditionalBackgroundNodesInteractionGraph< V, E, G > *owner, int fc_node_index, int bg_node_index)
 BackgroundToFirstClassEdge constructor - no default or copy constructors; no operator =. More...
 
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 More...
 
int get_other_ind (BackgroundNode< V, E, G > *) const
 returns the index of the first class node More...
 
FirstClassNode< V, E, G > * get_other_node (BackgroundNode< V, E, G > *) const
 returns a pointer to the first class node More...
 
BackgroundNode< V, E, G > * get_other_node (FirstClassNode< V, E, G > *) const
 returns a pointer to the second class node More...
 
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. More...
 
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 More...
 
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 More...
 
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 More...
 
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. More...
 
bool bgtfce_marked_for_deletion ()
 

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
 
void bgtfce_mark_edge_for_deletion ()
 

Private Member Functions

 BackgroundToFirstClassEdge ()
 
 BackgroundToFirstClassEdge (BackgroundToFirstClassEdge< V, E, G > const &)
 
BackgroundToFirstClassEdge< V,
E, G > & 
operator= (BackgroundToFirstClassEdge< V, E, G > const &)
 

Private Attributes

int first_class_node_index_
 
int background_node_index_
 
FirstClassNode< V, E, G > * first_class_node_
 
BackgroundNode< V, E, G > * background_node_
 
int pos_in_fc_edge_vector_
 
int pos_in_bg_edge_vector_
 
BackgroundEdgeListIter pos_in_fc_nodes_edge_list_
 
BackgroundEdgeListIter pos_in_bg_nodes_edge_list_
 
BackgroundEdgeListIter pos_in_owners_edge_list_
 
AdditionalBackgroundNodesInteractionGraph
< V, E, G > * 
owner_
 
bool marked_for_deletion_ = false
 

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.

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.

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 =.

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
template<typename V, typename E, typename G>
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::BackgroundToFirstClassEdge ( )
private
template<typename V, typename E, typename G>
core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::BackgroundToFirstClassEdge ( BackgroundToFirstClassEdge< V, E, G > const &  )
private

Member Function Documentation

template<typename V, typename E, typename G>
void core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::bgtfce_mark_edge_for_deletion ( )
inlineprotected
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::bgtfce_marked_for_deletion ( )
inline
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.

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

Reimplemented in core::pack::interaction_graph::HPatchBackgroundEdge< V, E, G >, core::pack::interaction_graph::NPDHBondBackgroundEdge< 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
inlineprotected
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
inlineprotected
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 ( FirstClassNode< V, E, G > *  ) const

returns the index of the second class node

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 >
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

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 >
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

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

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
inlineprotected
template<typename V, typename E, typename G>
BackgroundToFirstClassEdge< V, E, G >& core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::operator= ( BackgroundToFirstClassEdge< V, E, G > const &  )
private
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

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 ( FirstClassNode< V, E, G > *  caller,
int  pos 
)

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

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_node_edgevector ( BackgroundNode< V, E, G > *  caller,
int  pos 
)

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

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_owners_list ( BackgroundEdgeListIter  iter)

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

required for constant time edge deletion

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

Member Data Documentation

template<typename V, typename E, typename G>
BackgroundNode< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::background_node_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::background_node_index_
private
template<typename V, typename E, typename G>
FirstClassNode< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::first_class_node_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::first_class_node_index_
private
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::marked_for_deletion_ = false
private
template<typename V, typename E, typename G>
AdditionalBackgroundNodesInteractionGraph< V, E, G >* core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::owner_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::pos_in_bg_edge_vector_
private
template<typename V, typename E, typename G>
BackgroundEdgeListIter core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::pos_in_bg_nodes_edge_list_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::pos_in_fc_edge_vector_
private
template<typename V, typename E, typename G>
BackgroundEdgeListIter core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::pos_in_fc_nodes_edge_list_
private
template<typename V, typename E, typename G>
BackgroundEdgeListIter core::pack::interaction_graph::BackgroundToFirstClassEdge< V, E, G >::pos_in_owners_edge_list_
private

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