![]() |
Rosetta Core
2014.16.56682
|
#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_ |
|
virtual |
virtual destructor
| core::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 core::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 core::graph::EdgeList::begin(), core::graph::EdgeList::end(), first_upper_edge_, core::graph::Edge::get_other_ind(), incident_edge_list_, core::graph::EdgeList::insert(), core::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 core::graph::EdgeList::const_begin(), and incident_edge_list_.
Referenced by core::scoring::geometric_solvation::ExactOccludedHbondSolEnergy::compute_polar_group_sol_energy(), core::graph::find_connected_components(), core::scoring::TenANeighborNode::neighbor_mass(), core::pack::scmin::CartSCMinMultifunc::operator()(), core::pack::scmin::SCMinMultifunc::operator()(), core::pack::interaction_graph::LinearMemNode::project_deltaE_for_substitution(), core::scoring::geometric_solvation::OccludedHbondSolEnergy_onebody::residue_energy(), core::scoring::geometric_solvation::ExactOccludedHbondSolEnergy::residue_energy(), core::pack::RTMin::rtmin(), core::optimization::symmetry::SymMinimizerMap::SymMinimizerMap(), and core::scoring::TenANeighborNode::update_neighbor_mass_sum().
|
inline |
returns a const iterator to the end of its edge list
References core::graph::EdgeList::const_end(), and incident_edge_list_.
Referenced by core::scoring::geometric_solvation::add_to_individual_sol_energies(), core::scoring::methods::ProQ_Energy::atom_feature(), core::scoring::CenRotEnvPairPotential::compute_centroid_environment(), core::scoring::CenRotEnvPairPotential::compute_dcentroid_environment(), core::scoring::geometric_solvation::ExactOccludedHbondSolEnergy::compute_polar_group_sol_energy(), core::scoring::methods::Fa_MbsolvEnergy::eval_atom_derivative(), core::scoring::rna::RNA_LJ_BaseEnergy::eval_atom_derivative(), core::scoring::geometric_solvation::GeometricSolEnergyEvaluator::eval_atom_derivative(), core::scoring::hackaro::HackAroEnergy::eval_atom_derivative(), core::scoring::methods::EnvSmoothEnergy::eval_atom_derivative(), core::scoring::methods::MembraneEnvSmoothEnergy::eval_atom_derivative(), core::scoring::rna::RNA_VDW_Energy::eval_atom_derivative(), core::scoring::rna::RNA_DataBackboneEnergy::eval_atom_derivative(), core::scoring::methods::HybridVDW_Energy::eval_atom_derivative(), core::scoring::rna::RNA_FullAtomStackingEnergy::eval_atom_derivative(), core::scoring::vdwaals::VDW_Energy::eval_atom_derivative(), core::scoring::elec::FA_ElecEnergyAroAll::eval_atom_derivative(), core::scoring::elec::FA_ElecEnergyAroAro::eval_atom_derivative(), core::scoring::elec::RNA_FA_ElecEnergy::eval_atom_derivative(), core::scoring::rna::RNA_LowResolutionPotential::eval_atom_derivative_base_base(), core::scoring::rna::RNA_LowResolutionPotential::eval_atom_derivative_rna_backbone_backbone(), core::scoring::rna::RNA_LowResolutionPotential::eval_atom_derivative_rna_base_backbone(), core::scoring::rna::RNA_LowResolutionPotential::eval_atom_derivative_rna_repulsive(), core::scoring::geometric_solvation::GeometricSolEnergyEvaluator::eval_atom_energy(), core::scoring::CenRotEnvPairPotential::evaluate_cen_rot_env_and_cbeta_deriv(), core::scoring::SmoothEnvPairPotential::evaluate_env_and_cbeta_deriv(), core::graph::find_connected_components(), core::scoring::SecondaryStructurePotential::hspair(), core::scoring::electron_density::ElectronDensity::matchRes(), core::scoring::TenANeighborNode::neighbor_mass(), core::pack::scmin::CartSCMinMultifunc::operator()(), core::pack::scmin::SCMinMultifunc::operator()(), core::scoring::geometric_solvation::ContextIndependentGeometricSolEnergy::precalculate_bb_bb_energy_for_design(), core::pack::interaction_graph::LinearMemNode::project_deltaE_for_substitution(), core::scoring::methods::ProQ_Energy::res_feature(), core::scoring::geometric_solvation::OccludedHbondSolEnergy_onebody::residue_energy(), core::scoring::geometric_solvation::ExactOccludedHbondSolEnergy::residue_energy(), core::pack::RTMin::rtmin(), core::scoring::methods::EnvSmoothEnergy::setup_for_derivatives(), core::scoring::methods::MembraneEnvSmoothEnergy::setup_for_derivatives(), core::scoring::hbonds::HBondSet::setup_for_residue_pair_energies(), core::scoring::FACTSPotential::setup_for_scoring(), core::optimization::symmetry::SymMinimizerMap::SymMinimizerMap(), core::scoring::FACTSPoseInfo::update_enumeration_shell(), core::scoring::TenANeighborNode::update_neighbor_mass_sum(), and core::scoring::rna::RNA_LowResolutionPotential::update_rna_base_base_interactions().
|
inline |
returns a const iterator to the beginning of its lower-edge list
References core::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 core::graph::EdgeList::const_end(), and incident_edge_list_.
Referenced by core::scoring::methods::LK_hack::calculate_derivatives_for_atoms_and_pseudo_base_atoms(), core::scoring::EnvPairPotential::compute_centroid_environment(), core::scoring::SmoothEnvPairPotential::compute_centroid_environment(), core::scoring::SmoothEnvPairPotential::compute_dcentroid_environment(), core::scoring::WaterAdductHBondPotential::fill_h2o_hbond_set(), core::scoring::hbonds::fill_hbond_set(), core::scoring::hbonds::fill_hbond_set_by_AHdist_threshold(), core::scoring::ScoreFunction::get_sub_score(), core::pose::metrics::simple_calculators::InterfaceDeltaEnergeticsCalculator::recompute(), core::scoring::FACTSPotential::setup_for_derivatives(), and core::scoring::SecondaryStructurePotential::sspair().
|
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
Reimplemented in core::scoring::MinimizationNode, core::scoring::EnergyNode, core::pack::interaction_graph::SimpleNode, core::scoring::TenANeighborNode, core::scoring::TwelveANeighborNode, and core::scoring::constraints::ConstraintNode.
Referenced by core::scoring::constraints::ConstraintNode::copy_from().
|
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
Reimplemented in core::scoring::MinimizationNode, core::scoring::EnergyNode, core::pack::interaction_graph::SimpleNode, core::scoring::TenANeighborNode, core::scoring::TwelveANeighborNode, and core::scoring::constraints::ConstraintNode.
References num_incident_edges_.
Referenced by core::scoring::constraints::ConstraintNode::count_dynamic_memory(), core::scoring::TwelveANeighborNode::count_dynamic_memory(), core::scoring::TenANeighborNode::count_dynamic_memory(), core::scoring::EnergyNode::count_dynamic_memory(), and core::scoring::MinimizationNode::count_dynamic_memory().
|
virtual |
memory accounting scheme
called on most-derived class. The most-derived class should NOT recursively call this method on its parent class. The sizeof function will handle the whole Node (or DerivedNode).
Reimplemented in core::scoring::MinimizationNode, core::scoring::EnergyNode, core::pack::interaction_graph::SimpleNode, core::scoring::TenANeighborNode, core::scoring::TwelveANeighborNode, and core::scoring::constraints::ConstraintNode.
References Node().
| void core::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 core::graph::EdgeList::begin(), core::graph::Graph::delete_edge(), core::graph::EdgeList::end(), incident_edge_list_, and owner_.
Referenced by core::graph::Graph::drop_all_edges_for_node().
| void core::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 core::graph::EdgeList::erase(), first_upper_edge_, core::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_.
Referenced by core::graph::Edge::~Edge().
|
inline |
returns a non-const iterator to the beginning of its edge list
References core::graph::EdgeList::begin(), and incident_edge_list_.
Referenced by core::pack::interaction_graph::SimpleNode::commit_change_no_res_pointer_update(), core::pack::interaction_graph::SimpleInteractionGraph::consider_substitution(), core::pack::scmin::CartSCMinMultifunc::dfunc(), core::pack::scmin::SCMinMultifunc::dfunc(), core::pack::scmin::CartSCMinMultifunc::operator()(), core::pack::scmin::SCMinMultifunc::operator()(), core::pack::reinitialize_mingraph_neighborhood_for_residue(), core::pack::interaction_graph::SimpleNode::set_alternate(), core::pack::interaction_graph::SimpleNode::set_current(), and core::pack::interaction_graph::SimpleNode::update_energies_after_passive_change().
|
inline |
returns a non-const iterator to the end of its edge list
References core::graph::EdgeList::end(), and incident_edge_list_.
Referenced by core::pack::interaction_graph::SimpleNode::commit_change_no_res_pointer_update(), core::pack::interaction_graph::SimpleInteractionGraph::consider_substitution(), core::pack::scmin::CartSCMinMultifunc::dfunc(), core::pack::scmin::SCMinMultifunc::dfunc(), core::pack::scmin::CartSCMinMultifunc::operator()(), core::pack::scmin::SCMinMultifunc::operator()(), core::pack::reinitialize_mingraph_neighborhood_for_residue(), core::pack::RTMin::rtmin(), core::pack::interaction_graph::SimpleNode::set_alternate(), core::pack::interaction_graph::SimpleNode::set_current(), and core::pack::interaction_graph::SimpleNode::update_energies_after_passive_change().
| Edge const * core::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 |
| Edge * core::graph::Node::find_edge | ( | platform::Size | other_node_index | ) |
non-const edge finding method; changes no data, but returns a non-const pointer
References core::graph::EdgeList::begin(), core::sequence::end, core::graph::EdgeList::end(), first_upper_edge_, get_node_index(), incident_edge_list_, node_index_, and start.
|
inline |
the index for this node
References node_index_.
Referenced by find_edge(), core::scoring::TenANeighborNode::neighbor_mass(), print(), and core::scoring::TenANeighborNode::update_neighbor_mass_sum().
|
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_.
Referenced by core::pack::interaction_graph::SimpleNode::update_alternate_one_body_energy(), and core::pack::interaction_graph::SimpleNode::update_current_one_body_energy().
|
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 core::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_.
|
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(), core::pack::rotamer_set::RotamerSet_::build_rotamers_for_concrete(), core::pack::rotamer_set::RotamerSet_::compute_one_body_energy_maps(), core::pack::interaction_graph::SurfacePotential::compute_pose_surface_energy(), drop_edge(), core::scoring::WaterAdductHBondPotential::fill_h2o_hbond_set(), core::pack::interaction_graph::SurfaceNode< V, E, G >::initialize_num_neighbors_counting_self(), core::pack::interaction_graph::SurfaceBackgroundNode< V, E, G >::initialize_num_neighbors_counting_self(), and core::io::sequence_comparation::DesignContrast::setNeighbors().
|
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_.
Referenced by core::scoring::hbonds::fill_hbond_set().
|
virtual |
send summaray data about this node to the screen
virtual function to print node to standard out
Reimplemented in core::scoring::MinimizationNode, core::scoring::EnergyNode, and core::pack::interaction_graph::SimpleNode.
References core::graph::EdgeList::const_begin(), core::graph::EdgeList::const_end(), get_node_index(), and incident_edge_list_.
Referenced by core::scoring::EnergyNode::print(), and core::scoring::MinimizationNode::print().
| void core::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_.
Referenced by core::scoring::symmetry::SymmetricEnergies::update_neighbor_links().
|
inline |
returns a non-const iterator to the beginning of its upper-edge list
References first_upper_edge_.
Referenced by core::pack::interaction_graph::SimpleInteractionGraph::total_energy().
|
inline |
returns a non-const iterator to the end of its upper-edge list
References core::graph::EdgeList::end(), and incident_edge_list_.
Referenced by core::scoring::rna::RNA_PairwiseLowResolutionEnergy::clean_up_rna_two_body_energy_tables(), core::scoring::symmetry::SymmetricScoreFunction::eval_twobody_neighbor_energies(), core::scoring::ScoreFunction::eval_twobody_neighbor_energies(), and core::pack::interaction_graph::SimpleInteractionGraph::total_energy().
|
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().
1.8.7