Hitmap 1.3
|
#include <hit_shape.h>
/* 1.3 CShape data structure ADT for sparse domains in CSR format.
A sparse CSR shape represents the index-domain of a graph, or a sparse matrix in CSR format (Compressed Sparse Row matrix). Standard CSR format can only represent a two dimensional space.
Definition at line 124 of file hit_shape.h.
void hit_cShapeAddEmptyRow_or_Vertex | ( | HitShape * | shape, |
int | x, | ||
int | mode | ||
) |
Adds a empty row in a matrix or a vertex in a graph.
shape | The CShape pointer of the graph. |
x | A row/vertex (in global coordinates). |
Definition at line 349 of file hit_cshape.c.
void hit_cShapeCreateInvNames | ( | HitShape * | shape | ) |
Creates the inverse translation list of vertex names. Create the list for both dimensions. This list is used to speedup the translation operation from global to local names. This function will increase the size of the shape.
shape | A pointer to HitCShape. |
Definition at line 318 of file hit_cshape.c.
Expand a CSR Sparse Shape adding new vertices of the original graph.
shape | The shape to expand. |
original | The original shape. |
amount | The number of times that the expand algorithm is invoked. |
Definition at line 208 of file hit_cshape.c.
void hit_cShapeFree | ( | HitShape | shape | ) |
Hit CSR Shape destructor.
shape | A Hit CSR Shape. |
Definition at line 99 of file hit_cshape.c.
Vertex reorder. This function transform the local domain of a sparse shape according to a new order of global vertex names.
s | A CShape. |
newNames | An array with the new order of vertices using the global domain. |
Sparse Shape selection. Makes a sparse shape with the selected vertices of the source shape.
s | The source sparse shape. |
nvertices | The number of selected vertices. |
vertices | An array with the selected vertices in the global domain. |
Definition at line 109 of file hit_cshape.c.
Sparse Shape Matrix selection. Makes a sparse shape with the selected rows of the source shape.
s | The source sparse shape. |
n | The number of selected rows. |
names | Selected name list in global coordinates. |
Definition at line 542 of file hit_cshape.c.
HitShape hit_csrShape | ( | int | nvertices, |
int | nedges | ||
) |
/* 1. Hit CSR Sparse Shape generating functions Sparse CSR graph shape constructor.
nvertices | number of vertices. |
nedges | number of edges. |
Definition at line 47 of file hit_cshape.c.