rosetta.core.graph._core_graph_ module
Functions
def delete_all_intragroup_edges(
...)
delete_all_intragroup_edges( (Graph)g, (vector1_Size)node_groups) -> None : core/graph/graph_util.hh:42
C++ signature :
void delete_all_intragroup_edges(core::graph::Graph {lvalue},utility::vector1
def find_connected_components(
...)
find_connected_components( (Graph)g) -> vector1_pair_Size_Size : returns a vector1 of connected component descriptions: each entry holds the connected-component size and a representative vertex from that connected component. O( V+E ).
C++ signature :
utility::vector1
Classes
class DS_Node
core/graph/DisjointSets.hh:30
Ancestors (in MRO)
- DS_Node
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
class DS_NodeAP
Ancestors (in MRO)
- DS_NodeAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (DS_NodeAP)arg1) -> DS_Node :
C++ signature :
boost::shared_ptr
class DS_NodeCAP
Ancestors (in MRO)
- DS_NodeCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (DS_NodeCAP)arg1) -> DS_Node :
C++ signature :
boost::shared_ptr
class DisjointSets
core/graph/DisjointSets.hh:37
Ancestors (in MRO)
- DisjointSets
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void __init__(_object*)
init( (object)arg1, (DisjointSets)) -> None : core/graph/DisjointSets.hh:37
C++ signature : void __init__(_object*,core::graph::DisjointSets)
init( (object)arg1, (int)n_nodes) -> None : ctor for class if the number of nodes is known upfront. Fastest.
C++ signature : void __init__(_object*,unsigned long)
def disjoint_set_sizes(
...)
disjoint_set_sizes( (DisjointSets)arg1) -> vector1_Size : count the size of each disjoint set. O(N)
C++ signature :
utility::vector1
def ds_find(
...)
ds_find( (DisjointSets)arg1, (int)node_id) -> int : return the representative for a node
C++ signature : unsigned long ds_find(core::graph::DisjointSets {lvalue},unsigned long)
def ds_make_set(
...)
ds_make_set( (DisjointSets)arg1) -> None : add a new node -- as implemented, O(N) operation use the DS(platform::Size) constructor for better speed.
C++ signature : void ds_make_set(core::graph::DisjointSets {lvalue})
def ds_union(
...)
ds_union( (DisjointSets)arg1, (int)node1, (int)node2) -> None : make it so that two nodes end up in the same set
C++ signature : void ds_union(core::graph::DisjointSets {lvalue},unsigned long,unsigned long)
def n_disjoint_sets(
...)
n_disjoint_sets( (DisjointSets)arg1) -> int : count the number of disjoint sets. O(N)
C++ signature : unsigned long n_disjoint_sets(core::graph::DisjointSets {lvalue})
def n_nodes(
...)
n_nodes( (DisjointSets)arg1) -> int : core/graph/DisjointSets.hh:46
C++ signature : unsigned long n_nodes(core::graph::DisjointSets {lvalue})
def node(
...)
node( (DisjointSets)arg1, (int)node_id) -> DS_Node : DS_Node read access
C++ signature : core::graph::DS_Node node(core::graph::DisjointSets {lvalue},unsigned long)
def nodes_in_set(
...)
nodes_in_set( (DisjointSets)arg1, (int)node_id) -> vector1_Size : return the nodes in the set containing the specified node.
C++ signature :
utility::vector1
def sets(
...)
sets( (DisjointSets)arg1) -> object : return a map from the representative node of each set to the list of nodes in their sets
C++ signature :
std::map
class DisjointSetsAP
Ancestors (in MRO)
- DisjointSetsAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (DisjointSetsAP)arg1) -> DisjointSets :
C++ signature :
boost::shared_ptr
class DisjointSetsCAP
Ancestors (in MRO)
- DisjointSetsCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (DisjointSetsCAP)arg1) -> DisjointSets :
C++ signature :
boost::shared_ptr
class Edge
core/graph/Graph.hh:552
Ancestors (in MRO)
- Edge
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1, (Graph)owner, (int)first_node_ind, (int)second_node_ind) -> None : 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.
C++ signature : void init(_object,core::graph::Graph,unsigned long,unsigned long)
def copy_from(
...)
copy_from( (Edge)arg1, (Edge)source) -> None : copy-from for use in Graph::operator= and copy ctors
C++ signature : void copy_from(core::graph::Edge {lvalue},core::graph::Edge const*)
copy_from( (Edge)arg1, (Edge)source) -> None :
C++ signature : void copy_from(Edge_exposer_callback {lvalue},core::graph::Edge const*)
def count_dynamic_memory(
...)
count_dynamic_memory( (Edge)arg1) -> int : how much memory is dynamically allocated by this edge -- must be recursively invoked by a derived class.
C++ signature : unsigned long count_dynamic_memory(core::graph::Edge {lvalue})
count_dynamic_memory( (Edge)arg1) -> int :
C++ signature : unsigned long count_dynamic_memory(Edge_exposer_callback {lvalue})
def count_static_memory(
...)
count_static_memory( (Edge)arg1) -> int : how much memory is statically allocated by this edge
C++ signature : unsigned long count_static_memory(core::graph::Edge {lvalue})
count_static_memory( (Edge)arg1) -> int :
C++ signature : unsigned long count_static_memory(Edge_exposer_callback {lvalue})
def get_first_node_ind(
...)
get_first_node_ind( (Edge)arg1) -> int : returns the index of the lower node
C++ signature : unsigned long get_first_node_ind(core::graph::Edge {lvalue})
def get_other_ind(
...)
get_other_ind( (Edge)arg1, (int)node_index) -> int : 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.
C++ signature : unsigned long get_other_ind(core::graph::Edge {lvalue},unsigned long)
def get_other_node(
...)
get_other_node( (Edge)arg1, (int)node_index) -> Node : 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.
C++ signature : core::graph::Node const* get_other_node(core::graph::Edge {lvalue},unsigned long)
get_other_node( (Edge)arg1, (int)node_index) -> Node : 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.
C++ signature : core::graph::Node* get_other_node(core::graph::Edge {lvalue},unsigned long)
def get_second_node_ind(
...)
get_second_node_ind( (Edge)arg1) -> int : returns the index of the upper node
C++ signature : unsigned long get_second_node_ind(core::graph::Edge {lvalue})
def is_loop(
...)
is_loop( (Edge)arg1) -> bool : Is this edge a loop? In Pseudographs, loop edges are incident twice on a single vertex.
C++ signature : bool is_loop(core::graph::Edge {lvalue})
def same_edge(
...)
same_edge( (Edge)arg1, (int)node1, (int)node2) -> bool : Is this the same edge as another edge (node1,node2)? Note: this graph does not work for multi-graphs. Edges must be unique.
C++ signature : bool same_edge(core::graph::Edge {lvalue},unsigned long,unsigned long)
def set_pos_in_owners_list(
...)
set_pos_in_owners_list( (Edge)arg1, (EdgeListIterator)edge_iterator) -> None : 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.
C++ signature : void set_pos_in_owners_list(core::graph::Edge {lvalue},core::graph::EdgeListIterator)
class EdgeAP
Ancestors (in MRO)
- EdgeAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeAP)arg1) -> Edge :
C++ signature :
boost::shared_ptr
class EdgeCAP
Ancestors (in MRO)
- EdgeCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeCAP)arg1) -> Edge :
C++ signature :
boost::shared_ptr
class EdgeList
Custom edge list class. Returns const-iterators which only return Edge const 's and non-const-iterators which can return either const or non-const Edge's. Manages its own memory using an unordered-object-pool for fast insertion and deletion of EdgeListElements. Implemented as a doubly linked list, though there's no practical way to start at the end of a list and work backward since decrementing the end iterator is not a valid operation.
Ancestors (in MRO)
- EdgeList
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1, (object)edge_list_element_pool) -> None : core/graph/Graph.hh:333
C++ signature :
void init(_object*,boost::unordered_object_pool
def begin(
...)
begin( (EdgeList)arg1) -> EdgeListIterator : returns a non-const iterator to the front of the list
C++ signature : core::graph::EdgeListIterator begin(core::graph::EdgeList {lvalue})
begin( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the front of the list
C++ signature : core::graph::EdgeListConstIterator begin(core::graph::EdgeList {lvalue})
def const_begin(
...)
const_begin( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the front of the list
C++ signature : core::graph::EdgeListConstIterator const_begin(core::graph::EdgeList {lvalue})
def const_end(
...)
const_end( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the end of the list
C++ signature : core::graph::EdgeListConstIterator const_end(core::graph::EdgeList {lvalue})
def const_last(
...)
const_last( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the last element in the list
C++ signature : core::graph::EdgeListConstIterator const_last(core::graph::EdgeList {lvalue})
def end(
...)
end( (EdgeList)arg1) -> EdgeListIterator : returns a non-const iterator to the end of the list
C++ signature : core::graph::EdgeListIterator end(core::graph::EdgeList {lvalue})
end( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the end of the list
C++ signature : core::graph::EdgeListConstIterator end(core::graph::EdgeList {lvalue})
def erase(
...)
erase( (EdgeList)arg1, (EdgeListIterator)to_erase) -> None : removes an element from the list pointed to by the input iterator
C++ signature : void erase(core::graph::EdgeList {lvalue},core::graph::EdgeListIterator)
def insert(
...)
insert( (EdgeList)arg1, (EdgeListIterator)element_to_insert_before, (Edge)edgeptr) -> EdgeListIterator : insert a new edge-list element in the list infront of the input iterator and return an iterator to the position of the new element
C++ signature : core::graph::EdgeListIterator insert(core::graph::EdgeList {lvalue},core::graph::EdgeListIterator,core::graph::Edge*)
def is_end_element(
...)
is_end_element( (EdgeList)arg1, (EdgeListElement)element) -> bool : method invoked by the EdgeListIterator class: is an iterator the special end iterator for a list?
C++ signature : bool is_end_element(core::graph::EdgeList {lvalue},core::graph::EdgeListElement const*)
def last(
...)
last( (EdgeList)arg1) -> EdgeListIterator : returns a non-const iterator to the last element in the list
C++ signature : core::graph::EdgeListIterator last(core::graph::EdgeList {lvalue})
last( (EdgeList)arg1) -> EdgeListConstIterator : returns a const iterator to the last element in the list
C++ signature : core::graph::EdgeListConstIterator last(core::graph::EdgeList {lvalue})
def push_back(
...)
push_back( (EdgeList)arg1, (Edge)edgeptr) -> None : create a new edge-list element and insert it at the front of the list
C++ signature : void push_back(core::graph::EdgeList {lvalue},core::graph::Edge*)
def push_front(
...)
push_front( (EdgeList)arg1, (Edge)edgeptr) -> None : create a new edge-list element and insert it at the end of the list
C++ signature : void push_front(core::graph::EdgeList {lvalue},core::graph::Edge*)
def size(
...)
size( (EdgeList)arg1) -> int : O(N)
C++ signature : unsigned long size(core::graph::EdgeList {lvalue})
class EdgeListAP
Ancestors (in MRO)
- EdgeListAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListAP)arg1) -> EdgeList :
C++ signature :
boost::shared_ptr
class EdgeListCAP
Ancestors (in MRO)
- EdgeListCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListCAP)arg1) -> EdgeList :
C++ signature :
boost::shared_ptr
class EdgeListConstIterator
Custom Edge list const iterator class, which returns only const Edge pointers. This iterator cannot be used to change the structure of its list without access to that list directly. Customized since STL's const-iterator cannot be prevented from giving non-const access to its data. The former workaround to this problem was to define two sets of edge lists on each vertex: a list< Edge * > and a list< Edge const * >.
Ancestors (in MRO)
- EdgeListConstIterator
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void __init__(_object*)
init( (object)arg1, (EdgeList)owner) -> None : owner constructor
C++ signature : void __init__(_object*,core::graph::EdgeList const*)
init( (object)arg1, (EdgeList)owner, (EdgeListElement)element) -> None : owner and element constructor: points at a position in a list
C++ signature : void __init__(_object*,core::graph::EdgeList const*,core::graph::EdgeListElement const*)
init( (object)arg1, (EdgeListConstIterator)src) -> None : copy constructor
C++ signature : void __init__(_object*,core::graph::EdgeListConstIterator)
init( (object)arg1, (EdgeListIterator)src) -> None : const-cast constructor
C++ signature : void __init__(_object*,core::graph::EdgeListIterator)
def assign(
...)
assign( (EdgeListConstIterator)arg1, (EdgeListConstIterator)rhs) -> EdgeListConstIterator : assignmnet operator
C++ signature : core::graph::EdgeListConstIterator assign(core::graph::EdgeListConstIterator {lvalue},core::graph::EdgeListConstIterator)
def valid(
...)
valid( (EdgeListConstIterator)arg1) -> bool : core/graph/Graph.hh:881
C++ signature : bool valid(core::graph::EdgeListConstIterator {lvalue})
class EdgeListConstIteratorAP
Ancestors (in MRO)
- EdgeListConstIteratorAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListConstIteratorAP)arg1) -> EdgeListConstIterator :
C++ signature :
boost::shared_ptr
class EdgeListConstIteratorCAP
Ancestors (in MRO)
- EdgeListConstIteratorCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListConstIteratorCAP)arg1) -> EdgeListConstIterator :
C++ signature :
boost::shared_ptr
class EdgeListElement
An extensible graph class Nodes are identified by positive integers -- each node is assigned a unique integer starting at 1. Nodes know about both their upper and their lower edges. Iterators can range over all edges, just the upper edges or just the lower edges. Nodes store their incident edge information in edge lists; they provide const and non-const iterators which return const and non-const pointers to Edge objects. The Graph object provides iterators for all of the edges in the graph; this list is unordered. This graph is instantiatable (ie not a pure virtual class). It was also built with extension in mind. See core/scoring/EnergyGraph for an example on how to create an extension of the Node, Edge and Graph classes Derived graph classes must define two factory methods: create_node and create_edge which are called by the base class when adding graph elements. Edges offer constant-time deletion -- edges remove themselves from the edge-lists that their nodes maintain, and from the edge-list that the Graph maintains without having to iterate over those lists. Memory is carefully managed to make edge addition and deletion exceedingly fast. The management is through a class "unodered_object_pool" which is very much like boost::object_pool. The base class ueses these unordered object pools for base class edges (when used) and for the edge lists elements. Derived classes may take advantage of this by defining their own unordered_object_pool objects. Graphs own the vertices and edges they create. Graphs cannot share or give away edges. To delete an edge pointed to by Edge* e in a graph g, call the virtual function "g->delete_edge( &e );" Derived classes must invoke the "destroy_everything" method in their virtual destructors so that they are empty by the time the base class destructor is called. The destroy_everything method invokes the virtual delete_edge() method -- remember, virtual methods do not work in base class constructors or destructors. If a derived class does not call destroy_everything in its destructor, ~Graph() will call Graph::destroy_everything which will call (surprisingly) Graph::delete_edge and not Derived::delete_edge. Derived classes should not invoke the base class copy constructors for the same reason. The base class copy constructor will call the base class create_node and create_edge methods and not the desired derived class versions. The virtual functions Derived graph classes must override: Node: copy_from, print, count_static_memory, count_dynamic_memory Edge: copy_from, count_static_mmory, count_dynamic_memory Graph: create_node, create_edge, delete_edge, count_static_memory, count_dynamic_memory Custom written edge list element class. Little more than a struct. Defined so that edge list memory management could rely on boost::pool like object
Ancestors (in MRO)
- EdgeListElement
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void __init__(_object*)
init( (object)arg1, (EdgeListElement)) -> None : An extensible graph class Nodes are identified by positive integers -- each node is assigned a unique integer starting at 1. Nodes know about both their upper and their lower edges. Iterators can range over all edges, just the upper edges or just the lower edges. Nodes store their incident edge information in edge lists; they provide const and non-const iterators which return const and non-const pointers to Edge objects. The Graph object provides iterators for all of the edges in the graph; this list is unordered. This graph is instantiatable (ie not a pure virtual class). It was also built with extension in mind. See core/scoring/EnergyGraph for an example on how to create an extension of the Node, Edge and Graph classes Derived graph classes must define two factory methods: create_node and create_edge which are called by the base class when adding graph elements. Edges offer constant-time deletion -- edges remove themselves from the edge-lists that their nodes maintain, and from the edge-list that the Graph maintains without having to iterate over those lists. Memory is carefully managed to make edge addition and deletion exceedingly fast. The management is through a class "unodered_object_pool" which is very much like boost::object_pool. The base class ueses these unordered object pools for base class edges (when used) and for the edge lists elements. Derived classes may take advantage of this by defining their own unordered_object_pool objects. Graphs own the vertices and edges they create. Graphs cannot share or give away edges. To delete an edge pointed to by Edge* e in a graph g, call the virtual function "g->delete_edge( &e );" Derived classes must invoke the "destroy_everything" method in their virtual destructors so that they are empty by the time the base class destructor is called. The destroy_everything method invokes the virtual delete_edge() method -- remember, virtual methods do not work in base class constructors or destructors. If a derived class does not call destroy_everything in its destructor, ~Graph() will call Graph::destroy_everything which will call (surprisingly) Graph::delete_edge and not Derived::delete_edge. Derived classes should not invoke the base class copy constructors for the same reason. The base class copy constructor will call the base class create_node and create_edge methods and not the desired derived class versions. The virtual functions Derived graph classes must override: Node: copy_from, print, count_static_memory, count_dynamic_memory Edge: copy_from, count_static_mmory, count_dynamic_memory Graph: create_node, create_edge, delete_edge, count_static_memory, count_dynamic_memory Custom written edge list element class. Little more than a struct. Defined so that edge list memory management could rely on boost::pool like object
C++ signature : void __init__(_object*,core::graph::EdgeListElement)
init( (object)arg1, (Edge)edge, (EdgeListElement)previous, (EdgeListElement)next) -> None : core/graph/Graph.hh:105
C++ signature : void __init__(_object*,core::graph::Edge*,core::graph::EdgeListElement*,core::graph::EdgeListElement*)
def const_edge(
...)
const_edge( (EdgeListElement)arg1) -> Edge : core/graph/Graph.hh:113
C++ signature : core::graph::Edge const* const_edge(core::graph::EdgeListElement {lvalue})
def const_next(
...)
const_next( (EdgeListElement)arg1) -> EdgeListElement : core/graph/Graph.hh:117
C++ signature : core::graph::EdgeListElement const* const_next(core::graph::EdgeListElement {lvalue})
def const_previous(
...)
const_previous( (EdgeListElement)arg1) -> EdgeListElement : core/graph/Graph.hh:121
C++ signature : core::graph::EdgeListElement const* const_previous(core::graph::EdgeListElement {lvalue})
def edge(
...)
edge( (EdgeListElement)arg1) -> Edge : core/graph/Graph.hh:111
C++ signature : core::graph::Edge* edge(core::graph::EdgeListElement {lvalue})
edge( (EdgeListElement)arg1, (Edge)setting) -> None : core/graph/Graph.hh:112
C++ signature : void edge(core::graph::EdgeListElement {lvalue},core::graph::Edge*)
def next(
...)
next( (EdgeListElement)arg1) -> EdgeListElement : core/graph/Graph.hh:115
C++ signature : core::graph::EdgeListElement* next(core::graph::EdgeListElement {lvalue})
next( (EdgeListElement)arg1, (EdgeListElement)setting) -> None : core/graph/Graph.hh:116
C++ signature : void next(core::graph::EdgeListElement {lvalue},core::graph::EdgeListElement*)
def previous(
...)
previous( (EdgeListElement)arg1) -> EdgeListElement : core/graph/Graph.hh:119
C++ signature : core::graph::EdgeListElement* previous(core::graph::EdgeListElement {lvalue})
previous( (EdgeListElement)arg1, (EdgeListElement)setting) -> None : core/graph/Graph.hh:120
C++ signature : void previous(core::graph::EdgeListElement {lvalue},core::graph::EdgeListElement*)
class EdgeListElementAP
Ancestors (in MRO)
- EdgeListElementAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListElementAP)arg1) -> EdgeListElement :
C++ signature :
boost::shared_ptr
class EdgeListElementCAP
Ancestors (in MRO)
- EdgeListElementCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListElementCAP)arg1) -> EdgeListElement :
C++ signature :
boost::shared_ptr
class EdgeListIterator
Custom Edge list (non-const) iterator class, which can return non-const Edge pointers. This iterator cannot be used to change the structure of its list without access to that list directly. Customized since STL's const-iterator cannot be prevented from giving non-const access to its data. The former workaround to this problem was to define two sets of edge lists on each vertex: a list< Edge * > and a list< Edge const * >.
Ancestors (in MRO)
- EdgeListIterator
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void __init__(_object*)
init( (object)arg1, (EdgeList)owner) -> None : owner constructor
C++ signature : void __init__(_object*,core::graph::EdgeList const*)
init( (object)arg1, (EdgeList)owner, (EdgeListElement)element) -> None : owner and element constructor: points at a position in a list
C++ signature : void __init__(_object*,core::graph::EdgeList const*,core::graph::EdgeListElement*)
init( (object)arg1, (EdgeListIterator)src) -> None : copy constructor
C++ signature : void __init__(_object*,core::graph::EdgeListIterator)
def assign(
...)
assign( (EdgeListIterator)arg1, (EdgeListIterator)rhs) -> EdgeListIterator : assignmnet operator
C++ signature : core::graph::EdgeListIterator assign(core::graph::EdgeListIterator {lvalue},core::graph::EdgeListIterator)
def valid(
...)
valid( (EdgeListIterator)arg1) -> bool : core/graph/Graph.hh:877
C++ signature : bool valid(core::graph::EdgeListIterator {lvalue})
class EdgeListIteratorAP
Ancestors (in MRO)
- EdgeListIteratorAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListIteratorAP)arg1) -> EdgeListIterator :
C++ signature :
boost::shared_ptr
class EdgeListIteratorCAP
Ancestors (in MRO)
- EdgeListIteratorCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (EdgeListIteratorCAP)arg1) -> EdgeListIterator :
C++ signature :
boost::shared_ptr
class Graph
A Graph with constant time edge insertion and deletion. Extensible.
Ancestors (in MRO)
- Graph
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void __init__(_object*)
init( (object)arg1, (int)num_nodes) -> None : num nodes ctor
C++ signature : void __init__(_object*,unsigned long)
init( (object)arg1, (Graph)source) -> None : copy ctor. Must not be called by derived class copy ctors.
C++ signature : void __init__(_object*,core::graph::Graph)
def add_edge(
...)
add_edge( (Graph)arg1, (int)node1, (int)node2) -> Edge : add an edge between two vertices. Invokes "create_edge" from the derived class. Returns a pointer to the edge after its been added, allowing the calling function to immediately set data for this edge.
C++ signature : core::graph::Edge* add_edge(core::graph::Graph {lvalue},unsigned long,unsigned long)
add_edge( (Graph)arg1, (Edge)example_edge) -> Edge : add an edge to this graph copying the data from an edge in another graph. Returns a pointer to the edge after its been added, allowing the calling function to immediately set data for this edge.
C++ signature : core::graph::Edge* add_edge(core::graph::Graph {lvalue},core::graph::Edge const*)
def all_pairs_shortest_paths(
...)
all_pairs_shortest_paths( (Graph)arg1) -> object : O(V^3). Computes all pairs shortest paths using Warshall's algorithm and writes all the path distances to the two-dimensional table.
C++ signature :
ObjexxFCL::FArray2D
def assign(
...)
assign( (Graph)arg1, (Graph)source) -> Graph : assignment operator. source and this must have the same type.
C++ signature : core::graph::Graph {lvalue} assign(core::graph::Graph {lvalue},core::graph::Graph)
def const_edge_list_begin(
...)
const_edge_list_begin( (Graph)arg1) -> EdgeListConstIterator : returns a const iterator to the beginning of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex
C++ signature : core::graph::EdgeListConstIterator const_edge_list_begin(core::graph::Graph {lvalue})
def const_edge_list_end(
...)
const_edge_list_end( (Graph)arg1) -> EdgeListConstIterator : returns a const iterator to the end of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex
C++ signature : core::graph::EdgeListConstIterator const_edge_list_end(core::graph::Graph {lvalue})
def copy_connectivity(
...)
copy_connectivity( (Graph)arg1, (Graph)source) -> None : copy the edge connectivity from a source graph with a potentially unknown type.
C++ signature : void copy_connectivity(core::graph::Graph {lvalue},core::graph::Graph)
def delete_edge(
...)
delete_edge( (Graph)arg1, (Edge)edge) -> None : remove an edge from the graph. (NEW AS OF 12/9/07) Never call C++'s "delete" function on an edge pointer directly. Derived classes must implement this function. If they wish to use unordered_object_pools to manage their memory
C++ signature : void delete_edge(core::graph::Graph {lvalue},core::graph::Edge*)
delete_edge( (Graph)arg1, (Edge)edge) -> None :
C++ signature : void delete_edge(Graph_exposer_callback {lvalue},core::graph::Edge*)
def drop_all_edges(
...)
drop_all_edges( (Graph)arg1) -> None : delete all the edges present in the graph
C++ signature : void drop_all_edges(core::graph::Graph {lvalue})
def drop_all_edges_for_node(
...)
drop_all_edges_for_node( (Graph)arg1, (int)node) -> None : delete all the edges for a single vertex in the graph
C++ signature : void drop_all_edges_for_node(core::graph::Graph {lvalue},unsigned long)
def edge_list_begin(
...)
edge_list_begin( (Graph)arg1) -> EdgeListIterator : returns a non-const iterator to the beginning of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex
C++ signature : core::graph::EdgeListIterator edge_list_begin(core::graph::Graph {lvalue})
def edge_list_end(
...)
edge_list_end( (Graph)arg1) -> EdgeListIterator : returns a non-const iterator to the end of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex
C++ signature : core::graph::EdgeListIterator edge_list_end(core::graph::Graph {lvalue})
def find_edge(
...)
find_edge( (Graph)arg1, (int)node1, (int)node2) -> Edge : returns a pointer to the edge connecting nodes node1 and node2, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval.
C++ signature : core::graph::Edge* find_edge(core::graph::Graph {lvalue},unsigned long,unsigned long)
find_edge( (Graph)arg1, (int)node1, (int)node2) -> Edge : returns a const pointer to the edge connecting nodes node1 and node2, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval.
C++ signature : core::graph::Edge const* find_edge(core::graph::Graph {lvalue},unsigned long,unsigned long)
def focused_edge(
...)
focused_edge( (Graph)arg1) -> Edge : returns a pointer to the focused edge
C++ signature : core::graph::Edge* focused_edge(core::graph::Graph {lvalue})
focused_edge( (Graph)arg1) -> Edge : returns a const-pointer to the focused edge
C++ signature : core::graph::Edge const* focused_edge(core::graph::Graph {lvalue})
def getTotalMemoryUsage(
...)
getTotalMemoryUsage( (Graph)arg1) -> int : returns a count of all the memory used by every vertex and edge in a graph by invoking the polymorphic count_static_memory and count_dynamic_memory of each (possibly derived) node and edge object as well as for the (possibly derived) graph class.
C++ signature : unsigned long getTotalMemoryUsage(core::graph::Graph {lvalue})
def get_edge_exists(
...)
get_edge_exists( (Graph)arg1, (int)node1, (int)node2) -> bool : is an edge already present in the graph? O(V) worst case. O(1) iff all vertices have O(1) edges
C++ signature : bool get_edge_exists(core::graph::Graph {lvalue},unsigned long,unsigned long)
def get_node(
...)
get_node( (Graph)arg1, (int)index) -> Node : core/graph/Graph.hh:748
C++ signature : core::graph::Node const* get_node(core::graph::Graph {lvalue},unsigned long)
get_node( (Graph)arg1, (int)index) -> Node : core/graph/Graph.hh:755
C++ signature : core::graph::Node* get_node(core::graph::Graph {lvalue},unsigned long)
def get_self_ptr(
...)
get_self_ptr( (Graph)arg1) -> Graph : self pointers
C++ signature : boost::shared_ptr<core::graph::Graph const> get_self_ptr(core::graph::Graph {lvalue})
get_self_ptr( (Graph)arg1) -> Graph : core/graph/Graph.hh:676
C++ signature : boost::shared_ptr<core::graph::Graph> get_self_ptr(core::graph::Graph {lvalue})
def num_edges(
...)
num_edges( (Graph)arg1) -> int : core/graph/Graph.hh:763
C++ signature : unsigned long num_edges(core::graph::Graph {lvalue})
def num_nodes(
...)
num_nodes( (Graph)arg1) -> int : the number of nodes in the graph
C++ signature : unsigned long num_nodes(core::graph::Graph {lvalue})
def output_connectivity(
...)
output_connectivity( (Graph)arg1, (OStream)os) -> None : send an edge list to the stream os.
C++ signature : void output_connectivity(core::graph::Graph {lvalue},std::ostream {lvalue})
def output_dimacs(
...)
output_dimacs( (Graph)arg1, (OStream)os) -> None : describe this graph in dimacs form to the stream os.
C++ signature : void output_dimacs(core::graph::Graph {lvalue},std::ostream {lvalue})
def print_vertices(
...)
print_vertices( (Graph)arg1) -> None : send summary information to the screen for all vertices in the graph
C++ signature : void print_vertices(core::graph::Graph {lvalue})
def set_num_nodes(
...)
set_num_nodes( (Graph)arg1, (int)num_nodes) -> None : set the number of nodes in the graph -- deletes any existing edges in the graph
C++ signature : void set_num_nodes(core::graph::Graph {lvalue},unsigned long)
class GraphAP
Ancestors (in MRO)
- GraphAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (GraphAP)arg1) -> Graph :
C++ signature :
boost::shared_ptr
class GraphCAP
Ancestors (in MRO)
- GraphCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (GraphCAP)arg1) -> Graph :
C++ signature :
boost::shared_ptr
class Node
core/graph/Graph.hh:402
Ancestors (in MRO)
- Node
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1, (Graph), (int)node_id) -> None : core/graph/Graph.hh:410
C++ signature : void init(_object,core::graph::Graph,unsigned long)
def add_edge(
...)
add_edge( (Node)arg1, (Edge)edge_ptr, (EdgeListIterator)) -> None : adds edge pointer to edge list; returns an iterator to the new list element
C++ signature : void add_edge(core::graph::Node {lvalue},core::graph::Edge*,core::graph::EdgeListIterator {lvalue})
def const_edge_list_begin(
...)
const_edge_list_begin( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the beginning of its edge list
C++ signature : core::graph::EdgeListConstIterator const_edge_list_begin(core::graph::Node {lvalue})
def const_edge_list_end(
...)
const_edge_list_end( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the end of its edge list
C++ signature : core::graph::EdgeListConstIterator const_edge_list_end(core::graph::Node {lvalue})
def const_lower_edge_list_begin(
...)
const_lower_edge_list_begin( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the beginning of its lower-edge list
C++ signature : core::graph::EdgeListConstIterator const_lower_edge_list_begin(core::graph::Node {lvalue})
def const_lower_edge_list_end(
...)
const_lower_edge_list_end( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the end of its lower-edge list
C++ signature : core::graph::EdgeListConstIterator const_lower_edge_list_end(core::graph::Node {lvalue})
def const_upper_edge_list_begin(
...)
const_upper_edge_list_begin( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the beginning of its upper-edge list
C++ signature : core::graph::EdgeListConstIterator const_upper_edge_list_begin(core::graph::Node {lvalue})
def const_upper_edge_list_end(
...)
const_upper_edge_list_end( (Node)arg1) -> EdgeListConstIterator : returns a const iterator to the end of its upper-edge list
C++ signature : core::graph::EdgeListConstIterator const_upper_edge_list_end(core::graph::Node {lvalue})
def copy_from(
...)
copy_from( (Node)arg1, (Node)source) -> None : 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.
C++ signature : void copy_from(core::graph::Node {lvalue},core::graph::Node const*)
copy_from( (Node)arg1, (Node)source) -> None :
C++ signature : void copy_from(Node_exposer_callback {lvalue},core::graph::Node const*)
def count_dynamic_memory(
...)
count_dynamic_memory( (Node)arg1) -> int : memory accounting scheme
C++ signature : unsigned long count_dynamic_memory(core::graph::Node {lvalue})
count_dynamic_memory( (Node)arg1) -> int :
C++ signature : unsigned long count_dynamic_memory(Node_exposer_callback {lvalue})
def count_static_memory(
...)
count_static_memory( (Node)arg1) -> int : memory accounting scheme
C++ signature : unsigned long count_static_memory(core::graph::Node {lvalue})
count_static_memory( (Node)arg1) -> int :
C++ signature : unsigned long count_static_memory(Node_exposer_callback {lvalue})
def drop_all_edges(
...)
drop_all_edges( (Node)arg1) -> None : deletes all edges incident upon this node
C++ signature : void drop_all_edges(core::graph::Node {lvalue})
def drop_edge(
...)
drop_edge( (Node)arg1, (EdgeListIterator)edge_iterator) -> None : removes an edge iterator from the node's edge list. Only called by Edge class.
C++ signature : void drop_edge(core::graph::Node {lvalue},core::graph::EdgeListIterator)
def edge_list_begin(
...)
edge_list_begin( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the beginning of its edge list
C++ signature : core::graph::EdgeListIterator edge_list_begin(core::graph::Node {lvalue})
def edge_list_end(
...)
edge_list_end( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the end of its edge list
C++ signature : core::graph::EdgeListIterator edge_list_end(core::graph::Node {lvalue})
def find_edge(
...)
find_edge( (Node)arg1, (int)other_node_index) -> Edge : a "slow" (linear) search for an edge.
C++ signature : core::graph::Edge const* find_edge(core::graph::Node {lvalue},unsigned long)
find_edge( (Node)arg1, (int)other_node_index) -> Edge : core/graph/Graph.hh:433
C++ signature : core::graph::Edge* find_edge(core::graph::Node {lvalue},unsigned long)
def get_node_index(
...)
get_node_index( (Node)arg1) -> int : the index for this node
C++ signature : unsigned long get_node_index(core::graph::Node {lvalue})
def get_num_edges_to_larger_indexed_nodes(
...)
get_num_edges_to_larger_indexed_nodes( (Node)arg1) -> int : the number of upper neighbors -- which "self" neighborness is counted if a loop edge is present
C++ signature : unsigned long get_num_edges_to_larger_indexed_nodes(core::graph::Node {lvalue})
def get_num_edges_to_smaller_indexed_nodes(
...)
get_num_edges_to_smaller_indexed_nodes( (Node)arg1) -> int : the number of lower neighbors
C++ signature : unsigned long get_num_edges_to_smaller_indexed_nodes(core::graph::Node {lvalue})
def loop_incident(
...)
loop_incident( (Node)arg1) -> bool : NOTE TO SELF: remove loop support
C++ signature : bool loop_incident(core::graph::Node {lvalue})
def lower_edge_list_begin(
...)
lower_edge_list_begin( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the beginning of its lower-edge list
C++ signature : core::graph::EdgeListIterator lower_edge_list_begin(core::graph::Node {lvalue})
def lower_edge_list_end(
...)
lower_edge_list_end( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the end of its lower-edge list
C++ signature : core::graph::EdgeListIterator lower_edge_list_end(core::graph::Node {lvalue})
def num_edges(
...)
num_edges( (Node)arg1) -> int : the number of edges incident on this node, which may include a loop edge
C++ signature : unsigned long num_edges(core::graph::Node {lvalue})
def num_neighbors_counting_self(
...)
num_neighbors_counting_self( (Node)arg1) -> int : the number of neighbors counting "self" as a neighbor.
C++ signature : unsigned long num_neighbors_counting_self(core::graph::Node {lvalue})
def num_neighbors_counting_self_static(
...)
num_neighbors_counting_self_static( (Node)arg1) -> int : 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.
C++ signature : unsigned long num_neighbors_counting_self_static(core::graph::Node {lvalue})
def print(
...)
print( (Node)arg1) -> None : send summaray data about this node to the screen
C++ signature : void print(core::graph::Node {lvalue})
print( (Node)arg1) -> None :
C++ signature : void print(Node_exposer_callback {lvalue})
def set_num_neighbors_counting_self_static(
...)
set_num_neighbors_counting_self_static( (Node)arg1, (int)neighbor) -> None : manually change the number of neighbors for a Node. Used for symmetry scoring
C++ signature : void set_num_neighbors_counting_self_static(core::graph::Node {lvalue},unsigned long)
def upper_edge_list_begin(
...)
upper_edge_list_begin( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the beginning of its upper-edge list
C++ signature : core::graph::EdgeListIterator upper_edge_list_begin(core::graph::Node {lvalue})
def upper_edge_list_end(
...)
upper_edge_list_end( (Node)arg1) -> EdgeListIterator : returns a non-const iterator to the end of its upper-edge list
C++ signature : core::graph::EdgeListIterator upper_edge_list_end(core::graph::Node {lvalue})
class NodeAP
Ancestors (in MRO)
- NodeAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (NodeAP)arg1) -> Node :
C++ signature :
boost::shared_ptr
class NodeCAP
Ancestors (in MRO)
- NodeCAP
- Boost.Python.instance
- __builtin__.object
Methods
def __init__(
...)
init( (object)arg1) -> None :
C++ signature : void init(_object*)
def get(
...)
get( (NodeCAP)arg1) -> Node :
C++ signature :
boost::shared_ptr