115 if(vertices == NULL){
129 int vertex_min = INT_MAX;
134 for(i=0;i<nvertices;i++){
135 vertex_min =
hit_min(vertex_min,vertices[i]);
136 vertex_max =
hit_max(vertex_max,vertices[i]);
140 hit_malloc(inv_list_p,
int, vertex_max-vertex_min+1 );
143 int * inv_list = inv_list_p - vertex_min;
146 for(i=vertex_min+1;i<vertex_max;i++){
150 for(i=0;i<nvertices;i++){
151 inv_list[vertices[i]] = i;
161 for(i=0;i<nvertices;i++){
169 for(j=0;j<actedges;j++){
175 if(globaldst < vertex_min || globaldst > vertex_max)
continue;
177 int new_dst = inv_list[globaldst];
179 if(new_dst == -1)
continue;
225 #define VLOCAL 1 // (....0001)
226 #define VEXPAND 2 // (....0010)
230 for(vertex=0; vertex<nvertices; vertex++){
235 vertices[local_orig_vertex] =
VLOCAL;
239 int new_vertices = 0;
241 for(a=0; a<amount; a++){
244 for(vertex=0; vertex<orig_nvertices; vertex++){
252 for(nlink=first; nlink<last; nlink++){
258 if((vertices[vertex] &
VLOCAL) && (! vertices[neighbor] & VLOCAL)){
273 for(vertex=0; vertex<orig_nvertices; vertex++){
283 int nvlist = new_vertices + nvertices;
292 int vertex_index = nvertices;
293 for(vertex=0; vertex<orig_nvertices; vertex++){
295 if(vertices[vertex] >
VLOCAL){
322 hit_errInternal(__func__,
"Incorrect shape Type.",
"Expected CSR Shape", __FILE__, __LINE__);
353 int local_x, nelems_x;
357 if( local_x != -1 )
return;
574 memcpy(dst,src, (
size_t) nCols *
sizeof(
idxtype));
void hit_nameListCreateInvNames(HitNameList *list)
#define hit_cShapeAdjncy(shape)
#define hit_cShapeNEdgesFromVertex(s, vertex)
#define hit_cShapeCoordToLocal(s, dim, elem)
#define hit_cShapeColumnIterator(var, shape, row)
void hit_nameListClone(HitNameList *dst, HitNameList *src)
#define hit_cShapeNedges(shape)
void hit_nameListAdd(HitNameList *list, int x)
int hit_nameListName2Index(HitNameList list, int name)
HitShape hit_csrShapeMatrix(int n, int m, int nz)
#define hit_cShapeNColsRow(s, row)
#define hit_cShapeLastColumn(s, row)
void hit_cShapeCreateInvNames(HitShape *shape)
#define hit_calloc(ptr, type, nmemb)
HitShape hit_csrShape(int nvertices, int nedges)
#define hit_cShapeEdgeIterator(var, shape, vertex)
void hit_nameListFree(HitNameList list)
#define hit_cShapeCard(shape, dim)
void hit_cShapeAddColumn(HitShape *shape, int y)
void hit_cShapeSelectRows_compress_columns(HitShape *shape)
void hit_nameListCreate(HitNameList *list, int nelems)
#define hit_cShapeCoordToGlobal(s, dim, elem)
#define hit_cShapeXadj(shape)
HitShape hit_cShapeExpand(HitShape shape, HitShape original, int amount)
#define hit_cShapeNvertices(shape)
#define hit_cShapeVertexToLocal(s, vertex)
Hitmap functions to allocate memory.
#define hit_cShapeNameList(shape, dim)
#define hit_malloc(ptr, type, nmemb)
HitShape hit_cShapeSelect(HitShape s, int nvertices, int *vertices)
HitShape HIT_CSR_SHAPE_NULL
HitShape hit_cShapeSelectRows(HitShape shape, int n, int *names)
void hit_cShapeFree(HitShape shape)
HitNameList HIT_NAMELIST_NULL
#define hit_realloc(ptr, type, nmemb)
#define hit_cShapeVertexToGlobal(s, vertex)
#define hit_cShapeFistColumn(s, row)
void hit_cShapeAddEmptyRow_or_Vertex(HitShape *shape, int x, int mode)
#define hit_errInternal(routine, text, extraParam, file, numLine)
int hit_cShapeElemExists(HitShape shape, int x, int y)
void hit_cShapeAddElem_or_Edge(HitShape *shape, int x, int y, int mode)