Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
utility::graph::UEVertex< V, E > Class Template Reference

#include <UpperEdgeGraph.hh>

Inheritance diagram for utility::graph::UEVertex< V, E >:
Inheritance graph
[legend]

Public Types

typedef UEVertex< V, E > VertexClass
 
typedef UEEdge< V, E > EdgeClass
 
typedef UpperEdgeGraph< V, E > GraphClass
 
typedef utility::vector1
< EdgeClass
UpperEdgeVector
 
typedef utility::vector1
< EdgeClass >::iterator 
UpperEdgeListIter
 
typedef utility::vector1
< EdgeClass >::const_iterator 
UpperEdgeListConstIter
 

Public Member Functions

 UEVertex (GraphClass *owner, platform::Size index)
 standard constructor; though if vertices are to be allocated in a single vector1, then this ctor requires creating and destroying an anonymous vertex to add each vertex to the graph... wasteful More...
 
 UEVertex ()
 default constructor; useful for allocating all vertices at once in a single vector1 using the resize() method. Note that both index_ and owner_ are set to 0. This state must be corrected before the vertex is of any use. More...
 
 ~UEVertex () override=default
 dstor, should be non-virtual More...
 
void reserve_edge_space ()
 reserves space for the edges. Due to the nature of vertex construction in the UEGraph, this method should be called separately from the constructor. More...
 
EdgeClassget_edge (platform::Size upper_vertex_id)
 
EdgeClass const * get_edge (platform::Size upper_vertex_id) const
 
bool edge_exists (platform::Size upper_vertex_id)
 
UpperEdgeListIter upper_edge_list_begin ()
 
UpperEdgeListIter upper_edge_list_end ()
 
UpperEdgeListConstIter const_upper_edge_list_begin () const
 
UpperEdgeListConstIter const_upper_edge_list_end () const
 
platform::Size num_upper_neighbors () const
 
platform::Size num_lower_neighbors () const
 
platform::Size num_neighbors () const
 
platform::Size num_neighbors_counting_self () const
 
void drop_all_edges ()
 
V & data ()
 
V const & data () const
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Member Functions

void set_index_and_owner (platform::Size index, GraphClass *owner)
 method for completing the construction of a vertex if the defaul ctor was used. More...
 
void add_edge (platform::Size upper_vertex_index)
 add an edge More...
 
void add_edge (platform::Size upper_vertex_index, E const &edge_data)
 
void note_upper_edge_deleted ()
 
void note_lower_edge_deleted ()
 
void note_lower_edge_added ()
 
void make_edge_vector_current () const
 
void add_edge_common ()
 

Private Attributes

platform::Size index_
 
UpperEdgeVector upper_edges_
 
platform::Size num_upper_edges_
 
platform::Size num_lower_edges_
 
bool lazily_deleted_edges_present_
 
GraphClassowner_
 
data_
 

Friends

class UEEdge< V, E >
 
class UpperEdgeGraph< V, E >
 

Member Typedef Documentation

template<class V, class E>
typedef UEEdge< V, E > utility::graph::UEVertex< V, E >::EdgeClass
template<class V, class E>
typedef UpperEdgeGraph< V, E > utility::graph::UEVertex< V, E >::GraphClass
template<class V, class E>
typedef utility::vector1< EdgeClass >::iterator utility::graph::UEVertex< V, E >::UpperEdgeListIter
template<class V, class E>
typedef UEVertex< V, E > utility::graph::UEVertex< V, E >::VertexClass

Constructor & Destructor Documentation

template<class V, class E>
utility::graph::UEVertex< V, E >::UEVertex ( GraphClass owner,
platform::Size  index 
)
inline

standard constructor; though if vertices are to be allocated in a single vector1, then this ctor requires creating and destroying an anonymous vertex to add each vertex to the graph... wasteful

References utility::graph::UEVertex< V, E >::upper_edges_.

template<class V, class E>
utility::graph::UEVertex< V, E >::UEVertex ( )
inline

default constructor; useful for allocating all vertices at once in a single vector1 using the resize() method. Note that both index_ and owner_ are set to 0. This state must be corrected before the vertex is of any use.

References utility::graph::UEVertex< V, E >::upper_edges_.

template<class V, class E>
utility::graph::UEVertex< V, E >::~UEVertex ( )
overridedefault

dstor, should be non-virtual

Member Function Documentation

template<class V, class E>
void utility::graph::UEVertex< V, E >::add_edge ( platform::Size  upper_vertex_index)
inlineprivate

add an edge

do not try to use this method or the other add_edge method to add edges to a vertex; they are for class UpperEdgeGraph only. Invoke add_edge on the graph itself.

References utility::graph::UEVertex< V, E >::add_edge_common(), utility::graph::UEVertex< V, E >::index_, utility::graph::UEVertex< V, E >::owner_, and utility::graph::UEVertex< V, E >::upper_edges_.

template<class V, class E>
void utility::graph::UEVertex< V, E >::add_edge ( platform::Size  upper_vertex_index,
E const &  edge_data 
)
inlineprivate
template<class V, class E>
void utility::graph::UEVertex< V, E >::add_edge_common ( )
inlineprivate
template<class V, class E>
UpperEdgeListConstIter utility::graph::UEVertex< V, E >::const_upper_edge_list_begin ( ) const
inline
template<class V, class E>
UpperEdgeListConstIter utility::graph::UEVertex< V, E >::const_upper_edge_list_end ( ) const
inline
template<class V, class E>
V& utility::graph::UEVertex< V, E >::data ( )
inline
template<class V, class E>
V const& utility::graph::UEVertex< V, E >::data ( ) const
inline
template<class V, class E>
void utility::graph::UEVertex< V, E >::drop_all_edges ( )
inline
template<class V, class E>
bool utility::graph::UEVertex< V, E >::edge_exists ( platform::Size  upper_vertex_id)
inline
template<class V, class E>
EdgeClass* utility::graph::UEVertex< V, E >::get_edge ( platform::Size  upper_vertex_id)
inline
template<class V, class E>
EdgeClass const* utility::graph::UEVertex< V, E >::get_edge ( platform::Size  upper_vertex_id) const
inline
template<class V, class E>
void utility::graph::UEVertex< V, E >::make_edge_vector_current ( ) const
inlineprivate
template<class V, class E>
void utility::graph::UEVertex< V, E >::note_lower_edge_added ( )
inlineprivate
template<class V, class E>
void utility::graph::UEVertex< V, E >::note_lower_edge_deleted ( )
inlineprivate
template<class V, class E>
void utility::graph::UEVertex< V, E >::note_upper_edge_deleted ( )
inlineprivate
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_lower_neighbors ( ) const
inline
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_neighbors ( ) const
inline
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_neighbors_counting_self ( ) const
inline
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_upper_neighbors ( ) const
inline
template<class V, class E>
void utility::graph::UEVertex< V, E >::reserve_edge_space ( )
inline

reserves space for the edges. Due to the nature of vertex construction in the UEGraph, this method should be called separately from the constructor.

class V must define a static member "NUM_EDGES_TO_RESERVE()"; the UEVertex constructor allocates space for that many edges – if fewer than that many edges are added to a sigle node, then new() need never be called. if more are added, the class does not crash – it simply grows the vector out

References utility::graph::UEVertex< V, E >::upper_edges_.

template<class V, class E>
void utility::graph::UEVertex< V, E >::set_index_and_owner ( platform::Size  index,
GraphClass owner 
)
inlineprivate

method for completing the construction of a vertex if the defaul ctor was used.

to be called by class UEGraph only

References debug_assert, ObjexxFCL::index(), utility::graph::UEVertex< V, E >::index_, and utility::graph::UEVertex< V, E >::owner_.

template<class V, class E>
UpperEdgeListIter utility::graph::UEVertex< V, E >::upper_edge_list_begin ( )
inline
template<class V, class E>
UpperEdgeListIter utility::graph::UEVertex< V, E >::upper_edge_list_end ( )
inline

Friends And Related Function Documentation

template<class V, class E>
friend class UEEdge< V, E >
friend
template<class V, class E>
friend class UpperEdgeGraph< V, E >
friend

Member Data Documentation

template<class V, class E>
V utility::graph::UEVertex< V, E >::data_
private
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::index_
private
template<class V, class E>
bool utility::graph::UEVertex< V, E >::lazily_deleted_edges_present_
mutableprivate
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_lower_edges_
private
template<class V, class E>
platform::Size utility::graph::UEVertex< V, E >::num_upper_edges_
private
template<class V, class E>
GraphClass* utility::graph::UEVertex< V, E >::owner_
private
template<class V, class E>
UpperEdgeVector utility::graph::UEVertex< V, E >::upper_edges_
mutableprivate

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