RingDecomposerLib 1.0
|
This file contains the API of the RingDecomposerLib library. More...
Go to the source code of this file.
Classes | |
struct | RDL_cycle |
Typedefs | |
typedef struct RDL_data | RDL_data |
Structure representing a calculation result. More... | |
typedef struct RDL_graph | RDL_graph |
Datastructure representing a graph for calculations. More... | |
typedef unsigned | RDL_node |
A node is represented by its index in the graph (0 to |V|-1). | |
typedef RDL_node | RDL_edge[2] |
An edge is represented by an array of size two containing the adjacent nodes. | |
typedef enum RDL_ERROR_LEVEL | RDL_ERROR_LEVEL |
error levels for custom logging functions | |
typedef void(* | RDL_outputFunction) (RDL_ERROR_LEVEL level, const char *m,...) |
typedef struct RDL_cycle | RDL_cycle |
typedef struct RDL_cycleIterator | RDL_cycleIterator |
Iterator for relevant cycles. More... | |
Enumerations | |
enum | RDL_ERROR_LEVEL { RDL_DEBUG, RDL_WARNING, RDL_ERROR, RDL_INITIALIZE_OUTPUT } |
error levels for custom logging functions | |
Functions | |
RDL_API void | RDL_setOutputFunction (RDL_outputFunction func) |
Set the output function for warning and error messages. More... | |
RDL_API void | RDL_writeToStderr (RDL_ERROR_LEVEL level, const char *fmt,...) |
An output function for writing everything to stderr. | |
RDL_API void | RDL_writeNothing (RDL_ERROR_LEVEL level, const char *fmt,...) |
No output function. | |
RDL_API RDL_graph * | RDL_initNewGraph (unsigned nof_nodes) |
Initializes a new RDL_graph. More... | |
RDL_API void | RDL_deleteGraph (RDL_graph *graph) |
Delete RDL_graph. More... | |
RDL_API unsigned | RDL_addUEdge (RDL_graph *graph, RDL_node node1, RDL_node node2) |
Adds an undirected edge to the graph. More... | |
RDL_API RDL_data * | RDL_calculate (RDL_graph *input_graph) |
Calculates the RDL_data structure of the given graph and returns it. More... | |
RDL_API void | RDL_deleteData (RDL_data *data) |
Deletes RDL_data from memory, including the RDL_graph. More... | |
RDL_API unsigned | RDL_getNofURF (const RDL_data *data) |
Returns the number of URFs. More... | |
RDL_API unsigned | RDL_getNofRCF (const RDL_data *data) |
Returns the number of RCFs. More... | |
RDL_API unsigned | RDL_getWeightForURF (const RDL_data *data, unsigned index) |
Returns the weight of each cycle in the URF identified by its index. More... | |
RDL_API unsigned | RDL_getWeightForRCF (const RDL_data *data, unsigned index) |
Returns the weight of each cycle in the RCF identified by its index. More... | |
RDL_API unsigned | RDL_getNodesForURF (const RDL_data *data, unsigned index, RDL_node **RDL_node_array_ptr) |
Gives the nodes of an URF identified with its index in an array of RDL_node. More... | |
RDL_API unsigned | RDL_getEdgesForURF (const RDL_data *data, unsigned index, RDL_edge **RDL_edge_array_ptr) |
Gives the edges of an URF identified with its index. More... | |
RDL_API unsigned | RDL_getNodesForRCF (const RDL_data *data, unsigned index, RDL_node **RDL_node_array_ptr) |
Gives the nodes of an RCF identified with its index in an array of RDL_node. More... | |
RDL_API unsigned | RDL_getEdgesForRCF (const RDL_data *data, unsigned index, RDL_edge **RDL_edge_array_ptr) |
Gives the edges of an RCF identified with its index. More... | |
RDL_API unsigned | RDL_getNofURFContainingNode (const RDL_data *data, RDL_node node) |
Returns the number of URFs that contain the given node. More... | |
RDL_API unsigned | RDL_getNofURFContainingEdge (const RDL_data *data, RDL_node node1, RDL_node node2) |
Returns the number of URFs that contain the RDL_edge defined by the two given nodes. More... | |
RDL_API unsigned | RDL_getNofRCFContainingNode (const RDL_data *data, RDL_node node) |
Returns the number of RCFs that contain the given node. More... | |
RDL_API unsigned | RDL_getNofRCFContainingEdge (const RDL_data *data, RDL_node node1, RDL_node node2) |
Returns the number of RCFs that contain the RDL_edge defined by the two given nodes. More... | |
RDL_API unsigned | RDL_getURFsContainingNode (const RDL_data *data, RDL_node node, unsigned **RDL_ids_ptr) |
Gives all URFs containing the node. More... | |
RDL_API unsigned | RDL_getURFsContainingEdge (const RDL_data *data, RDL_node node1, RDL_node node2, unsigned **RDL_ids_ptr) |
Gives all URFs containing the edge. More... | |
RDL_API unsigned | RDL_getRCFsContainingNode (const RDL_data *data, RDL_node node, unsigned **RDL_ids_ptr) |
Gives all RCFs containing the node. More... | |
RDL_API unsigned | RDL_getRCFsContainingEdge (const RDL_data *data, RDL_node node1, RDL_node node2, unsigned **RDL_ids_ptr) |
Gives all RCFs containing the edge. More... | |
RDL_API void | RDL_deleteCycle (RDL_cycle *cycle) |
Free memory of RDL_cycle. More... | |
RDL_API RDL_cycleIterator * | RDL_cycleIteratorNext (RDL_cycleIterator *it) |
Advance the cycle iterator by one. More... | |
RDL_API RDL_cycle * | RDL_cycleIteratorGetCycle (RDL_cycleIterator *it) |
Get the cycle as RDL_cycle. More... | |
RDL_API int | RDL_cycleIteratorAtEnd (RDL_cycleIterator *it) |
Check if iterator is at end (invalid) More... | |
RDL_API void | RDL_deleteCycleIterator (RDL_cycleIterator *it) |
Free memory of the cycle iterator. More... | |
RDL_API unsigned | RDL_getRCyclesForURF (const RDL_data *data, unsigned index, RDL_cycle ***RDL_cycle_array_ptr) |
Gives all relevant cycles of the URF with the given index. More... | |
RDL_API RDL_cycleIterator * | RDL_getRCyclesForURFIterator (const RDL_data *data, unsigned index) |
Get iterator for all relevant cycles of the URF with the given index. More... | |
RDL_API unsigned | RDL_getRCyclesForRCF (const RDL_data *data, unsigned index, RDL_cycle ***RDL_cycle_array_ptr) |
Gives all relevant cycles of the RCF with the given index. More... | |
RDL_API RDL_cycleIterator * | RDL_getRCyclesForRCFIterator (const RDL_data *data, unsigned index) |
Get iterator for all relevant cycles of the RCF with the given index. More... | |
RDL_API unsigned | RDL_getRCycles (const RDL_data *data, RDL_cycle ***RDL_cycle_array_ptr) |
Gives a list of all relevant cycles. More... | |
RDL_API RDL_cycleIterator * | RDL_getRCyclesIterator (const RDL_data *data) |
Get iterator for all relevant cycles. More... | |
RDL_API double | RDL_getNofRCForURF (const RDL_data *data, unsigned index) |
Gives the number of relevant cycles in this URF. More... | |
RDL_API double | RDL_getNofRCForRCF (const RDL_data *data, unsigned index) |
Gives the number of relevant cycles in this RCF. More... | |
RDL_API double | RDL_getNofRC (const RDL_data *data) |
Gives the number of relevant cycles. More... | |
RDL_API unsigned | RDL_getSSSR (const RDL_data *data, RDL_cycle ***RDL_cycle_array_ptr) |
Gives a set of cycles that forms a Minimal Cycle Basis of the graph. More... | |
RDL_API unsigned | RDL_getRCPrototypes (const RDL_data *data, RDL_cycle ***RDL_cycle_array_ptr) |
Gives a list of relevant cycle prototypes (one for each RCF). More... | |
RDL_API void | RDL_deleteCycles (RDL_cycle **cycles, unsigned number) |
Deallocates the structure given by RDL_getRCycles(), RDL_getSSSR(), RDL_getRCPrototypes() and RDL_getRCyclesForURF(), if called on its result and return value (the number of cycles) More... | |
RDL_API unsigned | RDL_translateCycArray (const RDL_data *data, RDL_cycle **old_array, unsigned number, char ***RDL_cycle_array_ptr) |
Translates the results of RDL_getRCycles(), RDL_getSSSR(), RDL_getRCPrototypes() and RDL_getRCyclesForURF() (arrays of RDL_cycle) into an array of cycles represented by arrays of {0,1}^|E| (bitsets). More... | |
RDL_API void | RDL_deleteEdgeIdxArray (char **cycles, unsigned number) |
Deallocates the structure given by RDL_translateCycArray(), if called on its result and return value (the number of cycles). More... | |
RDL_API unsigned | RDL_getEdgeArray (const RDL_data *data, RDL_edge **RDL_edge_array_ptr) |
Gives the edges of the graph. More... | |
RDL_API unsigned | RDL_getNofEdges (const RDL_data *data) |
Get the number of edges in the graph. More... | |
RDL_API unsigned | RDL_getEdgeId (const RDL_data *data, unsigned from, unsigned to) |
Get the id of the edge. More... | |
RDL_API unsigned | RDL_getNofRingsystems (const RDL_data *data) |
Get the number of ring systems in the graph. More... | |
RDL_API unsigned | RDL_getNofNodesForRingsystem (const RDL_data *data, unsigned idx) |
Get the number of nodes in the ring system. More... | |
RDL_API unsigned | RDL_getNofEdgesForRingsystem (const RDL_data *data, unsigned idx) |
Get the number of edges in the ring system. More... | |
RDL_API unsigned | RDL_getEdgesForRingsystem (const RDL_data *data, unsigned idx, RDL_edge **edges) |
Get the edges in the ring system. More... | |
RDL_API unsigned | RDL_getNodesForRingsystem (const RDL_data *data, unsigned idx, RDL_node **nodes) |
Get the nodes in the ring system. More... | |
RDL_API unsigned | RDL_getRingsystemForEdge (const RDL_data *data, unsigned from, unsigned to) |
Get the ring system id for given edge. More... | |
Variables | |
RDL_API RDL_outputFunction | RDL_outputFunc |
the output function for warnings and errors | |
RDL_API const unsigned | RDL_INVALID_RESULT |
Invalid result indicator. | |
RDL_API const unsigned | RDL_DUPLICATE_EDGE |
Duplicate edge indicator. | |
RDL_API const unsigned | RDL_NO_RINGSYSTEM |
No ringsystem indicator. | |
RDL_API const double | RDL_INVALID_RC_COUNT |
Invalid number of RCs. | |
This file contains the API of the RingDecomposerLib library.
This structure holds a cycle (or ring) in the graph. It is essentially an array of edges which are represented by pairs of nodes.
typedef struct RDL_cycleIterator RDL_cycleIterator |
Iterator for relevant cycles.
Always check if the iterator is at end BEFORE incrementing or accessing it.
Example usage:
RDL_cycle *cycle; RDL_cycleIterator *it = RDL_getRCyclesIterator(data); while(!RDL_cycleIteratorAtEnd(it)) { cycle = RDL_cycleIteratorGetCycle(it); <do something with the cycle> RDL_deleteCycle(cycle); RDL_cycleIteratorNext(it); } RDL_deleteCycleIterator(it);
Structure representing a calculation result.
This is the central structure, that is used to store the calculation results. Almost all functions in this header work on it.
Datastructure representing a graph for calculations.
Build graph data structure that is used for the calculation. The graph is stored as an adjacency list. The vertices are numbered from 0 to |V|-1. Call the following functions:
RDL_initNewGraph(unsigned V) to initialize a new graph with V vertices (returns RDL_graph *)
RDL_addUEdge(RDL_graph *, RDL_node from, RDL_node to) to add a new (undirected) edge from the vertex with index "from" to the vertex with index "to".
Then RDL_calculate can be called on it.
Adds an undirected edge to the graph.
graph | pointer to the RDL_graph that the edge will to be added to |
node1,node2 | pair of RDL_node which the edge is going to connect |
RDL_API int RDL_cycleIteratorAtEnd | ( | RDL_cycleIterator * | it | ) |
Check if iterator is at end (invalid)
it | RDL_cycleIterator |
RDL_API RDL_cycle* RDL_cycleIteratorGetCycle | ( | RDL_cycleIterator * | it | ) |
Get the cycle as RDL_cycle.
it | RDL_cycleIterator |
NULL
on error RDL_API RDL_cycleIterator* RDL_cycleIteratorNext | ( | RDL_cycleIterator * | it | ) |
Advance the cycle iterator by one.
it | RDL_cycleIterator |
it
itself, if successful; NULL
on error RDL_API void RDL_deleteCycle | ( | RDL_cycle * | cycle | ) |
RDL_API void RDL_deleteCycleIterator | ( | RDL_cycleIterator * | it | ) |
Free memory of the cycle iterator.
it | RDL_cycleIterator |
RDL_API void RDL_deleteCycles | ( | RDL_cycle ** | cycles, |
unsigned | number | ||
) |
Deallocates the structure given by RDL_getRCycles(), RDL_getSSSR(), RDL_getRCPrototypes() and RDL_getRCyclesForURF(), if called on its result and return value (the number of cycles)
cycles | The array of cycles. |
number | The number of cycles in the array |
RDL_API void RDL_deleteData | ( | RDL_data * | data | ) |
RDL_API void RDL_deleteEdgeIdxArray | ( | char ** | cycles, |
unsigned | number | ||
) |
Deallocates the structure given by RDL_translateCycArray(), if called on its result and return value (the number of cycles).
cycles | The translated array of cycles. |
number | The number of cycles in the array. |
RDL_API void RDL_deleteGraph | ( | RDL_graph * | graph | ) |
Gives the edges of the graph.
data | pointer to the RDL_data holding the calculation results. |
RDL_edge_array_ptr | pointer that points to the result array (declare RDL_edge * and give address as parameter) |
free(*RDL_edge_array_ptr)
RDL_API unsigned RDL_getEdgeId | ( | const RDL_data * | data, |
unsigned | from, | ||
unsigned | to | ||
) |
Get the id of the edge.
data | pointer to the RDL_data holding the calculation results. |
from | RDL_node starting at this edge |
to | RDL_node starting at this edge |
RDL_API unsigned RDL_getEdgesForRCF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_edge ** | RDL_edge_array_ptr | ||
) |
Gives the edges of an RCF identified with its index.
data | pointer to the RDL_data holding the calculation results. |
index | the index of the RCF |
RDL_edge_array_ptr | pointer that points to the result array (declare RDL_edge * and give address as parameter) |
free(*RDL_edge_array_ptr)
Gives an array of edges where an edge is represented by two RDL_node that it connects. RDL_API unsigned RDL_getEdgesForRingsystem | ( | const RDL_data * | data, |
unsigned | idx, | ||
RDL_edge ** | edges | ||
) |
Get the edges in the ring system.
data | pointer to the RDL_data holding the calculation results. |
idx | index of the ring system |
edges | pointer that points to the result array (declare RDL_edge * and give address as parameter) |
free(*edges)
RDL_API unsigned RDL_getEdgesForURF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_edge ** | RDL_edge_array_ptr | ||
) |
Gives the edges of an URF identified with its index.
data | pointer to the RDL_data holding the calculation results. |
index | the index of the URF |
RDL_edge_array_ptr | pointer that points to the result array (declare RDL_edge * and give address as parameter) |
free(*RDL_edge_array_ptr)
Gives an array of edges where an edge is represented by two RDL_node that it connects. RDL_API unsigned RDL_getNodesForRCF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_node ** | RDL_node_array_ptr | ||
) |
Gives the nodes of an RCF identified with its index in an array of RDL_node.
data | pointer to the RDL_data holding the calculation results. |
index | the index of the RCF |
RDL_node_array_ptr | pointer that points to the result array (declare RDL_node * and give address as parameter) |
free(*RDL_node_array_ptr)
. RDL_API unsigned RDL_getNodesForRingsystem | ( | const RDL_data * | data, |
unsigned | idx, | ||
RDL_node ** | nodes | ||
) |
Get the nodes in the ring system.
data | pointer to the RDL_data holding the calculation results. |
idx | index of the ring system |
nodes | pointer that points to the result array (declare RDL_edge * and give address as parameter) |
free(*nodes)
RDL_API unsigned RDL_getNodesForURF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_node ** | RDL_node_array_ptr | ||
) |
Gives the nodes of an URF identified with its index in an array of RDL_node.
data | pointer to the RDL_data holding the calculation results. |
index | the index of the URF |
RDL_node_array_ptr | pointer that points to the result array (declare RDL_node * and give address as parameter) |
free(*RDL_node_array_ptr)
. RDL_API unsigned RDL_getNofEdges | ( | const RDL_data * | data | ) |
Get the number of edges in the graph.
data | pointer to the RDL_data holding the calculation results. |
RDL_API unsigned RDL_getNofEdgesForRingsystem | ( | const RDL_data * | data, |
unsigned | idx | ||
) |
Get the number of edges in the ring system.
data | pointer to the RDL_data holding the calculation results. |
idx | index of the ring system |
RDL_API unsigned RDL_getNofNodesForRingsystem | ( | const RDL_data * | data, |
unsigned | idx | ||
) |
Get the number of nodes in the ring system.
data | pointer to the RDL_data holding the calculation results. |
idx | index of the ring system |
RDL_API double RDL_getNofRC | ( | const RDL_data * | data | ) |
Gives the number of relevant cycles.
data | pointer to the RDL_data holding the calculation results |
RDL_API unsigned RDL_getNofRCF | ( | const RDL_data * | data | ) |
Returns the number of RCFs.
data | Pointer to the RDL_data of which the number of RCF is requested |
RDL_API unsigned RDL_getNofRCFContainingEdge | ( | const RDL_data * | data, |
RDL_node | node1, | ||
RDL_node | node2 | ||
) |
Returns the number of RCFs that contain the RDL_edge defined by the two given nodes.
data | Pointer to the RDL_data storing the calculation results. |
node1,node2 | pair of RDL_node connected by the edge |
Returns the number of RCFs that contain the given node.
data | pointer to the RDL_data holding the calculation results. |
node | the RDL_node to look for in the RCFs |
RDL_API double RDL_getNofRCForRCF | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Gives the number of relevant cycles in this RCF.
data | pointer to the RDL_data holding the calculation results. |
index | id of the RCF |
RDL_API double RDL_getNofRCForURF | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Gives the number of relevant cycles in this URF.
data | pointer to the RDL_data holding the calculation results |
index | the index of the URF |
RDL_API unsigned RDL_getNofRingsystems | ( | const RDL_data * | data | ) |
Get the number of ring systems in the graph.
data | pointer to the RDL_data holding the calculation results. |
RDL_API unsigned RDL_getNofURF | ( | const RDL_data * | data | ) |
Returns the number of URFs.
data | Pointer to the RDL_data of which the number of URF is requested |
RDL_API unsigned RDL_getNofURFContainingEdge | ( | const RDL_data * | data, |
RDL_node | node1, | ||
RDL_node | node2 | ||
) |
Returns the number of URFs that contain the RDL_edge defined by the two given nodes.
data | Pointer to the RDL_data storing the calculation results. |
node1,node2 | pair of RDL_node connected by the edge |
Returns the number of URFs that contain the given node.
data | pointer to the RDL_data holding the calculation results. |
node | the RDL_node to look for in the URFs |
RDL_API unsigned RDL_getRCFsContainingEdge | ( | const RDL_data * | data, |
RDL_node | node1, | ||
RDL_node | node2, | ||
unsigned ** | RDL_ids_ptr | ||
) |
Gives all RCFs containing the edge.
data | pointer to the RDL_data holding the calculation results |
node1 | the first RDL_node of the edge |
node2 | the the second RDL_node of the edge |
RDL_ids_ptr | pointer that points to the result array of integers containing all indices of RCFs containing the edge. (declare unsigned * and give address as parameter) |
free(*RDL_ids_ptr)
RDL_API unsigned RDL_getRCFsContainingNode | ( | const RDL_data * | data, |
RDL_node | node, | ||
unsigned ** | RDL_ids_ptr | ||
) |
Gives all RCFs containing the node.
data | pointer to the RDL_data holding the calculation results |
node | the RDL_node |
RDL_ids_ptr | pointer that points to the result array of integers containing all indices of URFs containing the node. (declare unsigned * and give address as parameter) |
free(*RDL_ids_ptr)
Gives a list of relevant cycle prototypes (one for each RCF).
data | pointer to the RDL_data holding the calculation results |
RDL_cycle_array_ptr | pointer to the result array (declare RDL_cycle ** and give address as parameter) The result is an array of cycles. |
Gives a list of all relevant cycles.
data | pointer to the RDL_data holding the calculation results |
RDL_cycle_array_ptr | pointer to the result array (declare RDL_cycle ** and give address as parameter) The result is an array of cycles. |
RDL_API unsigned RDL_getRCyclesForRCF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_cycle *** | RDL_cycle_array_ptr | ||
) |
Gives all relevant cycles of the RCF with the given index.
data | pointer to the RDL_data holding the calculation results |
index | the index of the RCF |
RDL_cycle_array_ptr | pointer that points to the result array of cycles (declare RDL_cycle ** and give address as parameter) |
RDL_API RDL_cycleIterator* RDL_getRCyclesForRCFIterator | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Get iterator for all relevant cycles of the RCF with the given index.
data | pointer to the RDL_data holding the calculation results |
index | the index of the RCF |
RDL_API unsigned RDL_getRCyclesForURF | ( | const RDL_data * | data, |
unsigned | index, | ||
RDL_cycle *** | RDL_cycle_array_ptr | ||
) |
Gives all relevant cycles of the URF with the given index.
data | pointer to the RDL_data holding the calculation results |
index | the index of the URF |
RDL_cycle_array_ptr | pointer that points to the result array of cycles (declare RDL_cycle ** and give address as parameter) |
RDL_API RDL_cycleIterator* RDL_getRCyclesForURFIterator | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Get iterator for all relevant cycles of the URF with the given index.
data | pointer to the RDL_data holding the calculation results |
index | the index of the URF |
RDL_API RDL_cycleIterator* RDL_getRCyclesIterator | ( | const RDL_data * | data | ) |
Get iterator for all relevant cycles.
data | pointer to the RDL_data holding the calculation results |
RDL_API unsigned RDL_getRingsystemForEdge | ( | const RDL_data * | data, |
unsigned | from, | ||
unsigned | to | ||
) |
Get the ring system id for given edge.
data | pointer to the RDL_data holding the calculation results. |
from | RDL_node starting at this edge |
to | RDL_node starting at this edge |
Gives a set of cycles that forms a Minimal Cycle Basis of the graph.
|E|-|V|+1
for connected graphs), RDL_INVALID_RESULT on error data | pointer to the RDL_data holding the calculation results |
RDL_cycle_array_ptr | pointer that points to the result array (declare RDL_cycle ** and give address as parameter) |
RDL_API unsigned RDL_getURFsContainingEdge | ( | const RDL_data * | data, |
RDL_node | node1, | ||
RDL_node | node2, | ||
unsigned ** | RDL_ids_ptr | ||
) |
Gives all URFs containing the edge.
data | pointer to the RDL_data holding the calculation results |
node1 | the first RDL_node of the edge |
node2 | the the second RDL_node of the edge |
RDL_ids_ptr | pointer that points to the result array of integers containing all indices of URFs containing the edge. (declare unsigned * and give address as parameter) |
free(*RDL_ids_ptr)
RDL_API unsigned RDL_getURFsContainingNode | ( | const RDL_data * | data, |
RDL_node | node, | ||
unsigned ** | RDL_ids_ptr | ||
) |
Gives all URFs containing the node.
data | pointer to the RDL_data holding the calculation results |
node | the RDL_node |
RDL_ids_ptr | pointer that points to the result array of integers containing all indices of URFs containing the node. (declare unsigned * and give address as parameter) |
free(*RDL_ids_ptr)
RDL_API unsigned RDL_getWeightForRCF | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Returns the weight of each cycle in the RCF identified by its index.
data | pointer to the RDL_data holding the URFs |
index | the index of the RCF |
index
is out of range) RDL_API unsigned RDL_getWeightForURF | ( | const RDL_data * | data, |
unsigned | index | ||
) |
Returns the weight of each cycle in the URF identified by its index.
data | pointer to the RDL_data holding the URFs |
index | the index of the URF |
index
is out of range) RDL_API RDL_graph* RDL_initNewGraph | ( | unsigned | nof_nodes | ) |
RDL_API void RDL_setOutputFunction | ( | RDL_outputFunction | func | ) |
Set the output function for warning and error messages.
func | callback function for errors and warnings |
static
variable. When using multiple threads, only one thread should set the output function and the output function should be thread-safe.Default is no output at all (RDL_writeNothing). Call RDL_setOutputFunction(RDL_writeToStderr)
to enable output of warning and error messages to stderr
.
RDL_API unsigned RDL_translateCycArray | ( | const RDL_data * | data, |
RDL_cycle ** | old_array, | ||
unsigned | number, | ||
char *** | RDL_cycle_array_ptr | ||
) |
Translates the results of RDL_getRCycles(), RDL_getSSSR(), RDL_getRCPrototypes() and RDL_getRCyclesForURF() (arrays of RDL_cycle) into an array of cycles represented by arrays of {0,1}^|E|
(bitsets).
data | pointer to the RDL_data holding the calculation results. |
old_array | The resulting structure of the functions named above |
number | The return value of the functions named above (the number of cycles given) |
RDL_cycle_array_ptr | pointer to the result array (declare char ** and give address as parameter) |
The resulting array has a 1 at position i if edge i is part of the cycle or 0 otherwise. An edge is identified by the position at which it was added to the graph starting at 0 (the return value of RDL_addUEdge()).