RingDecomposerLib 1.0
|
Public Member Functions | |
def | __init__ (self, graph) |
def | get_calculated_result_for_graph (cls, graph) |
def | get_calculated_result (cls, edge_iterable, get_node_1=operator.itemgetter(0), get_node_2=operator.itemgetter(1), get_node_id=lambda x:x, get_edge_id=lambda x:x) |
def | set_graph (self, graph) |
def | calculate (self) |
def | is_calculated (self) |
def | get_nof_urf (self) |
def | get_nof_rcf (self) |
def | get_nof_ringsystems (self) |
def | __len__ (self) |
def | get_nodes_for_urf (self, urf_index) |
def | get_nodes_for_rcf (self, rcf_index) |
def | get_nodes_for_ringsystem (self, rs_index) |
def | get_edges_for_urf (self, urf_index) |
def | get_edges_for_rcf (self, rcf_index) |
def | get_edges_for_ringsystem (self, rs_index) |
def | get_weight_for_urf (self, urf_index) |
def | get_weight_for_rcf (self, rcf_index) |
def | get_relevant_cycles_for_urf (self, urf_index) |
def | get_relevant_cycles_for_rcf (self, rcf_index) |
def | get_urfs_for_node (self, node) |
def | get_urfs_for_edge (self, edge) |
def | get_rcfs_for_node (self, node) |
def | get_rcfs_for_edge (self, edge) |
def | get_sssr (self) |
def | get_relevant_cycles (self) |
def | get_nof_relevant_cycles (self) |
def | get_nof_relevant_cycles_for_urf (self, urf_index) |
def | get_relevant_cycle_prototypes (self) |
def | __getitem__ (self, item) |
Public Attributes | |
urfs | |
List of calculated URFs. More... | |
rcfs | |
List of calculated RCFs. More... | |
ringsystems | |
List of calculated ring systems. More... | |
Object for representing a calculation result.
def py_rdl.Calculator.Calculator.__init__ | ( | self, | |
graph | |||
) |
Initialize a new Calculator object with a Graph. Use @classmethod provided instead (get_calculated_result_for_graph, get_calculated_result). You can access URFs, RCFs and ring systems with the public attributes `urfs`, `rcfs` and `ringsystems`. The objects can be uses as indices for all functions below, that operate on the respective ring descriptions.
def py_rdl.Calculator.Calculator.__getitem__ | ( | self, | |
item | |||
) |
Get the item-th URF. item: The index of the URF raises RDLError if calculation wasn't successful raises IndexError if the index is out of range returns the item-th URF.
def py_rdl.Calculator.Calculator.__len__ | ( | self | ) |
Builtin for getting the length (number of URFs).
def py_rdl.Calculator.Calculator.calculate | ( | self | ) |
Calculate results for the graph datastructure. raises RDLError, if the calculation fails When creating a Calculator object with the @classmethod provided (get_calculated_result_for_graph, get_calculated_result) calling this function is not necessary.
def py_rdl.Calculator.Calculator.get_calculated_result | ( | cls, | |
edge_iterable, | |||
get_node_1 = operator.itemgetter(0) , |
|||
get_node_2 = operator.itemgetter(1) , |
|||
get_node_id = lambda x: x , |
|||
get_edge_id = lambda x: x |
|||
) |
Calculate the ring topologies and return the results. edge_iterable: an iterable containing the edges get_node_1: function retrieving the first node of an edge get_node_2: function retrieving the second node of an edge get_node_id: function for retrieving node identifier get_edge_id: function for retrieving edge identifier returns the calculated Calculator This @classmethod creates a new Graph. The edge_iterable can be any iterable (list, generator etc.). An edge can be as simple as a pair of nodes. The get_node function must return the respective nodes adjacent to an edge. The node must be hashable. If it's not, use some unique ID instead. The edge must be hashable. If it's not, use some unique ID instead.
def py_rdl.Calculator.Calculator.get_calculated_result_for_graph | ( | cls, | |
graph | |||
) |
Calculate the ring topologies for a Graph and return the results.
def py_rdl.Calculator.Calculator.get_edges_for_rcf | ( | self, | |
rcf_index | |||
) |
Get the edges in this RCF. raises RDLError if calculation wasn't successful returns list of edges in this RCF
def py_rdl.Calculator.Calculator.get_edges_for_ringsystem | ( | self, | |
rs_index | |||
) |
Get the edges in this Ringsystem. A ring system is a 2-connected component of the graph. raises RDLError if calculation wasn't successful returns list of edges in this Ringsystem
def py_rdl.Calculator.Calculator.get_edges_for_urf | ( | self, | |
urf_index | |||
) |
Get the edges in this URF. raises RDLError if calculation wasn't successful returns list of edges in this URF
def py_rdl.Calculator.Calculator.get_nodes_for_rcf | ( | self, | |
rcf_index | |||
) |
Get the nodes in this RCF. raises RDLError if calculation wasn't successful returns list of nodes in this RCF
def py_rdl.Calculator.Calculator.get_nodes_for_ringsystem | ( | self, | |
rs_index | |||
) |
Get the nodes in this Ringsystem. A ring system is a 2-connected component of the graph. raises RDLError if calculation wasn't successful returns list of nodes in this Ringsystem
def py_rdl.Calculator.Calculator.get_nodes_for_urf | ( | self, | |
urf_index | |||
) |
Get the nodes in this URF. raises RDLError if calculation wasn't successful returns list of nodes in this URF
def py_rdl.Calculator.Calculator.get_nof_rcf | ( | self | ) |
Get the number of RCFs. raises RDLError if calculation wasn't successful
def py_rdl.Calculator.Calculator.get_nof_relevant_cycles | ( | self | ) |
Get the number of relevant cycles. raises RDLError if calculation wasn't successful returns number of RCs
def py_rdl.Calculator.Calculator.get_nof_relevant_cycles_for_urf | ( | self, | |
urf_index | |||
) |
Get the number of relevant cycles for given URF. raises RDLError if calculation wasn't successful returns number of RCs
def py_rdl.Calculator.Calculator.get_nof_ringsystems | ( | self | ) |
Get the number of Ringsystems. A ring system is a 2-connected component of the graph. raises RDLError if calculation wasn't successful
def py_rdl.Calculator.Calculator.get_nof_urf | ( | self | ) |
Get the number of URFs. raises RDLError if calculation wasn't successful
def py_rdl.Calculator.Calculator.get_rcfs_for_edge | ( | self, | |
edge | |||
) |
Get the RCFs this edge is part of. raises RDLError if calculation wasn't successful returns list of RCFs
def py_rdl.Calculator.Calculator.get_rcfs_for_node | ( | self, | |
node | |||
) |
Get the RCFs this node is part of. raises RDLError if calculation wasn't successful returns a list of RCFs
def py_rdl.Calculator.Calculator.get_relevant_cycle_prototypes | ( | self | ) |
Get relevant cycle prototypes (one for each RCF). raises RDLError if calculation wasn't successful returns list of relevant cycle prototypes
def py_rdl.Calculator.Calculator.get_relevant_cycles | ( | self | ) |
Get relevant cycles. raises RDLError if calculation wasn't successful returns generator for enumerating relevant cycles
def py_rdl.Calculator.Calculator.get_relevant_cycles_for_rcf | ( | self, | |
rcf_index | |||
) |
Get the cycles in this of RCF. raises RDLError if calculation wasn't successful returns generator for enumerating relevant cycles in this RCF
def py_rdl.Calculator.Calculator.get_relevant_cycles_for_urf | ( | self, | |
urf_index | |||
) |
Get the cycles in this of URF. raises RDLError if calculation wasn't successful returns generator for enumerating relevant cycles in this URF
def py_rdl.Calculator.Calculator.get_sssr | ( | self | ) |
Get a minimal cycle base. raises RDLError if calculation wasn't successful returns list of cycles
def py_rdl.Calculator.Calculator.get_urfs_for_edge | ( | self, | |
edge | |||
) |
Get the URFs this edge is part of. raises RDLError if calculation wasn't successful returns list of URFs
def py_rdl.Calculator.Calculator.get_urfs_for_node | ( | self, | |
node | |||
) |
Get the URFs this node is part of. raises RDLError if calculation wasn't successful returns a list of URFs
def py_rdl.Calculator.Calculator.get_weight_for_rcf | ( | self, | |
rcf_index | |||
) |
Get weight of this RCF. raises RDLError if calculation wasn't successful return weight for given RCF
def py_rdl.Calculator.Calculator.get_weight_for_urf | ( | self, | |
urf_index | |||
) |
Get weight of this URF. raises RDLError if calculation wasn't successful return weight for given URF
def py_rdl.Calculator.Calculator.is_calculated | ( | self | ) |
Check calculation status. returns True if calculation was successful, False otherwise.
def py_rdl.Calculator.Calculator.set_graph | ( | self, | |
graph | |||
) |
Set the graph data structure. This has to be a Graph object. See Graph for a generic interface.
py_rdl.Calculator.Calculator.rcfs |
List of calculated RCFs.
You can access individual RCFs using this list and use the RCF objects as index to all functions below, that take an RCF as argument.
py_rdl.Calculator.Calculator.ringsystems |
List of calculated ring systems.
You can access individual ring systems using this list and use the Ringsystem objects as index to all functions below, that take an ring system as argument.
py_rdl.Calculator.Calculator.urfs |
List of calculated URFs.
You can access individual URFs using this list and use the URF objects as index to all functions below, that take an URF as argument.