tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
net.c File Reference
#include <assert.h>
#include <stdlib.h>
#include "bitmap.h"
#include "learner.h"
#include "list.h"
#include "net.h"
#include "operation.h"
#include "queue.h"
#include "tm.h"
#include "vector.h"
Include dependency graph for net.c:

Classes

struct  net_node
 
struct  net
 

Typedefs

typedef enum net_node_mark net_node_mark_t
 
typedef struct net_node net_node_t
 

Enumerations

enum  net_node_mark { NET_NODE_MARK_INIT = 0, NET_NODE_MARK_DONE = 1, NET_NODE_MARK_TEST = 2 }
 

Functions

static long compareId (const void *aPtr, const void *bPtr)
 
static long TMcompareId (TM_ARGDECL const void *aPtr, const void *bPtr)
 
static net_node_tallocNode (long id)
 
static void freeNode (net_node_t *nodePtr)
 
net_tnet_alloc (long numNode)
 
void net_free (net_t *netPtr)
 
static void insertEdge (net_t *netPtr, long fromId, long toId)
 
static void TMinsertEdge (TM_ARGDECL net_t *netPtr, long fromId, long toId)
 
static void removeEdge (net_t *netPtr, long fromId, long toId)
 
static void TMremoveEdge (TM_ARGDECL net_t *netPtr, long fromId, long toId)
 
static void reverseEdge (net_t *netPtr, long fromId, long toId)
 
static void TMreverseEdge (TM_ARGDECL net_t *netPtr, long fromId, long toId)
 
void net_applyOperation (net_t *netPtr, operation_t op, long fromId, long toId)
 
void TMnet_applyOperation (TM_ARGDECL net_t *netPtr, operation_t op, long fromId, long toId)
 
bool_t net_hasEdge (net_t *netPtr, long fromId, long toId)
 
bool_t TMnet_hasEdge (TM_ARGDECL net_t *netPtr, long fromId, long toId)
 
bool_t net_isPath (net_t *netPtr, long fromId, long toId, bitmap_t *visitedBitmapPtr, queue_t *workQueuePtr)
 
bool_t TMnet_isPath (TM_ARGDECL net_t *netPtr, long fromId, long toId, bitmap_t *visitedBitmapPtr, queue_t *workQueuePtr)
 
static bool_t isCycle (vector_t *nodeVectorPtr, net_node_t *nodePtr)
 
bool_t net_isCycle (net_t *netPtr)
 
list_tnet_getParentIdListPtr (net_t *netPtr, long id)
 
list_tnet_getChildIdListPtr (net_t *netPtr, long id)
 
bool_t net_findAncestors (net_t *netPtr, long id, bitmap_t *ancestorBitmapPtr, queue_t *workQueuePtr)
 
bool_t TMnet_findAncestors (TM_ARGDECL net_t *netPtr, long id, bitmap_t *ancestorBitmapPtr, queue_t *workQueuePtr)
 
bool_t net_findDescendants (net_t *netPtr, long id, bitmap_t *descendantBitmapPtr, queue_t *workQueuePtr)
 
bool_t TMnet_findDescendants (TM_ARGDECL net_t *netPtr, long id, bitmap_t *descendantBitmapPtr, queue_t *workQueuePtr)
 
void net_generateRandomEdges (net_t *netPtr, long maxNumParent, long percentParent, random_t *randomPtr)
 

Variables

comparator_t net_compareid & compareId
 

Typedef Documentation

typedef struct net_node net_node_t

Enumeration Type Documentation

Enumerator
NET_NODE_MARK_INIT 
NET_NODE_MARK_DONE 
NET_NODE_MARK_TEST 

Function Documentation

static net_node_t* allocNode ( long  id)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static long compareId ( const void *  aPtr,
const void *  bPtr 
)
static
static void freeNode ( net_node_t nodePtr)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void insertEdge ( net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static bool_t isCycle ( vector_t nodeVectorPtr,
net_node_t nodePtr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

net_t* net_alloc ( long  numNode)

Here is the call graph for this function:

Here is the caller graph for this function:

void net_applyOperation ( net_t netPtr,
operation_t  op,
long  fromId,
long  toId 
)

Here is the call graph for this function:

bool_t net_findAncestors ( net_t netPtr,
long  id,
bitmap_t ancestorBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

bool_t net_findDescendants ( net_t netPtr,
long  id,
bitmap_t descendantBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

void net_free ( net_t netPtr)

Here is the call graph for this function:

Here is the caller graph for this function:

void net_generateRandomEdges ( net_t netPtr,
long  maxNumParent,
long  percentParent,
random_t randomPtr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

list_t* net_getChildIdListPtr ( net_t netPtr,
long  id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

list_t* net_getParentIdListPtr ( net_t netPtr,
long  id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t net_hasEdge ( net_t netPtr,
long  fromId,
long  toId 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t net_isCycle ( net_t netPtr)

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t net_isPath ( net_t netPtr,
long  fromId,
long  toId,
bitmap_t visitedBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void removeEdge ( net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void reverseEdge ( net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static long TMcompareId ( TM_ARGDECL const void *  aPtr,
const void *  bPtr 
)
static
static void TMinsertEdge ( TM_ARGDECL net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void TMnet_applyOperation ( TM_ARGDECL net_t netPtr,
operation_t  op,
long  fromId,
long  toId 
)

Here is the call graph for this function:

bool_t TMnet_findAncestors ( TM_ARGDECL net_t netPtr,
long  id,
bitmap_t ancestorBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

bool_t TMnet_findDescendants ( TM_ARGDECL net_t netPtr,
long  id,
bitmap_t descendantBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

bool_t TMnet_hasEdge ( TM_ARGDECL net_t netPtr,
long  fromId,
long  toId 
)

Here is the call graph for this function:

bool_t TMnet_isPath ( TM_ARGDECL net_t netPtr,
long  fromId,
long  toId,
bitmap_t visitedBitmapPtr,
queue_t workQueuePtr 
)

Here is the call graph for this function:

static void TMremoveEdge ( TM_ARGDECL net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void TMreverseEdge ( TM_ARGDECL net_t netPtr,
long  fromId,
long  toId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

comparator_t net_compareid& compareId