[−][src]Struct retworkx::PyDAG
Methods
impl PyDAG
[src]
pub fn edges(&self, py: Python) -> PyObject
[src]
pub fn nodes(&self, py: Python) -> PyObject
[src]
pub fn has_edge(&self, node_a: usize, node_b: usize) -> bool
[src]
pub fn successors(&self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn predecessors(&self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn get_edge_data(&self, node_a: usize, node_b: usize) -> PyResult<&PyObject>
[src]
pub fn get_node_data(&self, node: usize) -> PyResult<&PyObject>
[src]
pub fn get_all_edge_data(
&self,
py: Python,
node_a: usize,
node_b: usize
) -> PyResult<PyObject>
[src]
&self,
py: Python,
node_a: usize,
node_b: usize
) -> PyResult<PyObject>
pub fn remove_node(&mut self, node: usize) -> PyResult<()>
[src]
pub fn add_edge(
&mut self,
parent: usize,
child: usize,
edge: PyObject
) -> PyResult<usize>
[src]
&mut self,
parent: usize,
child: usize,
edge: PyObject
) -> PyResult<usize>
pub fn remove_edge(&mut self, parent: usize, child: usize) -> PyResult<()>
[src]
pub fn remove_edge_from_index(&mut self, edge: usize) -> PyResult<()>
[src]
pub fn add_node(&mut self, obj: PyObject) -> PyResult<usize>
[src]
pub fn add_child(
&mut self,
parent: usize,
obj: PyObject,
edge: PyObject
) -> PyResult<usize>
[src]
&mut self,
parent: usize,
obj: PyObject,
edge: PyObject
) -> PyResult<usize>
pub fn add_parent(
&mut self,
child: usize,
obj: PyObject,
edge: PyObject
) -> PyResult<usize>
[src]
&mut self,
child: usize,
obj: PyObject,
edge: PyObject
) -> PyResult<usize>
pub fn adj(&mut self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn adj_direction(
&mut self,
py: Python,
node: usize,
direction: bool
) -> PyResult<PyObject>
[src]
&mut self,
py: Python,
node: usize,
direction: bool
) -> PyResult<PyObject>
pub fn in_edges(&mut self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn out_edges(&mut self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn in_degree(&self, node: usize) -> usize
[src]
pub fn out_degree(&self, node: usize) -> usize
[src]
Trait Implementations
impl Data for PyDAG
[src]
type NodeWeight = PyObject
type EdgeWeight = PyObject
impl DataMap for PyDAG
[src]
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
[src]
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
[src]
impl DataMapMut for PyDAG
[src]
fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>
[src]
fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>
[src]
impl GetAdjacencyMatrix for PyDAG
[src]
type AdjMatrix = <StableDiGraph<PyObject, PyObject> as GetAdjacencyMatrix>::AdjMatrix
The associated adjacency matrix type
fn adjacency_matrix(&self) -> Self::AdjMatrix
[src]
fn is_adjacent(
&self,
matrix: &Self::AdjMatrix,
a: NodeIndex,
b: NodeIndex
) -> bool
[src]
&self,
matrix: &Self::AdjMatrix,
a: NodeIndex,
b: NodeIndex
) -> bool
impl GraphBase for PyDAG
[src]
impl GraphProp for PyDAG
[src]
impl Index<EdgeIndex<u32>> for PyDAG
[src]
type Output = PyObject
The returned type after indexing.
fn index(&self, index: EdgeIndex) -> &PyObject
[src]
impl Index<NodeIndex<u32>> for PyDAG
[src]
type Output = PyObject
The returned type after indexing.
fn index(&self, index: NodeIndex) -> &PyObject
[src]
impl IndexMut<EdgeIndex<u32>> for PyDAG
[src]
impl IndexMut<NodeIndex<u32>> for PyDAG
[src]
impl<'a> IntoEdgeReferences for &'a PyDAG
[src]
type EdgeRef = EdgeReference<'a, PyObject>
type EdgeReferences = EdgeReferences<'a, PyObject>
fn edge_references(self) -> Self::EdgeReferences
[src]
impl<'a> IntoEdges for &'a PyDAG
[src]
impl<'a> IntoEdgesDirected for &'a PyDAG
[src]
type EdgesDirected = Edges<'a, PyObject>
fn edges_directed(self, a: Self::NodeId, dir: Direction) -> Self::EdgesDirected
[src]
impl<'a> IntoNeighbors for &'a PyDAG
[src]
impl<'a> IntoNeighborsDirected for &'a PyDAG
[src]
type NeighborsDirected = Neighbors<'a, PyObject>
fn neighbors_directed(self, n: NodeIndex, d: Direction) -> Self::Neighbors
[src]
impl<'a> IntoNodeIdentifiers for &'a PyDAG
[src]
type NodeIdentifiers = NodeIndices<'a, PyObject>
fn node_identifiers(self) -> Self::NodeIdentifiers
[src]
impl<'a> IntoNodeReferences for &'a PyDAG
[src]
type NodeRef = (NodeIndex, &'a PyObject)
type NodeReferences = NodeReferences<'a, PyObject>
fn node_references(self) -> Self::NodeReferences
[src]
impl IntoPy<PyObject> for PyDAG
[src]
impl NodeCompactIndexable for PyDAG
[src]
impl NodeCount for PyDAG
[src]
fn node_count(&self) -> usize
[src]
impl NodeIndexable for PyDAG
[src]
fn node_bound(&self) -> usize
[src]
fn to_index(&self, ix: NodeIndex) -> usize
[src]
fn from_index(&self, ix: usize) -> Self::NodeId
[src]
impl<'p> PyMappingLenProtocol<'p> for PyDAG
[src]
impl<'p> PyMappingProtocol<'p> for PyDAG
[src]
fn __len__(&'p self) -> <PyDAG as PyMappingLenProtocol<'p>>::Result
[src]
fn __getitem__(&'p self, key: Self::Key) -> Self::Result where
Self: PyMappingGetItemProtocol<'p>,
[src]
Self: PyMappingGetItemProtocol<'p>,
fn __setitem__(&'p mut self, key: Self::Key, value: Self::Value) -> Self::Result where
Self: PyMappingSetItemProtocol<'p>,
[src]
Self: PyMappingSetItemProtocol<'p>,
fn __delitem__(&'p mut self, key: Self::Key) -> Self::Result where
Self: PyMappingDelItemProtocol<'p>,
[src]
Self: PyMappingDelItemProtocol<'p>,
fn __reversed__(&'p self) -> Self::Result where
Self: PyMappingReversedProtocol<'p>,
[src]
Self: PyMappingReversedProtocol<'p>,
impl PyMethodsInventoryDispatch for PyDAG
[src]
type InventoryType = PyDAGGeneratedPyo3Inventory
This allows us to get the inventory type when only the pyclass is in scope
impl PyObjectAlloc for PyDAG
[src]
unsafe fn alloc(_py: Python) -> *mut PyObject
[src]
unsafe fn dealloc(py: Python, obj: *mut PyObject)
[src]
unsafe fn drop(py: Python, obj: *mut PyObject)
[src]
impl PyTypeInfo for PyDAG
[src]
type Type = PyDAG
Type of objects to store in PyObject struct
type BaseType = PyAny
Base class
const NAME: &'static str
[src]
const MODULE: Option<&'static str>
[src]
const DESCRIPTION: &'static str
[src]
const FLAGS: usize
[src]
const SIZE: usize
[src]
const OFFSET: isize
[src]
unsafe fn type_object() -> &'static mut PyTypeObject
[src]
fn is_instance(object: &PyAny) -> bool
[src]
fn is_exact_instance(object: &PyAny) -> bool
[src]
impl Visitable for PyDAG
[src]
Auto Trait Implementations
impl RefUnwindSafe for PyDAG
impl Send for PyDAG
impl Sync for PyDAG
impl Unpin for PyDAG
impl UnwindSafe for PyDAG
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> FromPy<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoPy<U> for T where
U: FromPy<T>,
[src]
U: FromPy<T>,
impl<T> PyMethodsProtocol for T where
T: PyMethodsInventoryDispatch,
[src]
T: PyMethodsInventoryDispatch,
fn py_methods() -> Vec<&'static PyMethodDefType>
[src]
impl<T> PyObjectAlloc for T where
T: PyObjectWithFreeList,
[src]
T: PyObjectWithFreeList,
unsafe fn alloc(_py: Python) -> *mut PyObject
[src]
unsafe fn dealloc(py: Python, obj: *mut PyObject)
[src]
unsafe fn drop(py: Python, obj: *mut PyObject)
[src]
impl<'v, T> PyTryFrom<'v> for T where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_mut<V>(value: V) -> Result<&'v mut T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_mut_exact<V>(value: V) -> Result<&'v mut T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
unsafe fn try_from_unchecked<V>(value: V) -> &'v T where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
unsafe fn try_from_mut_unchecked<V>(value: V) -> &'v mut T where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
impl<T> PyTypeCreate for T where
T: PyObjectAlloc + PyTypeObject,
[src]
T: PyObjectAlloc + PyTypeObject,
impl<T> PyTypeObject for T where
T: PyTypeInfo + PyMethodsProtocol + PyObjectAlloc,
[src]
T: PyTypeInfo + PyMethodsProtocol + PyObjectAlloc,
fn init_type() -> NonNull<PyTypeObject>
[src]
fn type_object() -> Py<PyType>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,