Rosetta  2020.37
 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::FirstClassNode< V, E, G > Class Template Reference

#include <AdditionalBackgroundNodesInteractionGraph.hh>

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

Public Types

typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * > 
BackgroundEdgeList
 
typedef std::list
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeListIter
 
typedef std::vector
< BackgroundNode< V, E, G > * > 
BackgroundNodeVector
 
typedef std::vector
< BackgroundToFirstClassEdge
< V, E, G > * > 
BackgroundEdgeVector
 
typedef std::vector
< BackgroundToFirstClassEdge
< V, E, G > * >::iterator 
BackgroundEdgeVectorIter
 

Public Member Functions

 ~FirstClassNode () override
 FirstClassNode destructor. More...
 
 FirstClassNode (G *owner, int node_id, int num_states)
 FirstClassNode constructor. More...
 
BackgroundEdgeListIter add_background_edge (BackgroundToFirstClassEdge< V, E, G > *edge)
 Adds a BackgroundToFirstClassEdge to the node's list of such edges and returns an iterator to that list position. More...
 
void drop_background_edge (BackgroundEdgeListIter edge)
 Removes an edge from the node's BackgroundToFirstClassEdge list. More...
 
unsigned int count_dynamic_memory () const override
 Returns an int representing the amount of memory in bytes used by this node. More...
 

Protected Member Functions

int get_num_edges_to_background_nodes () const
 
BackgroundToFirstClassEdge< V,
E, G > const * 
get_edge_to_bg_node (int index) const
 
BackgroundToFirstClassEdge< V,
E, G > * 
get_edge_to_bg_node (int index)
 
int get_index_of_adjacent_background_node (int index) const
 
BackgroundNode< V, E, G > const * get_adjacent_background_node (int index) const
 
BackgroundNode< V, E, G > * get_adjacent_background_node (int index)
 
bool get_bg_edge_vector_up_to_date_ () const
 
void update_bg_edge_vector ()
 Syncs the background edge vector with the background edge list. More...
 

Private Member Functions

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

Private Attributes

int num_edges_to_bg_nodes_
 
BackgroundEdgeList bg_edge_list_
 
BackgroundEdgeVector bg_edge_vector_
 
std::vector< int > adjacent_bg_node_indices_
 
BackgroundNodeVector bg_node_vector_
 
bool bg_edge_vector_up_to_date_
 

Detailed Description

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

A background node is a node which is not changing type or rotamer throughout a simulation.

Remarks
No public default constructor makes this class uncopyable.

Member Typedef Documentation

template<typename V, typename E, typename G>
typedef std::list< BackgroundToFirstClassEdge< V, E, G >* > core::pack::interaction_graph::FirstClassNode< V, E, G >::BackgroundEdgeList
template<typename V, typename E, typename G>
typedef std::list< BackgroundToFirstClassEdge< V, E, G >* >::iterator core::pack::interaction_graph::FirstClassNode< V, E, G >::BackgroundEdgeListIter
template<typename V, typename E, typename G>
typedef std::vector< BackgroundToFirstClassEdge< V, E, G >* > core::pack::interaction_graph::FirstClassNode< V, E, G >::BackgroundEdgeVector
template<typename V, typename E, typename G>
typedef std::vector< BackgroundToFirstClassEdge< V, E, G >* >::iterator core::pack::interaction_graph::FirstClassNode< V, E, G >::BackgroundEdgeVectorIter
template<typename V, typename E, typename G>
typedef std::vector< BackgroundNode< V, E, G >* > core::pack::interaction_graph::FirstClassNode< V, E, G >::BackgroundNodeVector

Constructor & Destructor Documentation

template<typename V , typename E , typename G >
core::pack::interaction_graph::FirstClassNode< V, E, G >::~FirstClassNode ( )
override

FirstClassNode destructor.

template<typename V , typename E , typename G >
core::pack::interaction_graph::FirstClassNode< V, E, G >::FirstClassNode ( G owner,
int  node_id,
int  num_states 
)

FirstClassNode constructor.

Parameters
owner- [in] - the owning interaction graph node_id - [in] - the index for this node amongst its owners set num_states - [in] - the number of states for this node
template<typename V, typename E, typename G>
core::pack::interaction_graph::FirstClassNode< V, E, G >::FirstClassNode ( )
private
template<typename V, typename E, typename G>
core::pack::interaction_graph::FirstClassNode< V, E, G >::FirstClassNode ( FirstClassNode< V, E, G > const &  )
private

Member Function Documentation

template<typename V , typename E , typename G >
std::list< BackgroundToFirstClassEdge< V, E, G > * >::iterator core::pack::interaction_graph::FirstClassNode< V, E, G >::add_background_edge ( BackgroundToFirstClassEdge< V, E, G > *  edge_ptr)

Adds a BackgroundToFirstClassEdge to the node's list of such edges and returns an iterator to that list position.

Remarks
Edge addition invalidates the bg_edge_vector_up_to_date_ flag
Parameters
edge_ptr- [in] - a pointer to the BackgroundToFirstClassEdge
template<typename V , typename E , typename G >
unsigned int core::pack::interaction_graph::FirstClassNode< V, E, G >::count_dynamic_memory ( ) const
override

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

Remarks
ronj lists consume more memory because they maintain pointers to the previous and next nodes ronj current calculation uses 4 * # elements in list * sizeof(pointer), but I think this is wrong ronj isn't it only 3 * # elements in list * sizeof(pointer)?
Parameters
total_memory- [out] - the amount of memory used by this node
template<typename V , typename E , typename G >
void core::pack::interaction_graph::FirstClassNode< V, E, G >::drop_background_edge ( BackgroundEdgeListIter  edge)

Removes an edge from the node's BackgroundToFirstClassEdge list.

Remarks
Invalidates bg_edge_vector_up_to_date_ flag
Parameters
edge- [in] - the iterator to the edge; in order to guarantee constant time edge deletion, each edge keeps iterators to its position in the edge lists of the nodes it's incident upon. It hands these iterators back to the nodes when it wants to delete itself.
template<typename V, typename E, typename G>
BackgroundNode< V, E, G > const* core::pack::interaction_graph::FirstClassNode< V, E, G >::get_adjacent_background_node ( int  index) const
inlineprotected
template<typename V, typename E, typename G>
BackgroundNode< V, E, G >* core::pack::interaction_graph::FirstClassNode< V, E, G >::get_adjacent_background_node ( int  index)
inlineprotected
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::FirstClassNode< V, E, G >::get_bg_edge_vector_up_to_date_ ( ) const
inlineprotected
template<typename V, typename E, typename G>
BackgroundToFirstClassEdge< V, E, G > const* core::pack::interaction_graph::FirstClassNode< V, E, G >::get_edge_to_bg_node ( int  index) const
inlineprotected
template<typename V, typename E, typename G>
BackgroundToFirstClassEdge< V, E, G >* core::pack::interaction_graph::FirstClassNode< V, E, G >::get_edge_to_bg_node ( int  index)
inlineprotected
template<typename V, typename E, typename G>
int core::pack::interaction_graph::FirstClassNode< V, E, G >::get_index_of_adjacent_background_node ( int  index) const
inlineprotected
template<typename V, typename E, typename G>
int core::pack::interaction_graph::FirstClassNode< V, E, G >::get_num_edges_to_background_nodes ( ) const
inlineprotected
template<typename V, typename E, typename G>
FirstClassNode< V, E, G >& core::pack::interaction_graph::FirstClassNode< V, E, G >::operator= ( FirstClassNode< V, E, G > const &  )
private
template<typename V , typename E , typename G >
void core::pack::interaction_graph::FirstClassNode< V, E, G >::update_bg_edge_vector ( )
protected

Syncs the background edge vector with the background edge list.

Updates the vector of pointers to background edges to correspond to the list of background edges. Informs its incident edges of their position in its vector.

Remarks
We are resizing these vectors to num_edges_to_bg_nodes PLUS ONE. This makes the vector 1-based.

Member Data Documentation

template<typename V, typename E, typename G>
std::vector< int > core::pack::interaction_graph::FirstClassNode< V, E, G >::adjacent_bg_node_indices_
private
template<typename V, typename E, typename G>
BackgroundEdgeList core::pack::interaction_graph::FirstClassNode< V, E, G >::bg_edge_list_
private
template<typename V, typename E, typename G>
BackgroundEdgeVector core::pack::interaction_graph::FirstClassNode< V, E, G >::bg_edge_vector_
private
template<typename V, typename E, typename G>
bool core::pack::interaction_graph::FirstClassNode< V, E, G >::bg_edge_vector_up_to_date_
private
template<typename V, typename E, typename G>
BackgroundNodeVector core::pack::interaction_graph::FirstClassNode< V, E, G >::bg_node_vector_
private
template<typename V, typename E, typename G>
int core::pack::interaction_graph::FirstClassNode< V, E, G >::num_edges_to_bg_nodes_
private

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