Rosetta
|
#include <Graph.hh>
Public Types | |
typedef EdgeListIterator | EdgeListIter |
typedef EdgeListConstIterator | EdgeListConstIter |
Public Member Functions | |
virtual | ~Node () |
virtual destructor More... | |
Node (Graph *, platform::Size node_id) | |
Main constructor, no default constructor nor copy constructor. More... | |
virtual void | copy_from (Node const *source) |
invoked during graph assignment operators to copy any node data from one graph to another graph. The source node must be the same type as this node. More... | |
void | add_edge (Edge *edge_ptr, EdgeListIter &) |
adds edge pointer to edge list; returns an iterator to the new list element More... | |
void | drop_edge (EdgeListIter edge_iterator) |
removes an edge iterator from the node's edge list. Only called by Edge class. More... | |
void | drop_all_edges () |
deletes all edges incident upon this node More... | |
void | set_num_neighbors_counting_self_static (platform::Size neighbor) |
Edge const * | find_edge (platform::Size other_node_index) const |
a "slow" (linear) search for an edge. More... | |
Edge * | find_edge (platform::Size other_node_index) |
non-const edge finding method; changes no data, but returns a non-const pointer More... | |
virtual void | print () const |
send summaray data about this node to the screen More... | |
EdgeListIter | edge_list_begin () |
returns a non-const iterator to the beginning of its edge list More... | |
EdgeListConstIter | const_edge_list_begin () const |
returns a const iterator to the beginning of its edge list More... | |
EdgeListIter | edge_list_end () |
returns a non-const iterator to the end of its edge list More... | |
EdgeListConstIter | const_edge_list_end () const |
returns a const iterator to the end of its edge list More... | |
EdgeListIter | lower_edge_list_begin () |
returns a non-const iterator to the beginning of its lower-edge list More... | |
EdgeListConstIter | const_lower_edge_list_begin () const |
returns a const iterator to the beginning of its lower-edge list More... | |
EdgeListIter | lower_edge_list_end () |
returns a non-const iterator to the end of its lower-edge list More... | |
EdgeListConstIter | const_lower_edge_list_end () const |
returns a const iterator to the end of its lower-edge list More... | |
EdgeListIter | upper_edge_list_begin () |
returns a non-const iterator to the beginning of its upper-edge list More... | |
EdgeListConstIter | const_upper_edge_list_begin () const |
returns a const iterator to the beginning of its upper-edge list More... | |
EdgeListIter | upper_edge_list_end () |
returns a non-const iterator to the end of its upper-edge list More... | |
EdgeListConstIter | const_upper_edge_list_end () const |
returns a const iterator to the end of its upper-edge list More... | |
platform::Size | get_node_index () const |
the index for this node More... | |
platform::Size | num_edges () const |
the number of edges incident on this node, which may include a loop edge More... | |
platform::Size | num_neighbors_counting_self () const |
the number of neighbors counting "self" as a neighbor. More... | |
platform::Size | num_neighbors_counting_self_static () const |
the number of neighbors counting "self" as neighbor. Defaults to num_neighbors_counting_self() but can be set to other values as well. Useful in calculation of symmetrical structures. More... | |
platform::Size | get_num_edges_to_smaller_indexed_nodes () const |
the number of lower neighbors More... | |
platform::Size | get_num_edges_to_larger_indexed_nodes () const |
the number of upper neighbors – which "self" neighborness is counted if a loop edge is present More... | |
virtual platform::Size | count_static_memory () const |
memory accounting scheme More... | |
virtual platform::Size | count_dynamic_memory () const |
memory accounting scheme More... | |
bool | loop_incident () const |
NOTE TO SELF: remove loop support. More... | |
Protected Member Functions | |
Graph * | get_owner () const |
derived class access to the owner More... | |
Private Member Functions | |
Node () | |
Node (Node const &) | |
Node & | operator= (Node &) |
Private Attributes | |
platform::Size | node_index_ |
platform::Size | num_incident_edges_ |
platform::Size | num_neighbors_counting_self_static_ |
bool | loop_incident_ |
platform::Size | num_edges_to_smaller_indexed_nodes_ |
NOTE TO SELF: remove loop support. More... | |
platform::Size | num_edges_to_larger_indexed_nodes_ |
EdgeList | incident_edge_list_ |
EdgeListIter | first_upper_edge_ |
Graph * | owner_ |
|
virtualdefault |
virtual destructor
utility::graph::Node::Node | ( | Graph * | owner, |
platform::Size | node_id | ||
) |
Main constructor, no default constructor nor copy constructor.
|
private |
Referenced by count_static_memory().
|
private |
void utility::graph::Node::add_edge | ( | Edge * | edge_ptr, |
EdgeListIter & | eiter | ||
) |
adds edge pointer to edge list; returns an iterator to the new list element
If the other node this node is attached to by edge_ptr has a higher index then the edge is added to the end of its edge list; if the node has a smaller index, the edge pointer is added to the front of the edge list. The presence of a new edge means the edge vector is not up to date.
edge_ptr | - [in] - the new edge |
References utility::graph::EdgeList::begin(), debug_assert, utility::graph::EdgeList::end(), first_upper_edge_, utility::graph::Edge::get_other_ind(), incident_edge_list_, utility::graph::EdgeList::insert(), utility::graph::Edge::is_loop(), loop_incident_, node_index_, num_edges_to_larger_indexed_nodes_, num_edges_to_smaller_indexed_nodes_, num_incident_edges_, num_neighbors_counting_self(), and num_neighbors_counting_self_static_.
|
inline |
returns a const iterator to the beginning of its edge list
References utility::graph::EdgeList::const_begin(), and incident_edge_list_.
Referenced by utility::graph::find_connected_components(), and get_tenA_neighbor_residues().
|
inline |
returns a const iterator to the end of its edge list
References utility::graph::EdgeList::const_end(), and incident_edge_list_.
Referenced by EnvToolMover::apply(), FaSolReporter::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(), create_bp_jump_database_test(), figure_out_domain_neighbors(), fill_hbond_neighbors(), CapriTotalEnergy::finalize_total_energy(), utility::graph::find_connected_components(), find_hppatches_nb_graph(), gen_pep_bb_sequential(), get_atom_lk_energy(), get_res_water_energy(), get_tenA_neighbor_residues(), main(), make_fragments(), mutate_random_residue(), my_main(), num_nbrs(), and run_pep_prep().
|
inline |
returns a const iterator to the beginning of its lower-edge list
References utility::graph::EdgeList::const_begin(), and incident_edge_list_.
|
inline |
returns a const iterator to the end of its lower-edge list
References first_upper_edge_.
|
inline |
returns a const iterator to the beginning of its upper-edge list
References first_upper_edge_.
|
inline |
returns a const iterator to the end of its upper-edge list
References utility::graph::EdgeList::const_end(), and incident_edge_list_.
Referenced by CustomMover::apply(), ScoreFunctionFingerprintMover::apply(), compute_interface_energy(), extract_scores(), find_clashes(), TwoChainInterface::find_interface(), TwoChainTenANeighbors::find_interface(), harvest_motifs(), interface_energy_ratio(), my_main(), retrieve_residue_pair_energies(), sicdock_thread_num(), and symm_self_rep().
|
virtual |
invoked during graph assignment operators to copy any node data from one graph to another graph. The source node must be the same type as this node.
copy-from for use in Graph::operator= and copy ctors; derived classes must define their own version of this function
|
virtual |
memory accounting scheme
recursively descend through heirarchy accounting for heap memory usage. Each derived class in the heirarchy should recursively add the amount of dynamic memory its parent allocates by calling parent::count_dynamic_memory
References num_incident_edges_.
|
virtual |
void utility::graph::Node::drop_all_edges | ( | ) |
deletes all edges incident upon this node
As edges delete themselves, they invalidate any iterators that point to their (former) positions in the node and graph edge lists. Therefore, before calling delete on an edge object, one must grab the next iterator in a list. Below, nextiter copies iter and is incremented before iter's edge is deleted. Note also that "++iter" does not appear in the for loop.
References utility::graph::EdgeList::begin(), utility::graph::Graph::delete_edge(), utility::graph::EdgeList::end(), incident_edge_list_, and owner_.
Referenced by utility::graph::Graph::drop_all_edges_for_node().
void utility::graph::Node::drop_edge | ( | EdgeListIter | eiter | ) |
removes an edge iterator from the node's edge list. Only called by Edge class.
edges efficiently delete themselves from the edge lists of the nodes they are incident upon by keeping a pair of iterators. Edges request nodes delete them by handing the iterator back to the node.
edge | - [in] - the iterator for this node's edge list that points at the edge which is trying to delete itself |
References utility::graph::EdgeList::erase(), first_upper_edge_, utility::graph::Edge::get_other_ind(), incident_edge_list_, loop_incident_, node_index_, num_edges_to_larger_indexed_nodes_, num_edges_to_smaller_indexed_nodes_, num_incident_edges_, num_neighbors_counting_self(), and num_neighbors_counting_self_static_.
|
inline |
returns a non-const iterator to the beginning of its edge list
References utility::graph::EdgeList::begin(), and incident_edge_list_.
|
inline |
returns a non-const iterator to the end of its edge list
References utility::graph::EdgeList::end(), and incident_edge_list_.
Referenced by get_interface_residues(), CrystDesign::get_interface_residues(), and main().
Edge * utility::graph::Node::find_edge | ( | platform::Size | other_node_index | ) |
non-const edge finding method; changes no data, but returns a non-const pointer
References utility::graph::EdgeList::begin(), utility::graph::EdgeList::end(), end, first_upper_edge_, get_node_index(), incident_edge_list_, node_index_, and basic::options::OptionKeys::cutoutdomain::start.
Edge const * utility::graph::Node::find_edge | ( | platform::Size | other_node | ) | const |
a "slow" (linear) search for an edge.
Constant time if each vertex has a constant number of edges. Edges are identified by the index of the node to which the edge connects this node. Returns NULL when there is no such connecting edge.
other_node | - [in] - the index of the node that the desired edge connects this node to |
|
inline |
|
inline |
the number of upper neighbors – which "self" neighborness is counted if a loop edge is present
References num_edges_to_larger_indexed_nodes_.
|
inline |
the number of lower neighbors
References num_edges_to_smaller_indexed_nodes_.
|
inlineprotected |
derived class access to the owner
References owner_.
|
inline |
NOTE TO SELF: remove loop support.
References loop_incident_.
|
inline |
returns a non-const iterator to the beginning of its lower-edge list
References utility::graph::EdgeList::begin(), and incident_edge_list_.
|
inline |
returns a non-const iterator to the end of its lower-edge list
References first_upper_edge_.
Referenced by define_interface(), get_clash_pairs(), has_clash(), is_clash(), and main().
|
inline |
the number of edges incident on this node, which may include a loop edge
References num_incident_edges_.
|
inline |
the number of neighbors counting "self" as a neighbor.
References loop_incident_, and num_incident_edges_.
Referenced by add_edge(), and drop_edge().
|
inline |
the number of neighbors counting "self" as neighbor. Defaults to num_neighbors_counting_self() but can be set to other values as well. Useful in calculation of symmetrical structures.
References num_neighbors_counting_self_static_.
|
virtual |
send summaray data about this node to the screen
virtual function to print node to standard out
References utility::graph::EdgeList::const_begin(), utility::graph::EdgeList::const_end(), and incident_edge_list_.
void utility::graph::Node::set_num_neighbors_counting_self_static | ( | platform::Size | neighbor | ) |
manually change the number of neighbors for a Node. Used for symmetry scoring
References num_neighbors_counting_self_static_.
|
inline |
returns a non-const iterator to the beginning of its upper-edge list
References first_upper_edge_.
|
inline |
returns a non-const iterator to the end of its upper-edge list
References utility::graph::EdgeList::end(), and incident_edge_list_.
Referenced by dump_clash_pdb(), get_clash_pairs(), get_interface_energies(), get_perresE(), has_clash(), is_clash(), main(), show_clashes(), and show_intrachain_energies().
|
private |
|
private |
|
private |
Referenced by add_edge(), drop_edge(), loop_incident(), and num_neighbors_counting_self().
|
private |
Referenced by add_edge(), drop_edge(), find_edge(), and get_node_index().
|
private |
Referenced by add_edge(), drop_edge(), and get_num_edges_to_larger_indexed_nodes().
|
private |
NOTE TO SELF: remove loop support.
Referenced by add_edge(), drop_edge(), and get_num_edges_to_smaller_indexed_nodes().
|
private |
Referenced by add_edge(), count_dynamic_memory(), drop_edge(), num_edges(), and num_neighbors_counting_self().
|
private |
Referenced by add_edge(), drop_edge(), num_neighbors_counting_self_static(), and set_num_neighbors_counting_self_static().
|
private |
Referenced by drop_all_edges(), and get_owner().