Rosetta
|
#include <Graph.hh>
Public Types | |
typedef EdgeListIterator | EdgeListIter |
Public Member Functions | |
virtual | ~Edge () |
destructor More... | |
Edge (Graph *owner, platform::Size first_node_ind, platform::Size second_node_ind) | |
Main edge constructor. This should only be invoked by create_new_edge, which itself is only called by add_edge. The ONLY way an edge should be added to a graph is through add_edge. NOTE: edges should be only be deleted by a call to the Graph's delete_edge method, and this method absolutely must be implemented by derived Graph classes. More... | |
virtual void | copy_from (Edge const *source) |
copy-from for use in Graph::operator= and copy ctors More... | |
platform::Size | get_other_ind (platform::Size node_index) const |
returns the index of the one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
Node const * | get_other_node (platform::Size node_index) const |
returns a const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
Node * | get_other_node (platform::Size node_index) |
returns a non-const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon. More... | |
platform::Size | get_first_node_ind () const |
returns the index of the lower node More... | |
platform::Size | get_second_node_ind () const |
returns the index of the upper node More... | |
void | set_pos_in_owners_list (EdgeListIter edge_iterator) |
called only by class Graph, this function gives the Edge the data it needs to later delete itself from its owner's edge list in constant time. More... | |
bool | same_edge (platform::Size node1, platform::Size node2) const |
Is this the same edge as another edge (node1,node2)? Note: this graph does not work for multi-graphs. Edges must be unique. More... | |
bool | is_loop () const |
Is this edge a loop? In Pseudographs, loop edges are incident twice on a single vertex. More... | |
virtual platform::Size | count_static_memory () const |
how much memory is statically allocated by this edge More... | |
virtual platform::Size | count_dynamic_memory () const |
how much memory is dynamically allocated by this edge – must be recursively invoked by a derived class. More... | |
Protected Member Functions | |
platform::Size | get_node_index (platform::Size index) const |
get the node index for one of the two nodes this edge is incident upon uses c-style index-from-0. More... | |
Node const * | get_node (platform::Size index) const |
get a const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes More... | |
Node * | get_node (platform::Size index) |
get a non-const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes More... | |
Graph const * | get_owner () const |
get a const * to the owning graph More... | |
Graph * | get_owner () |
get a non-const * to the owning graph More... | |
Private Member Functions | |
Edge () | |
Edge (Edge const &) | |
Edge & | operator= (Edge &) |
Private Attributes | |
std::array< platform::Size, 2 > | node_indices_ |
std::array< Node *, 2 > | nodes_ |
std::array< EdgeListIter, 2 > | pos_in_nodes_edge_list_ |
EdgeListIter | pos_in_owners_edge_list_ |
Graph * | owner_ |
|
virtual |
destructor
removes all record of this edge from edge-lists of the 1) nodes this edge is incident upon and 2) the owning interaction graph
References utility::graph::Graph::drop_edge(), is_loop(), nodes_, owner_, pos_in_nodes_edge_list_, and pos_in_owners_edge_list_.
utility::graph::Edge::Edge | ( | Graph * | owner, |
platform::Size | first_node_ind, | ||
platform::Size | second_node_ind | ||
) |
Main edge constructor. This should only be invoked by create_new_edge, which itself is only called by add_edge. The ONLY way an edge should be added to a graph is through add_edge. NOTE: edges should be only be deleted by a call to the Graph's delete_edge method, and this method absolutely must be implemented by derived Graph classes.
main constructor for edge, no default nor copy constructors
edge adds itself to the edge list of the two nodes its set to be incident upon, and stores the list-iterators that the nodes return.
owner | - [in] - owning InteractionGraph |
first_node_ind | - [in] - the index of the first node |
second_node_ind | - [in] - the index of the second node |
References debug_assert, node_indices_, nodes_, utility::graph::Graph::nodes_, and pos_in_nodes_edge_list_.
|
private |
Referenced by count_static_memory().
|
private |
|
virtual |
copy-from for use in Graph::operator= and copy ctors
derived classes should recursively call the copy_from method to ensure all parent class data is copied. It just so happens that this method does nothing, but that could change and the derived class should include a call to this function for that reason.
Referenced by utility::graph::Graph::Graph().
|
virtual |
how much memory is dynamically allocated by this edge – must be recursively invoked by a derived class.
memory accounting scheme
This method should be called recursively by derived classes – that is, each class should recurse to its parent.
|
virtual |
how much memory is statically allocated by this edge
memory accouting scheme
This is called non-recursively on the most-derived class
References Edge().
|
inline |
returns the index of the lower node
References node_indices_.
Referenced by utility::graph::Graph::add_edge(), and utility::graph::Graph::create_new_edge().
|
inlineprotected |
get a non-const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes
References debug_assert, and nodes_.
|
inlineprotected |
get a const * to one node that this edge is incident upon uses c-style index-from-0 for these two nodes
References debug_assert, and nodes_.
Referenced by EnvToolMover::apply(), CustomMover::apply(), FaSolReporter::apply(), ScoreFunctionFingerprintMover::apply(), calculate_percent_hydrophobic_distribution(), calculate_percent_hydrophobic_stats(), calculate_total_hASA_within_distance_avg_values(), calculate_total_hASA_within_distance_avgresiduevalues_allnbs_conditionalonnumnbs(), calculate_total_hASA_within_distance_exact_hASA_values(), calculate_total_hASA_within_distance_exact_hASA_values_allnbs(), calculate_total_hASA_within_distance_exact_hASA_values_allnbs_exposedornot_conditionalonnumnbs(), calculate_total_hASA_within_distance_miniSASAvalues_allnbs_exposedornot_conditionalonnumnbs(), centroid_rescore_test(), compute_interface_energy(), create_bp_jump_database_test(), define_interface(), dump_clash_pdb(), extract_scores(), figure_out_domain_neighbors(), fill_hbond_neighbors(), CapriTotalEnergy::finalize_total_energy(), find_clashes(), find_hppatches_nb_graph(), TwoChainInterface::find_interface(), TwoChainTenANeighbors::find_interface(), gen_pep_bb_sequential(), get_atom_lk_energy(), get_clash_pairs(), get_interface_energies(), get_interface_residues(), CrystDesign::get_interface_residues(), get_perresE(), get_res_water_energy(), harvest_motifs(), has_clash(), interface_energy_ratio(), is_clash(), main(), make_fragments(), mutate_random_residue(), my_main(), num_nbrs(), retrieve_residue_pair_energies(), run_pep_prep(), show_clashes(), show_intrachain_energies(), sicdock_thread_num(), and symm_self_rep().
|
inlineprotected |
get the node index for one of the two nodes this edge is incident upon uses c-style index-from-0.
References debug_assert, and node_indices_.
platform::Size utility::graph::Edge::get_other_ind | ( | platform::Size | node_index | ) | const |
returns the index of the one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon.
returns the index of the other node that the edge is incident upon
References debug_assert, and node_indices_.
Referenced by utility::graph::Node::add_edge(), and utility::graph::Node::drop_edge().
Node * utility::graph::Edge::get_other_node | ( | platform::Size | node_index | ) |
returns a non-const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon.
returns a pointer to the other node that the edge is incident upon
References debug_assert, node_indices_, and nodes_.
Node const * utility::graph::Edge::get_other_node | ( | platform::Size | node_index | ) | const |
returns a const pointer to one node given the index of the other. node_index must be one of the two nodes that this edge is incident upon.
return a const pointer to the other node that the edge is incident upon
|
inlineprotected |
get a non-const * to the owning graph
References owner_.
|
inlineprotected |
get a const * to the owning graph
References owner_.
|
inline |
returns the index of the upper node
References node_indices_.
Referenced by utility::graph::Graph::add_edge(), and utility::graph::Graph::create_new_edge().
|
inline |
Is this edge a loop? In Pseudographs, loop edges are incident twice on a single vertex.
References node_indices_.
Referenced by utility::graph::Node::add_edge(), and ~Edge().
bool utility::graph::Edge::same_edge | ( | platform::Size | node1, |
platform::Size | node2 | ||
) | const |
Is this the same edge as another edge (node1,node2)? Note: this graph does not work for multi-graphs. Edges must be unique.
returns true if this edge connects nodes of index node1 and node2 the order of node1 and node2 is not important
node1 | - [in] - index of one of the two nodes |
node2 | - [in] - index of the other of the two nodes |
References node_indices_, and erraser_analysis::temp.
Referenced by utility::graph::Graph::find_edge().
void utility::graph::Edge::set_pos_in_owners_list | ( | EdgeListIter | edge_iterator | ) |
called only by class Graph, this function gives the Edge the data it needs to later delete itself from its owner's edge list in constant time.
sets the iterator for this edge's position in its owner's edge list
References debug_assert, and pos_in_owners_edge_list_.
Referenced by utility::graph::Graph::add_edge().
|
private |
Referenced by Edge(), get_first_node_ind(), get_node_index(), get_other_ind(), get_other_node(), get_second_node_ind(), is_loop(), and same_edge().
|
private |
Referenced by Edge(), get_node(), get_other_node(), and ~Edge().
|
private |
Referenced by get_owner(), and ~Edge().
|
private |
|
private |
Referenced by set_pos_in_owners_list(), and ~Edge().