typedef struct ses_path_s ses_path_t;
typedef struct ses_flow_s ses_flow_t;
typedef struct ses_info_s ses_info_t;
+typedef struct ses_edge_s ses_edge_t;
typedef struct ses_ctx_s ses_ctx_t;
+struct ses_edge_s
+{
+ scf_vector_t* conflicts;
+
+ ScfEpin* p0;
+ ScfEpin* p1;
+};
+
struct ses_flow_s
{
scf_vector_t* paths;
void ses_flow_v_neg(ses_flow_t* flow, double a, double ja);
void ses_flow_jr (ses_flow_t* flow);
+ses_edge_t* ses_edge_alloc();
+void ses_edge_free (ses_edge_t* edge);
+
ses_ctx_t* ses_ctx_alloc();
void ses_ctx_free (ses_ctx_t* ctx);
#include"ses_core.h"
+ses_edge_t* ses_edge_alloc()
+{
+ ses_edge_t* edge = calloc(1, sizeof(ses_edge_t));
+ if (!edge)
+ return NULL;
+
+ edge->conflicts = scf_vector_alloc();
+ if (!edge->conflicts) {
+ free(edge);
+ return NULL;
+ }
+
+ return edge;
+}
+
+void ses_edge_free(ses_edge_t* edge)
+{
+ if (edge) {
+ if (edge->conflicts)
+ scf_vector_free(edge->conflicts);
+
+ free(edge);
+ }
+}
+
ses_flow_t* ses_flow_alloc()
{
ses_flow_t* flow = calloc(1, sizeof(ses_flow_t));