SBML layout interface in C. More...
#include "graphfab/core/SagittariusCore.h"#include "graphfab/sbml/autolayoutSBML.h"#include "graphfab/diag/error.h"Go to the source code of this file.
Classes | |
| struct | gf_network |
| struct | gf_node |
| struct | gf_reaction |
| struct | gf_curve |
| struct | gf_compartment |
| struct | gf_canvas |
| struct | gf_layoutInfo |
| struct | CPoint |
| struct | gf_point |
| struct | gf_transform |
| struct | gf_curveCP |
Enumerations | |
| enum | gf_specRole { GF_ROLE_SUBSTRATE, GF_ROLE_PRODUCT, GF_ROLE_SIDESUBSTRATE, GF_ROLE_SIDEPRODUCT, GF_ROLE_MODIFIER, GF_ROLE_ACTIVATOR, GF_ROLE_INHIBITOR } |
Functions | |
| _GraphfabExport void | gf_freeLayoutInfo (gf_layoutInfo *l) |
| Call to clean up an instance of gf_layoutInfo when it is no longer needed. More... | |
| _GraphfabExport void | gf_freeLayoutInfoHierarch (gf_layoutInfo *l) |
| Call to clean up an instance of gf_layoutInfo and all contained data structures. More... | |
| _GraphfabExport void | gf_freeModelAndLayout (gf_SBMLModel *mod, gf_layoutInfo *l) |
| Call to clean up an instance of gf_layoutInfo and gf_SBMLModel when they are no longer needed. More... | |
| _GraphfabExport gf_layoutInfo * | gf_processLayout (gf_SBMLModel *lo) |
| Process the layout info from a document. The layout info holds the network (nodes, reactions, etc.), canvas, and SBML content. More... | |
| _GraphfabExport gf_layoutInfo * | gf_loadSBMLIntoLayoutEngine (const char *buf, gf_SBMLModel *r) |
| Load SBML document from memory buffer and process. More... | |
| _GraphfabExport void | gf_setModelNamespace (gf_layoutInfo *l, unsigned long level, unsigned long version) |
| Set the level and version of the SBML. More... | |
| _GraphfabExport gf_network | gf_getNetwork (gf_layoutInfo *l) |
| Get the network associated with the model. More... | |
| _GraphfabExport gf_network * | gf_getNetworkp (gf_layoutInfo *l) |
| Get the network associated with the model. More... | |
| _GraphfabExport void | gf_clearNetwork (gf_network *n) |
| Clear the network - does not deallocate. More... | |
| _GraphfabExport void | gf_releaseNetwork (gf_network *n) |
| Release the network. More... | |
| _GraphfabExport char * | gf_nw_getID (gf_network *n) |
| Get the id, user frees memory. More... | |
| _GraphfabExport size_t | gf_nw_getNumNodes (const gf_network *n) |
| Get the number of nodes. More... | |
| _GraphfabExport size_t | gf_nw_getNumRxns (const gf_network *n) |
| Get the number of reactions. More... | |
| _GraphfabExport size_t | gf_nw_getNumComps (const gf_network *n) |
| Get the number of compartments. More... | |
| _GraphfabExport gf_node | gf_nw_getNode (gf_network *n, size_t i) |
| Get the node at index i. More... | |
| _GraphfabExport gf_node * | gf_nw_getNodep (gf_network *n, size_t i) |
| Get the node at index i. More... | |
| _GraphfabExport gf_reaction | gf_nw_getRxn (gf_network *n, size_t i) |
| Get the node at index i. More... | |
| _GraphfabExport gf_reaction * | gf_nw_getRxnp (gf_network *n, size_t i) |
| Get the node at index i. More... | |
| _GraphfabExport void | gf_nw_removeRxn (gf_network *n, gf_reaction *r) |
| Remove the given reaction. More... | |
| _GraphfabExport gf_compartment | gf_nw_getCompartment (gf_network *n, size_t i) |
| Get the compartment at index i. More... | |
| _GraphfabExport gf_compartment * | gf_nw_getCompartmentp (gf_network *n, size_t i) |
| Get the node at index i. More... | |
| _GraphfabExport void | gf_nw_rebuildCurves (gf_network *n) |
| Rebuild the curves. More... | |
| _GraphfabExport void | gf_nw_recenterJunctions (gf_network *n) |
| Recenter reaction junctions. More... | |
| _GraphfabExport gf_node | gf_nw_newNode (gf_network *nw, const char *id, const char *name, gf_compartment *compartment) |
| Add a new node to the network. More... | |
| _GraphfabExport gf_node * | gf_nw_newNodep (gf_network *nw, const char *id, const char *name, gf_compartment *compartment) |
| Add a new node to the network. More... | |
| _GraphfabExport int | gf_nw_removeNode (gf_network *nw, gf_node *node) |
| Remove a node from the network. More... | |
| _GraphfabExport int | gf_nw_isLayoutSpecified (gf_network *nw) |
| Did the SBML model include layout? More... | |
| _GraphfabExport void | gf_node_setCompartment (gf_node *n, gf_compartment *c) |
| Add a node to a compartment. More... | |
| _GraphfabExport void | gf_clearNode (gf_node *n) |
| Clear the node - does not deallocate. More... | |
| _GraphfabExport void | gf_releaseNode (const gf_node *n) |
| Release the node. More... | |
| _GraphfabExport int | gf_node_isLocked (gf_node *n) |
| Is the node locked? More... | |
| _GraphfabExport void | gf_node_lock (gf_node *n) |
| Lock the node. More... | |
| _GraphfabExport void | gf_node_unlock (gf_node *n) |
| Unlock the node. More... | |
| _GraphfabExport int | gf_node_alias (gf_node *n, gf_network *m) |
| Alias the node. More... | |
| _GraphfabExport int | gf_node_isAliased (gf_node *n) |
| Is the node aliased? More... | |
| _GraphfabExport gf_point | gf_node_getCentroid (gf_node *n) |
| Get the centroid of the node. More... | |
| _GraphfabExport void | gf_node_getCentroidXY (gf_node *n, double *x, double *y) |
| Get the centroid of the node. More... | |
| _GraphfabExport void | gf_node_setCentroid (gf_node *n, gf_point p) |
| Set the centroid of the node. More... | |
| _GraphfabExport double | gf_node_getWidth (gf_node *n) |
| Get the width of the node. More... | |
| _GraphfabExport void | gf_node_setWidth (gf_node *n, double width) |
| Set the width of the node. More... | |
| _GraphfabExport double | gf_node_getHeight (gf_node *n) |
| Get the height of the node. More... | |
| _GraphfabExport void | gf_node_setHeight (gf_node *n, double height) |
| Set the height of the node. More... | |
| _GraphfabExport char * | gf_node_getID (gf_node *n) |
| Get the id, user frees memory. More... | |
| _GraphfabExport const char * | gf_node_getName (gf_node *n) |
| Get the name. More... | |
| _GraphfabExport int | gf_node_getConnectedReactions (gf_node *n, gf_network *m, unsigned int *num, gf_reaction **rxns) |
| Get a list of all reactions connected to the node. More... | |
| _GraphfabExport int | gf_node_getAttachedCurves (gf_node *n, gf_network *m, unsigned int *num, gf_curve **curves) |
| Get a list of all curves connected to the node. More... | |
| _GraphfabExport void | gf_releaseRxn (const gf_reaction *r) |
| Release the reaction. More... | |
| _GraphfabExport char * | gf_reaction_getID (gf_reaction *r) |
| Get the id, user frees memory. More... | |
| _GraphfabExport gf_point | gf_reaction_getCentroid (gf_reaction *r) |
| Get the centroid of the reaction. More... | |
| _GraphfabExport void | gf_reaction_setCentroid (gf_reaction *r, gf_point p) |
| Set the centroid of the reaction. More... | |
| _GraphfabExport size_t | gf_reaction_getNumSpec (const gf_reaction *r) |
| Get the number of species in the reaction. More... | |
| _GraphfabExport int | gf_reaction_hasSpec (const gf_reaction *r, const gf_node *n) |
| Return true if the reaction has the given species. More... | |
| _GraphfabExport gf_specRole | gf_reaction_getSpecRole (const gf_reaction *r, size_t i) |
| Get the role for spec i. More... | |
| _GraphfabExport const char * | gf_roleToStr (gf_specRole role) |
| Convert role to string. More... | |
| _GraphfabExport gf_specRole | gf_strToRole (const char *str) |
| Convert string to role. More... | |
| _GraphfabExport size_t | gf_reaction_specGeti (const gf_reaction *r, size_t i) |
| Get the index of the species in the network. More... | |
| _GraphfabExport size_t | gf_reaction_getNumCurves (const gf_reaction *r) |
| Get the number of curves in the reaction. More... | |
| _GraphfabExport gf_curve | gf_reaction_getCurve (const gf_reaction *r, size_t i) |
| Get the curve i. More... | |
| _GraphfabExport gf_curve * | gf_reaction_getCurvep (const gf_reaction *r, size_t i) |
| Get the curve i. More... | |
| _GraphfabExport void | gf_reaction_recenter (gf_reaction *r) |
| Recenter reaction centroid. More... | |
| _GraphfabExport void | gf_reaction_recalcCurveCPs (gf_reaction *r) |
| Recalculate the curve CPs, don't recenter. More... | |
| _GraphfabExport void | gf_releaseCurve (const gf_curve *c) |
| Release the curve. More... | |
| _GraphfabExport gf_specRole | gf_curve_getRole (gf_curve *c) |
| Get the id, user frees memory. More... | |
| _GraphfabExport gf_curveCP | gf_getCurveCPs (const gf_curve *c) |
| Get the CPs for the curve. More... | |
| _GraphfabExport int | gf_curve_hasArrowhead (const gf_curve *c) |
| Returns true if the given curve should be drawn with an arrowhead. More... | |
| _GraphfabExport int | gf_curve_getArrowheadVerts (const gf_curve *c, unsigned int *n, gf_point **v) |
| Get the vertices for the curve's arrowhead. More... | |
| _GraphfabExport void | gf_releaseCompartment (const gf_compartment *c) |
| Release the comp. More... | |
| _GraphfabExport char * | gf_compartment_getID (gf_compartment *c) |
| Get the id, user frees memory. More... | |
| _GraphfabExport gf_point | gf_compartment_getMinCorner (gf_compartment *c) |
| Get the "upper left" corner. More... | |
| _GraphfabExport void | gf_compartment_setMinCorner (gf_compartment *c, gf_point p) |
| Set the "upper left" corner. More... | |
| _GraphfabExport gf_point | gf_compartment_getMaxCorner (gf_compartment *c) |
| Get the "lower right" corner. More... | |
| _GraphfabExport void | gf_compartment_setMaxCorner (gf_compartment *c, gf_point p) |
| Set the "lower right" corner. More... | |
| _GraphfabExport double | gf_compartment_getWidth (gf_compartment *c) |
| Get the width of the compartment. More... | |
| _GraphfabExport double | gf_compartment_getHeight (gf_compartment *c) |
| Get the height of the compartment. More... | |
| _GraphfabExport size_t | gf_compartment_getNumElt (gf_compartment *c) |
| Get the number of species in the compartment. More... | |
| _GraphfabExport void | gf_fit_to_window (gf_layoutInfo *l, double left, double top, double right, double bottom) |
| Fit to the specified window. More... | |
| _GraphfabExport gf_transform * | gf_tf_fitToWindow (gf_layoutInfo *l, double left, double top, double right, double bottom) |
| Fit to the specified window (do not apply transform) More... | |
| _GraphfabExport CPoint | gf_tf_apply_to_point (gf_transform *tf, CPoint p) |
| Apply transform to point. More... | |
| _GraphfabExport gf_point | gf_tf_getScale (gf_transform *tf) |
| Get the scale of the transform. More... | |
| _GraphfabExport gf_point | gf_tf_getDisplacement (gf_transform *tf) |
| Get the displacement of the transform. More... | |
| _GraphfabExport gf_point | gf_tf_getPostDisplacement (gf_transform *tf) |
| Get the displacement of the transform. More... | |
| _GraphfabExport void | gf_dump_transform (gf_transform *tf) |
| Dump transform. More... | |
| _GraphfabExport void | gf_release_transform (gf_transform *tf) |
| Release transform. More... | |
| _GraphfabExport gf_canvas | gf_getCanvas (gf_layoutInfo *l) |
| Get the canvas associated with the model. More... | |
| _GraphfabExport gf_canvas * | gf_getCanvasp (gf_layoutInfo *l) |
| Get the canvas associated with the model. More... | |
| _GraphfabExport void | gf_clearCanvas (gf_canvas *c) |
| Get the canvas associated with the model. More... | |
| _GraphfabExport void | gf_releaseCanvas (gf_canvas *c) |
| Release the canvas. More... | |
| _GraphfabExport unsigned int | gf_canvGetWidth (gf_canvas *c) |
| Get the width of the canvas. More... | |
| _GraphfabExport unsigned int | gf_canvGetHeight (gf_canvas *c) |
| Get the height of the canvas. More... | |
| _GraphfabExport void | gf_canvSetWidth (gf_canvas *c, unsigned long width) |
| Set the width of the canvas. More... | |
| _GraphfabExport void | gf_canvSetHeight (gf_canvas *c, unsigned long height) |
| Set the height of the canvas. More... | |
| _GraphfabExport void | gf_getNodeCentroid (gf_layoutInfo *l, const char *id, CPoint *p) |
| Get the centroid of a node. More... | |
| _GraphfabExport int | gf_lockNodeId (gf_layoutInfo *l, const char *id) |
| Lock a node by id. More... | |
| _GraphfabExport int | gf_unlockNodeId (gf_layoutInfo *l, const char *id) |
| Unlock a node by id. More... | |
| _GraphfabExport int | gf_aliasNodeId (gf_layoutInfo *l, const char *id) |
| Create node aliases. More... | |
| _GraphfabExport void | gf_aliasNodebyDegree (gf_layoutInfo *l, const int minDegree) |
| Create node aliases by node degree. More... | |
| _GraphfabExport void | gf_randomizeLayout (gf_layoutInfo *m) |
| Randomize node positions. More... | |
| _GraphfabExport void | gf_randomizeLayout2 (gf_network *n, gf_canvas *c) |
| Randomize node positions for a given network & canvas. More... | |
| _GraphfabExport int | gf_writeSBMLwithLayout (const char *filename, gf_SBMLModel *m, gf_layoutInfo *l) |
| Write an SBML file, including layout. More... | |
| _GraphfabExport int | gf_writeSBML (const char *filename, gf_SBMLModel *m) |
| Write an SBML file (does not include layout. More... | |
| _GraphfabExport const char * | gf_getSBMLwithLayoutStr (gf_SBMLModel *m, gf_layoutInfo *l) |
| String version of writeSBMLwithLayout. More... | |
| _GraphfabExport const char * | gf_getCurrentLibraryVersion (void) |
| Returns the current version of the library. More... | |
| _GraphfabExport void | gf_free (void *x) |
| Frees the memory block at x. More... | |
| _GraphfabExport gf_point | gf_computeCubicBezierPoint (gf_curveCP *c, Real t) |
| Compute a point on the parametric curve. More... | |
| _GraphfabExport gf_point * | gf_computeCubicBezierLineIntersec (gf_curveCP *c, gf_point *line_start, gf_point *line_end) |
| Compute the intersection between a cubic Bezier and a line. More... | |
| _GraphfabExport int | gf_arrowheadStyleGetNumVerts (int style) |
| Get the number of vertices in the arrowhead polygon. More... | |
| _GraphfabExport gf_point | gf_arrowheadStyleGetVert (int style, int n) |
| Get the nth vertex of the arrow polygon. More... | |
| _GraphfabExport int | gf_arrowheadStyleIsFilled (int style) |
| Is the given style filled? More... | |
| _GraphfabExport unsigned long | gf_arrowheadNumStyles () |
| Get the number of arrowhead styles. More... | |
| _GraphfabExport void | gf_arrowheadSetStyle (gf_specRole role, int style) |
| Set the arrowhead style for a specific role type. More... | |
| _GraphfabExport int | gf_arrowheadGetStyle (gf_specRole role) |
| Get the style for the role type. More... | |
SBML layout interface in C.
| _GraphfabExport int gf_aliasNodeId | ( | gf_layoutInfo * | l, |
| const char * | id | ||
| ) |
Create node aliases.
| [in] | l | The layout info; contains the network which holds the list of nodes to be searched |
| [in] | id | The node id; used to find the correct node in the layout |
| [out] | 0 | if success |
| [out] | 1 | if failure |
| _GraphfabExport int gf_lockNodeId | ( | gf_layoutInfo * | l, |
| const char * | id | ||
| ) |
Lock a node by id.
| [in] | l | The layout info; contains the network that holds the list of nodes to be searched |
| [in] | id | The node id; used to find the correct node in the layout |
| [out] | 0 | if success |
| [out] | 1 | if failure |
| _GraphfabExport int gf_unlockNodeId | ( | gf_layoutInfo * | l, |
| const char * | id | ||
| ) |
Unlock a node by id.
| [in] | l | The layout info; contains the network with the nodes to be searched |
| [in] | id | The node id; used to find the correct node in the layout |
| [out] | 0 | if success |
| [out] | 1 | if failure |
1.8.7