graph

Bindings for utility::graph namespace

class pyrosetta.rosetta.utility.graph.Digraph

Bases: pybind11_builtins.pybind11_object

A Digraph with constant time edge insertion and deletion. Extensible.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.Digraph) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.Digraph, num_nodes: int) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.Digraph, arg0: pyrosetta.rosetta.utility.graph.Digraph) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

add_edge(*args, **kwargs)

Overloaded function.

  1. add_edge(self: pyrosetta.rosetta.utility.graph.Digraph, tail_node: int, head_node: int) -> pyrosetta.rosetta.utility.graph.DirectedEdge
add a directed 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++: utility::graph::Digraph::add_edge(unsigned long, unsigned long) –> class utility::graph::DirectedEdge *

  1. add_edge(self: pyrosetta.rosetta.utility.graph.Digraph, example_edge: pyrosetta.rosetta.utility.graph.DirectedEdge) -> pyrosetta.rosetta.utility.graph.DirectedEdge
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++: utility::graph::Digraph::add_edge(const class utility::graph::DirectedEdge *) –> class utility::graph::DirectedEdge *

add_node(self: pyrosetta.rosetta.utility.graph.Digraph) → None

Add a new node to the graph; preserve all of the existing edges in the graph

C++: utility::graph::Digraph::add_node() –> void

assign(self: pyrosetta.rosetta.utility.graph.Digraph, source: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.Digraph

assignment operator. source and this must have the same type.

C++: utility::graph::Digraph::operator=(const class utility::graph::Digraph &) –> class utility::graph::Digraph &

const_edge_list_begin(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator
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++: utility::graph::Digraph::const_edge_list_begin() const –> class utility::graph::DirectedEdgeListConstIterator

const_edge_list_end(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator
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++: utility::graph::Digraph::const_edge_list_end() const –> class utility::graph::DirectedEdgeListConstIterator

copy_connectivity(self: pyrosetta.rosetta.utility.graph.Digraph, source: pyrosetta.rosetta.utility.graph.Digraph) → None
copy the edge connectivity from a source graph with a potentially
unknown type.

C++: utility::graph::Digraph::copy_connectivity(const class utility::graph::Digraph &) –> void

delete_edge(self: pyrosetta.rosetta.utility.graph.Digraph, edge: pyrosetta.rosetta.utility.graph.DirectedEdge) → 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++: utility::graph::Digraph::delete_edge(class utility::graph::DirectedEdge *) –> void

drop_all_edges(self: pyrosetta.rosetta.utility.graph.Digraph) → None

delete all the edges present in the graph

C++: utility::graph::Digraph::drop_all_edges() –> void

drop_all_edges_for_node(self: pyrosetta.rosetta.utility.graph.Digraph, node: int) → None

delete all the edges for a single vertex in the graph

C++: utility::graph::Digraph::drop_all_edges_for_node(unsigned long) –> void

edge_list_begin(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator
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++: utility::graph::Digraph::edge_list_begin() –> class utility::graph::DirectedEdgeListIterator

edge_list_end(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator
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++: utility::graph::Digraph::edge_list_end() –> class utility::graph::DirectedEdgeListIterator

find_edge(self: pyrosetta.rosetta.utility.graph.Digraph, tail_node: int, head_node: int) → pyrosetta.rosetta.utility.graph.DirectedEdge
returns a pointer to the directed edge connecting nodes tail_node and head_node, if that edge exists
in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval.

C++: utility::graph::Digraph::find_edge(unsigned long, unsigned long) –> class utility::graph::DirectedEdge *

focused_edge(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.DirectedEdge

returns a pointer to the focused edge

C++: utility::graph::Digraph::focused_edge() –> class utility::graph::DirectedEdge *

getTotalMemoryUsage(self: pyrosetta.rosetta.utility.graph.Digraph) → 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++: utility::graph::Digraph::getTotalMemoryUsage() const –> unsigned long

get_edge_exists(self: pyrosetta.rosetta.utility.graph.Digraph, tail_node: int, head_node: int) → bool

is an edge already present in the graph? O(V) worst case. O(1) iff all vertices have O(1) edges

C++: utility::graph::Digraph::get_edge_exists(unsigned long, unsigned long) const –> bool

get_node(self: pyrosetta.rosetta.utility.graph.Digraph, index: int) → pyrosetta.rosetta.utility.graph.DirectedNode

C++: utility::graph::Digraph::get_node(unsigned long) –> class utility::graph::DirectedNode *

get_self_ptr(self: pyrosetta.rosetta.utility.graph.Digraph) → pyrosetta.rosetta.utility.graph.Digraph

C++: utility::graph::Digraph::get_self_ptr() –> class std::shared_ptr<class utility::graph::Digraph>

num_edges(self: pyrosetta.rosetta.utility.graph.Digraph) → int

C++: utility::graph::Digraph::num_edges() const –> unsigned long

num_nodes(self: pyrosetta.rosetta.utility.graph.Digraph) → int

the number of nodes in the graph

C++: utility::graph::Digraph::num_nodes() const –> unsigned long

output_connectivity(self: pyrosetta.rosetta.utility.graph.Digraph, os: pyrosetta.rosetta.std.ostream) → None

send an edge list to the stream os.

C++: utility::graph::Digraph::output_connectivity(class std::basic_ostream<char> &) const –> void

output_dimacs(self: pyrosetta.rosetta.utility.graph.Digraph, os: pyrosetta.rosetta.std.ostream) → None

describe this graph in dimacs form to the stream os.

C++: utility::graph::Digraph::output_dimacs(class std::basic_ostream<char> &) const –> void

print_vertices(self: pyrosetta.rosetta.utility.graph.Digraph) → None

send summary information to the screen for all vertices in the graph

C++: utility::graph::Digraph::print_vertices() const –> void

set_num_nodes(self: pyrosetta.rosetta.utility.graph.Digraph, num_nodes: int) → None

set the number of nodes in the graph – deletes any existing edges in the graph

C++: utility::graph::Digraph::set_num_nodes(unsigned long) –> void

class pyrosetta.rosetta.utility.graph.DirectedEdgeList

Bases: pybind11_builtins.pybind11_object

Custom edge list class. Returns const-iterators which only return DirectedEdge const ‘s and non-const-iterators which can return either const or non-const DirectedEdge’s. Manages its own memory using an unordered-object-pool for fast insertion and deletion of DirectedEdgeListElements. 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.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

begin(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

returns a non-const iterator to the front of the list

C++: utility::graph::DirectedEdgeList::begin() –> class utility::graph::DirectedEdgeListIterator

const_begin(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

returns a const iterator to the front of the list

C++: utility::graph::DirectedEdgeList::const_begin() const –> class utility::graph::DirectedEdgeListConstIterator

const_end(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

returns a const iterator to the end of the list

C++: utility::graph::DirectedEdgeList::const_end() const –> class utility::graph::DirectedEdgeListConstIterator

const_last(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

returns a const iterator to the last element in the list

C++: utility::graph::DirectedEdgeList::const_last() const –> class utility::graph::DirectedEdgeListConstIterator

end(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

returns a non-const iterator to the end of the list

C++: utility::graph::DirectedEdgeList::end() –> class utility::graph::DirectedEdgeListIterator

erase(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList, to_erase: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → None

removes an element from the list pointed to by the input iterator

C++: utility::graph::DirectedEdgeList::erase(class utility::graph::DirectedEdgeListIterator) –> void

insert(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList, element_to_insert_before: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, edgeptr: utility::graph::DirectedEdge) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator
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++: utility::graph::DirectedEdgeList::insert(const class utility::graph::DirectedEdgeListIterator &, class utility::graph::DirectedEdge *) –> class utility::graph::DirectedEdgeListIterator

is_end_element(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList, element: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) → bool
method invoked by the DirectedEdgeListIterator class: is an iterator the special
end iterator for a list?

C++: utility::graph::DirectedEdgeList::is_end_element(const class utility::graph::DirectedEdgeListElement *) const –> bool

last(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

returns a non-const iterator to the last element in the list

C++: utility::graph::DirectedEdgeList::last() –> class utility::graph::DirectedEdgeListIterator

push_back(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList, edgeptr: utility::graph::DirectedEdge) → None

create a new edge-list element and insert it at the front of the list

C++: utility::graph::DirectedEdgeList::push_back(class utility::graph::DirectedEdge *) –> void

push_front(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList, edgeptr: utility::graph::DirectedEdge) → None

create a new edge-list element and insert it at the end of the list

C++: utility::graph::DirectedEdgeList::push_front(class utility::graph::DirectedEdge *) –> void

size(self: pyrosetta.rosetta.utility.graph.DirectedEdgeList) → int

O(N)

C++: utility::graph::DirectedEdgeList::size() const –> unsigned long

class pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

Bases: pybind11_builtins.pybind11_object

Custom DirectedEdge list const iterator class, which returns only const DirectedEdge 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.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(*args, **kwargs)

Overloaded function.

  1. __eq__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) -> bool
equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::DirectedEdgeListConstIterator::operator==(const class utility::graph::DirectedEdgeListConstIterator &) const –> bool

  1. __eq__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) -> bool
const-cast equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::DirectedEdgeListConstIterator::operator==(const class utility::graph::DirectedEdgeListIterator &) const –> bool

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, owner: utility::graph::DirectedEdgeList) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, owner: utility::graph::DirectedEdgeList, element: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None
  4. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, arg0: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) -> None
  5. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, src: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__mul__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) → utility::graph::DirectedEdge
dereference operator: return the edge pointer pointed to by the list element this iterator
is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself.

C++: utility::graph::DirectedEdgeListConstIterator::operator*() const –> const class utility::graph::DirectedEdge *

__ne__(*args, **kwargs)

Overloaded function.

  1. __ne__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) -> bool
inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.

C++: utility::graph::DirectedEdgeListConstIterator::operator!=(const class utility::graph::DirectedEdgeListConstIterator &) const –> bool

  1. __ne__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) -> bool
const-cast inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.

C++: utility::graph::DirectedEdgeListConstIterator::operator!=(const class utility::graph::DirectedEdgeListIterator &) const –> bool

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

assignmnet operator

C++: utility::graph::DirectedEdgeListConstIterator::operator=(const class utility::graph::DirectedEdgeListConstIterator &) –> class utility::graph::DirectedEdgeListConstIterator &

minus_minus(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

decrement operator. Point this iterator at the previous element in the list.

C++: utility::graph::DirectedEdgeListConstIterator::operator–() –> const class utility::graph::DirectedEdgeListConstIterator &

plus_plus(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator

increment operator. Point this iterator at the next element in the list.

C++: utility::graph::DirectedEdgeListConstIterator::operator++() –> const class utility::graph::DirectedEdgeListConstIterator &

valid(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListConstIterator) → bool

Is this a valid iterator?

C++: utility::graph::DirectedEdgeListConstIterator::valid() const –> bool

class pyrosetta.rosetta.utility.graph.DirectedEdgeListElement

Bases: pybind11_builtins.pybind11_object

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

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement, edge: utility::graph::DirectedEdge, previous: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement, next: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

const_edge(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) → utility::graph::DirectedEdge

C++: utility::graph::DirectedEdgeListElement::const_edge() const –> const class utility::graph::DirectedEdge *

const_next(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) → pyrosetta.rosetta.utility.graph.DirectedEdgeListElement

C++: utility::graph::DirectedEdgeListElement::const_next() const –> const class utility::graph::DirectedEdgeListElement *

const_previous(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) → pyrosetta.rosetta.utility.graph.DirectedEdgeListElement

C++: utility::graph::DirectedEdgeListElement::const_previous() const –> const class utility::graph::DirectedEdgeListElement *

edge(*args, **kwargs)

Overloaded function.

  1. edge(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> utility::graph::DirectedEdge

C++: utility::graph::DirectedEdgeListElement::edge() –> class utility::graph::DirectedEdge *

  1. edge(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement, setting: utility::graph::DirectedEdge) -> None

C++: utility::graph::DirectedEdgeListElement::edge(class utility::graph::DirectedEdge *) –> void

next(*args, **kwargs)

Overloaded function.

  1. next(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> pyrosetta.rosetta.utility.graph.DirectedEdgeListElement

C++: utility::graph::DirectedEdgeListElement::next() –> class utility::graph::DirectedEdgeListElement *

  1. next(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement, setting: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None

C++: utility::graph::DirectedEdgeListElement::next(class utility::graph::DirectedEdgeListElement *) –> void

previous(*args, **kwargs)

Overloaded function.

  1. previous(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> pyrosetta.rosetta.utility.graph.DirectedEdgeListElement

C++: utility::graph::DirectedEdgeListElement::previous() –> class utility::graph::DirectedEdgeListElement *

  1. previous(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement, setting: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None

C++: utility::graph::DirectedEdgeListElement::previous(class utility::graph::DirectedEdgeListElement *) –> void

class pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

Bases: pybind11_builtins.pybind11_object

Custom DirectedEdge list (non-const) iterator class, which can return non-const DirectedEdge 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< DirectedEdge * > and a list< DirectedEdge const * >.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → bool
equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::DirectedEdgeListIterator::operator==(const class utility::graph::DirectedEdgeListIterator &) const –> bool

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, owner: utility::graph::DirectedEdgeList) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, owner: utility::graph::DirectedEdgeList, element: pyrosetta.rosetta.utility.graph.DirectedEdgeListElement) -> None
  4. __init__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, arg0: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__mul__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → utility::graph::DirectedEdge
dereference operator: return the edge pointer pointed to by the list element this iterator
is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.

C++: utility::graph::DirectedEdgeListIterator::operator*() const –> class utility::graph::DirectedEdge *

__ne__(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → bool
inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::DirectedEdgeListIterator::operator!=(const class utility::graph::DirectedEdgeListIterator &) const –> bool

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

assignmnet operator

C++: utility::graph::DirectedEdgeListIterator::operator=(const class utility::graph::DirectedEdgeListIterator &) –> class utility::graph::DirectedEdgeListIterator &

minus_minus(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

decrement operator. Point this iterator at the previous element in the list.

C++: utility::graph::DirectedEdgeListIterator::operator–() –> const class utility::graph::DirectedEdgeListIterator &

plus_plus(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator

increment operator. Point this iterator at the next element in the list.

C++: utility::graph::DirectedEdgeListIterator::operator++() –> const class utility::graph::DirectedEdgeListIterator &

valid(self: pyrosetta.rosetta.utility.graph.DirectedEdgeListIterator) → bool
check that this iterator is valid. Will not guarantee that the iterator points at an element
that has not been destroyed.

C++: utility::graph::DirectedEdgeListIterator::valid() const –> bool

class pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS

Bases: pyrosetta.rosetta.utility.excn.EXCN_Msg_Exception

Class to raise to do an immediate stop of a breadth first search. ONLY THROW FROM WITHIN A VISITOR PASSED TO breadth_first_visit_prune/breadth_first_search_prune

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(self: pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS, arg0: pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS) → None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__(self: pyrosetta.rosetta.utility.excn.EXCN_Base) → str
__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

add_msg(self: pyrosetta.rosetta.utility.excn.EXCN_Msg_Exception, str: str) → None

C++: utility::excn::EXCN_Msg_Exception::add_msg(const class std::basic_string<char> &) –> void

assign(self: pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS, : pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS) → pyrosetta.rosetta.utility.graph.EXCN_Stop_BFS

C++: utility::graph::EXCN_Stop_BFS::operator=(const class utility::graph::EXCN_Stop_BFS &) –> class utility::graph::EXCN_Stop_BFS &

msg(self: pyrosetta.rosetta.utility.excn.EXCN_Msg_Exception) → str

C++: utility::excn::EXCN_Msg_Exception::msg() const –> const std::string

show(self: pyrosetta.rosetta.utility.excn.EXCN_Msg_Exception, : pyrosetta.rosetta.std.ostream) → None

C++: utility::excn::EXCN_Msg_Exception::show(class std::basic_ostream<char> &) const –> void

what(self: pyrosetta.rosetta.utility.excn.EXCN_Msg_Exception) → str

C++: utility::excn::EXCN_Msg_Exception::what() const –> const char *

class pyrosetta.rosetta.utility.graph.EdgeList

Bases: pybind11_builtins.pybind11_object

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.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

begin(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListIterator

returns a non-const iterator to the front of the list

C++: utility::graph::EdgeList::begin() –> class utility::graph::EdgeListIterator

const_begin(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

returns a const iterator to the front of the list

C++: utility::graph::EdgeList::const_begin() const –> class utility::graph::EdgeListConstIterator

const_end(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

returns a const iterator to the end of the list

C++: utility::graph::EdgeList::const_end() const –> class utility::graph::EdgeListConstIterator

const_last(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

returns a const iterator to the last element in the list

C++: utility::graph::EdgeList::const_last() const –> class utility::graph::EdgeListConstIterator

end(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListIterator

returns a non-const iterator to the end of the list

C++: utility::graph::EdgeList::end() –> class utility::graph::EdgeListIterator

erase(self: pyrosetta.rosetta.utility.graph.EdgeList, to_erase: pyrosetta.rosetta.utility.graph.EdgeListIterator) → None

removes an element from the list pointed to by the input iterator

C++: utility::graph::EdgeList::erase(class utility::graph::EdgeListIterator) –> void

insert(self: pyrosetta.rosetta.utility.graph.EdgeList, element_to_insert_before: pyrosetta.rosetta.utility.graph.EdgeListIterator, edgeptr: utility::graph::Edge) → pyrosetta.rosetta.utility.graph.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++: utility::graph::EdgeList::insert(const class utility::graph::EdgeListIterator &, class utility::graph::Edge *) –> class utility::graph::EdgeListIterator

is_end_element(self: pyrosetta.rosetta.utility.graph.EdgeList, element: pyrosetta.rosetta.utility.graph.EdgeListElement) → bool
method invoked by the EdgeListIterator class: is an iterator the special
end iterator for a list?

C++: utility::graph::EdgeList::is_end_element(const class utility::graph::EdgeListElement *) const –> bool

last(self: pyrosetta.rosetta.utility.graph.EdgeList) → pyrosetta.rosetta.utility.graph.EdgeListIterator

returns a non-const iterator to the last element in the list

C++: utility::graph::EdgeList::last() –> class utility::graph::EdgeListIterator

push_back(self: pyrosetta.rosetta.utility.graph.EdgeList, edgeptr: utility::graph::Edge) → None

create a new edge-list element and insert it at the front of the list

C++: utility::graph::EdgeList::push_back(class utility::graph::Edge *) –> void

push_front(self: pyrosetta.rosetta.utility.graph.EdgeList, edgeptr: utility::graph::Edge) → None

create a new edge-list element and insert it at the end of the list

C++: utility::graph::EdgeList::push_front(class utility::graph::Edge *) –> void

size(self: pyrosetta.rosetta.utility.graph.EdgeList) → int

O(N)

C++: utility::graph::EdgeList::size() const –> unsigned long

class pyrosetta.rosetta.utility.graph.EdgeListConstIterator

Bases: pybind11_builtins.pybind11_object

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 * >.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(*args, **kwargs)

Overloaded function.

  1. __eq__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) -> bool
equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::EdgeListConstIterator::operator==(const class utility::graph::EdgeListConstIterator &) const –> bool

  1. __eq__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListIterator) -> bool
const-cast equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::EdgeListConstIterator::operator==(const class utility::graph::EdgeListIterator &) const –> bool

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, owner: utility::graph::EdgeList) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, owner: utility::graph::EdgeList, element: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None
  4. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, arg0: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) -> None
  5. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, src: pyrosetta.rosetta.utility.graph.EdgeListIterator) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__mul__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) → utility::graph::Edge
dereference operator: return the edge pointer pointed to by the list element this iterator
is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself.

C++: utility::graph::EdgeListConstIterator::operator*() const –> const class utility::graph::Edge *

__ne__(*args, **kwargs)

Overloaded function.

  1. __ne__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) -> bool
inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.

C++: utility::graph::EdgeListConstIterator::operator!=(const class utility::graph::EdgeListConstIterator &) const –> bool

  1. __ne__(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListIterator) -> bool
const-cast inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.

C++: utility::graph::EdgeListConstIterator::operator!=(const class utility::graph::EdgeListIterator &) const –> bool

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

assignmnet operator

C++: utility::graph::EdgeListConstIterator::operator=(const class utility::graph::EdgeListConstIterator &) –> class utility::graph::EdgeListConstIterator &

minus_minus(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

decrement operator. Point this iterator at the previous element in the list.

C++: utility::graph::EdgeListConstIterator::operator–() –> const class utility::graph::EdgeListConstIterator &

plus_plus(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) → pyrosetta.rosetta.utility.graph.EdgeListConstIterator

increment operator. Point this iterator at the next element in the list.

C++: utility::graph::EdgeListConstIterator::operator++() –> const class utility::graph::EdgeListConstIterator &

valid(self: pyrosetta.rosetta.utility.graph.EdgeListConstIterator) → bool

Is this a valid iterator?

C++: utility::graph::EdgeListConstIterator::valid() const –> bool

class pyrosetta.rosetta.utility.graph.EdgeListElement

Bases: pybind11_builtins.pybind11_object

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

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListElement, edge: utility::graph::Edge, previous: pyrosetta.rosetta.utility.graph.EdgeListElement, next: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

const_edge(self: pyrosetta.rosetta.utility.graph.EdgeListElement) → utility::graph::Edge

C++: utility::graph::EdgeListElement::const_edge() const –> const class utility::graph::Edge *

const_next(self: pyrosetta.rosetta.utility.graph.EdgeListElement) → pyrosetta.rosetta.utility.graph.EdgeListElement

C++: utility::graph::EdgeListElement::const_next() const –> const class utility::graph::EdgeListElement *

const_previous(self: pyrosetta.rosetta.utility.graph.EdgeListElement) → pyrosetta.rosetta.utility.graph.EdgeListElement

C++: utility::graph::EdgeListElement::const_previous() const –> const class utility::graph::EdgeListElement *

edge(*args, **kwargs)

Overloaded function.

  1. edge(self: pyrosetta.rosetta.utility.graph.EdgeListElement) -> utility::graph::Edge

C++: utility::graph::EdgeListElement::edge() –> class utility::graph::Edge *

  1. edge(self: pyrosetta.rosetta.utility.graph.EdgeListElement, setting: utility::graph::Edge) -> None

C++: utility::graph::EdgeListElement::edge(class utility::graph::Edge *) –> void

next(*args, **kwargs)

Overloaded function.

  1. next(self: pyrosetta.rosetta.utility.graph.EdgeListElement) -> pyrosetta.rosetta.utility.graph.EdgeListElement

C++: utility::graph::EdgeListElement::next() –> class utility::graph::EdgeListElement *

  1. next(self: pyrosetta.rosetta.utility.graph.EdgeListElement, setting: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None

C++: utility::graph::EdgeListElement::next(class utility::graph::EdgeListElement *) –> void

previous(*args, **kwargs)

Overloaded function.

  1. previous(self: pyrosetta.rosetta.utility.graph.EdgeListElement) -> pyrosetta.rosetta.utility.graph.EdgeListElement

C++: utility::graph::EdgeListElement::previous() –> class utility::graph::EdgeListElement *

  1. previous(self: pyrosetta.rosetta.utility.graph.EdgeListElement, setting: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None

C++: utility::graph::EdgeListElement::previous(class utility::graph::EdgeListElement *) –> void

class pyrosetta.rosetta.utility.graph.EdgeListIterator

Bases: pybind11_builtins.pybind11_object

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 * >.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListIterator) → bool
equality operator. Do these elements point at the same list element? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::EdgeListIterator::operator==(const class utility::graph::EdgeListIterator &) const –> bool

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, owner: utility::graph::EdgeList) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, owner: utility::graph::EdgeList, element: pyrosetta.rosetta.utility.graph.EdgeListElement) -> None
  4. __init__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, arg0: pyrosetta.rosetta.utility.graph.EdgeListIterator) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__mul__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator) → utility::graph::Edge
dereference operator: return the edge pointer pointed to by the list element this iterator
is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.

C++: utility::graph::EdgeListIterator::operator*() const –> class utility::graph::Edge *

__ne__(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListIterator) → bool
inequality operator. Do these elements point to different elements from the same list? Asserts
that they belong to the same list. Never compare elements from separate lists.

C++: utility::graph::EdgeListIterator::operator!=(const class utility::graph::EdgeListIterator &) const –> bool

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.utility.graph.EdgeListIterator, rhs: pyrosetta.rosetta.utility.graph.EdgeListIterator) → pyrosetta.rosetta.utility.graph.EdgeListIterator

assignmnet operator

C++: utility::graph::EdgeListIterator::operator=(const class utility::graph::EdgeListIterator &) –> class utility::graph::EdgeListIterator &

minus_minus(self: pyrosetta.rosetta.utility.graph.EdgeListIterator) → pyrosetta.rosetta.utility.graph.EdgeListIterator

decrement operator. Point this iterator at the previous element in the list.

C++: utility::graph::EdgeListIterator::operator–() –> const class utility::graph::EdgeListIterator &

plus_plus(self: pyrosetta.rosetta.utility.graph.EdgeListIterator) → pyrosetta.rosetta.utility.graph.EdgeListIterator

increment operator. Point this iterator at the next element in the list.

C++: utility::graph::EdgeListIterator::operator++() –> const class utility::graph::EdgeListIterator &

valid(self: pyrosetta.rosetta.utility.graph.EdgeListIterator) → bool
check that this iterator is valid. Will not guarantee that the iterator points at an element
that has not been destroyed.

C++: utility::graph::EdgeListIterator::valid() const –> bool

class pyrosetta.rosetta.utility.graph.Graph

Bases: pybind11_builtins.pybind11_object

A Graph with constant time edge insertion and deletion. Extensible.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.utility.graph.Graph) -> None
  2. __init__(self: pyrosetta.rosetta.utility.graph.Graph, num_nodes: int) -> None
  3. __init__(self: pyrosetta.rosetta.utility.graph.Graph, arg0: pyrosetta.rosetta.utility.graph.Graph) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

add_edge(*args, **kwargs)

Overloaded function.

  1. add_edge(self: pyrosetta.rosetta.utility.graph.Graph, node1: int, node2: int) -> pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::add_edge(unsigned long, unsigned long) –> class utility::graph::Edge *

  1. add_edge(self: pyrosetta.rosetta.utility.graph.Graph, example_edge: pyrosetta.rosetta.utility.graph.Edge) -> pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::add_edge(const class utility::graph::Edge *) –> class utility::graph::Edge *

all_pairs_shortest_paths(self: pyrosetta.rosetta.utility.graph.Graph) → ObjexxFCL::FArray2D<int>
O(V^3). Computes all pairs shortest paths using Warshall’s algorithm
and writes all the path distances to the two-dimensional table.

C++: utility::graph::Graph::all_pairs_shortest_paths() const –> class ObjexxFCL::FArray2D<int>

assign(self: pyrosetta.rosetta.utility.graph.Graph, source: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.Graph

assignment operator. source and this must have the same type.

C++: utility::graph::Graph::operator=(const class utility::graph::Graph &) –> class utility::graph::Graph &

const_edge_list_begin(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::const_edge_list_begin() const –> class utility::graph::EdgeListConstIterator

const_edge_list_end(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::const_edge_list_end() const –> class utility::graph::EdgeListConstIterator

copy_connectivity(self: pyrosetta.rosetta.utility.graph.Graph, source: pyrosetta.rosetta.utility.graph.Graph) → None
copy the edge connectivity from a source graph with a potentially
unknown type.

C++: utility::graph::Graph::copy_connectivity(const class utility::graph::Graph &) –> void

delete_edge(self: pyrosetta.rosetta.utility.graph.Graph, edge: pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::delete_edge(class utility::graph::Edge *) –> void

drop_all_edges(self: pyrosetta.rosetta.utility.graph.Graph) → None

delete all the edges present in the graph

C++: utility::graph::Graph::drop_all_edges() –> void

drop_all_edges_for_node(self: pyrosetta.rosetta.utility.graph.Graph, node: int) → None

delete all the edges for a single vertex in the graph

C++: utility::graph::Graph::drop_all_edges_for_node(unsigned long) –> void

edge_list_begin(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::edge_list_begin() –> class utility::graph::EdgeListIterator

edge_list_end(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::edge_list_end() –> class utility::graph::EdgeListIterator

find_edge(self: pyrosetta.rosetta.utility.graph.Graph, node1: int, node2: int) → pyrosetta.rosetta.utility.graph.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++: utility::graph::Graph::find_edge(unsigned long, unsigned long) –> class utility::graph::Edge *

focused_edge(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.Edge

returns a pointer to the focused edge

C++: utility::graph::Graph::focused_edge() –> class utility::graph::Edge *

getTotalMemoryUsage(self: pyrosetta.rosetta.utility.graph.Graph) → 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++: utility::graph::Graph::getTotalMemoryUsage() const –> unsigned long

get_edge_exists(self: pyrosetta.rosetta.utility.graph.Graph, node1: int, node2: int) → bool

is an edge already present in the graph? O(V) worst case. O(1) iff all vertices have O(1) edges

C++: utility::graph::Graph::get_edge_exists(unsigned long, unsigned long) const –> bool

get_node(self: pyrosetta.rosetta.utility.graph.Graph, index: int) → pyrosetta.rosetta.utility.graph.Node

C++: utility::graph::Graph::get_node(unsigned long) –> class utility::graph::Node *

get_self_ptr(self: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.graph.Graph

C++: utility::graph::Graph::get_self_ptr() –> class std::shared_ptr<class utility::graph::Graph>

num_edges(self: pyrosetta.rosetta.utility.graph.Graph) → int

C++: utility::graph::Graph::num_edges() const –> unsigned long

num_nodes(self: pyrosetta.rosetta.utility.graph.Graph) → int

the number of nodes in the graph

C++: utility::graph::Graph::num_nodes() const –> unsigned long

output_connectivity(self: pyrosetta.rosetta.utility.graph.Graph, os: pyrosetta.rosetta.std.ostream) → None

send an edge list to the stream os.

C++: utility::graph::Graph::output_connectivity(class std::basic_ostream<char> &) const –> void

output_dimacs(self: pyrosetta.rosetta.utility.graph.Graph, os: pyrosetta.rosetta.std.ostream) → None

describe this graph in dimacs form to the stream os.

C++: utility::graph::Graph::output_dimacs(class std::basic_ostream<char> &) const –> void

print_vertices(self: pyrosetta.rosetta.utility.graph.Graph) → None

send summary information to the screen for all vertices in the graph

C++: utility::graph::Graph::print_vertices() const –> void

set_num_nodes(self: pyrosetta.rosetta.utility.graph.Graph, num_nodes: int) → None

set the number of nodes in the graph – deletes any existing edges in the graph

C++: utility::graph::Graph::set_num_nodes(unsigned long) –> void

pyrosetta.rosetta.utility.graph.block_allocation_error_message(block_size: int, array_size: int, neg_space_element_size: int) → str

C++: utility::graph::block_allocation_error_message(unsigned long, unsigned long, unsigned long) –> std::string

pyrosetta.rosetta.utility.graph.delete_all_intragroup_edges(g: pyrosetta.rosetta.utility.graph.Graph, node_groups: pyrosetta.rosetta.utility.vector1_unsigned_long) → None

C++: utility::graph::delete_all_intragroup_edges(class utility::graph::Graph &, const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &) –> void

pyrosetta.rosetta.utility.graph.digraph_is_a_DAG(g: pyrosetta.rosetta.utility.graph.Digraph) → bool
Return whether or not the input directed graph is a DAG – this invokes
the topological_sort function and simply returns the second element in the pair that it returns.

C++: utility::graph::digraph_is_a_DAG(const class utility::graph::Digraph &) –> bool

pyrosetta.rosetta.utility.graph.find_connected_components(g: pyrosetta.rosetta.utility.graph.Graph) → pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t
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++: utility::graph::find_connected_components(const class utility::graph::Graph &) –> class utility::vector1<struct std::pair<unsigned long, unsigned long>, class std::allocator<struct std::pair<unsigned long, unsigned long> > >

pyrosetta.rosetta.utility.graph.neg_space_element_allocation_error_message(block_size: int, neg_space_element_size: int) → str

C++: utility::graph::neg_space_element_allocation_error_message(unsigned long, unsigned long) –> std::string

pyrosetta.rosetta.utility.graph.topological_sort(g: pyrosetta.rosetta.utility.graph.Digraph) → Tuple[pyrosetta.rosetta.std.list_unsigned_long_t, bool]
Construct a topological sort for the input directed graph, if it is a DAG,
and return whether or not the input graph is actually a DAG.

C++: utility::graph::topological_sort(const class utility::graph::Digraph &) –> struct std::pair<class std::list<unsigned long, class std::allocator<unsigned long> >, bool>