src/sat/bsat/satVec.h File Reference

#include <stdlib.h>
Include dependency graph for satVec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  veci_t
struct  vecp_t

Typedefs

typedef struct veci_t veci
typedef struct vecp_t vecp

Functions

static void veci_new (veci *v)
static void veci_delete (veci *v)
static int * veci_begin (veci *v)
static int veci_size (veci *v)
static void veci_resize (veci *v, int k)
static void veci_push (veci *v, int e)
static void vecp_new (vecp *v)
static void vecp_delete (vecp *v)
static void ** vecp_begin (vecp *v)
static int vecp_size (vecp *v)
static void vecp_resize (vecp *v, int k)
static void vecp_push (vecp *v, void *e)

Typedef Documentation

typedef struct veci_t veci

Definition at line 33 of file satVec.h.

typedef struct vecp_t vecp

Definition at line 61 of file satVec.h.


Function Documentation

static int* veci_begin ( veci v  )  [inline, static]

Definition at line 42 of file satVec.h.

00042 { return v->ptr;  }

static void veci_delete ( veci v  )  [inline, static]

Definition at line 41 of file satVec.h.

00041 { free(v->ptr);   }

static void veci_new ( veci v  )  [inline, static]

Definition at line 35 of file satVec.h.

00035                                       {
00036     v->size = 0;
00037     v->cap  = 4;
00038     v->ptr  = (int*)malloc(sizeof(int)*v->cap);
00039 }

static void veci_push ( veci v,
int  e 
) [inline, static]

Definition at line 45 of file satVec.h.

00046 {
00047     if (v->size == v->cap) {
00048         int newsize = v->cap * 2;//+1;
00049         v->ptr = (int*)realloc(v->ptr,sizeof(int)*newsize);
00050         v->cap = newsize; }
00051     v->ptr[v->size++] = e;
00052 }

static void veci_resize ( veci v,
int  k 
) [inline, static]

Definition at line 44 of file satVec.h.

00044 { v->size = k;    } // only safe to shrink !!

static int veci_size ( veci v  )  [inline, static]

Definition at line 43 of file satVec.h.

00043 { return v->size; }

static void** vecp_begin ( vecp v  )  [inline, static]

Definition at line 70 of file satVec.h.

00070 { return v->ptr;  }

static void vecp_delete ( vecp v  )  [inline, static]

Definition at line 69 of file satVec.h.

00069 { free(v->ptr);   }

static void vecp_new ( vecp v  )  [inline, static]

Definition at line 63 of file satVec.h.

00063                                       {
00064     v->size = 0;
00065     v->cap  = 4;
00066     v->ptr  = (void**)malloc(sizeof(void*)*v->cap);
00067 }

static void vecp_push ( vecp v,
void *  e 
) [inline, static]

Definition at line 73 of file satVec.h.

00074 {
00075     if (v->size == v->cap) {
00076         int newsize = v->cap * 2;//+1;
00077         v->ptr = (void**)realloc(v->ptr,sizeof(void*)*newsize);
00078         v->cap = newsize; }
00079     v->ptr[v->size++] = e;
00080 }

static void vecp_resize ( vecp v,
int  k 
) [inline, static]

Definition at line 72 of file satVec.h.

00072 { v->size = k;    } // only safe to shrink !!

static int vecp_size ( vecp v  )  [inline, static]

Definition at line 71 of file satVec.h.

00071 { return v->size; }


Generated on Tue Jan 5 12:19:37 2010 for abc70930 by  doxygen 1.6.1