tlds
Transactional Operations for Linked Data Structures
|
#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"
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_t * | allocNode (long id) |
static void | freeNode (net_node_t *nodePtr) |
net_t * | net_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_t * | net_getParentIdListPtr (net_t *netPtr, long id) |
list_t * | net_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 enum net_node_mark net_node_mark_t |
typedef struct net_node net_node_t |
enum net_node_mark |
|
static |
|
static |
|
static |
|
static |
|
static |
net_t* net_alloc | ( | long | numNode | ) |
void net_applyOperation | ( | net_t * | netPtr, |
operation_t | op, | ||
long | fromId, | ||
long | toId | ||
) |
bool_t net_findAncestors | ( | 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 | ||
) |
void net_free | ( | net_t * | netPtr | ) |
void net_generateRandomEdges | ( | net_t * | netPtr, |
long | maxNumParent, | ||
long | percentParent, | ||
random_t * | randomPtr | ||
) |
bool_t net_isPath | ( | net_t * | netPtr, |
long | fromId, | ||
long | toId, | ||
bitmap_t * | visitedBitmapPtr, | ||
queue_t * | workQueuePtr | ||
) |
|
static |
|
static |
|
static |
|
static |
void TMnet_applyOperation | ( | TM_ARGDECL net_t * | netPtr, |
operation_t | op, | ||
long | fromId, | ||
long | toId | ||
) |
bool_t TMnet_findAncestors | ( | TM_ARGDECL net_t * | netPtr, |
long | id, | ||
bitmap_t * | ancestorBitmapPtr, | ||
queue_t * | workQueuePtr | ||
) |
bool_t TMnet_findDescendants | ( | TM_ARGDECL net_t * | netPtr, |
long | id, | ||
bitmap_t * | descendantBitmapPtr, | ||
queue_t * | workQueuePtr | ||
) |
bool_t TMnet_hasEdge | ( | TM_ARGDECL net_t * | netPtr, |
long | fromId, | ||
long | toId | ||
) |
bool_t TMnet_isPath | ( | TM_ARGDECL net_t * | netPtr, |
long | fromId, | ||
long | toId, | ||
bitmap_t * | visitedBitmapPtr, | ||
queue_t * | workQueuePtr | ||
) |
|
static |
|
static |
comparator_t net_compareid& compareId |