FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_graph.c File Reference

Graph Utility (implementation) More...

#include "hecmw_graph.h"
#include "hecmw_varray_int.h"
#include "hecmw_malloc.h"
#include "hecmw_config.h"
#include "hecmw_util.h"
#include <stdio.h>
#include <errno.h>
Include dependency graph for hecmw_graph.c:

Go to the source code of this file.

Functions

int HECMW_graph_init (struct hecmw_graph *graph)
 
int HECMW_graph_init_with_arrays (struct hecmw_graph *graph, int num_vertex, int *edge_index, int *edge_item)
 
void HECMW_graph_finalize (struct hecmw_graph *graph)
 
void HECMW_graph_setNumVertex (struct hecmw_graph *graph, int num_vertex)
 
int HECMW_graph_addEdge (struct hecmw_graph *graph, int vert1, int vert2)
 
void HECMW_graph_print (const struct hecmw_graph *graph, FILE *fp)
 
int HECMW_graph_getNumVertex (const struct hecmw_graph *graph)
 
int HECMW_graph_getNumEdge (const struct hecmw_graph *graph)
 
const int * HECMW_graph_getEdgeIndex (const struct hecmw_graph *graph)
 
const int * HECMW_graph_getEdgeItem (const struct hecmw_graph *graph)
 
int HECMW_graph_degeneGraph (struct hecmw_graph *graph, const struct hecmw_graph *refgraph, int num_part, const int *parttab)
 

Detailed Description

Graph Utility (implementation)

Author
Kazuya Goto (VINAS)
Date
Feb 6, 2012

Definition in file hecmw_graph.c.

Function Documentation

◆ HECMW_graph_addEdge()

int HECMW_graph_addEdge ( struct hecmw_graph graph,
int  vert1,
int  vert2 
)

Add edge.

Return values
HECMW_SUCCESSnormal return
HECMW_ERRORfailed to add edge

Definition at line 114 of file hecmw_graph.c.

◆ HECMW_graph_degeneGraph()

int HECMW_graph_degeneGraph ( struct hecmw_graph graph,
const struct hecmw_graph refgraph,
int  num_part,
const int *  parttab 
)

Degenerate graph.

Return values
HECMW_SUCCESSnormal return
HECMW_ERRORfailed to create degenerated graph

Definition at line 160 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_finalize()

void HECMW_graph_finalize ( struct hecmw_graph graph)

Finalize.

Definition at line 97 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_getEdgeIndex()

const int* HECMW_graph_getEdgeIndex ( const struct hecmw_graph graph)

Get edge index array.

Returns
head pointer of the edge index array

Definition at line 152 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_getEdgeItem()

const int* HECMW_graph_getEdgeItem ( const struct hecmw_graph graph)

Get edge item array.

Returns
head pointer of the edge item array

Definition at line 156 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_getNumEdge()

int HECMW_graph_getNumEdge ( const struct hecmw_graph graph)

Get number of edges (doubled due to both-ways).

Returns
number of edges

Definition at line 148 of file hecmw_graph.c.

◆ HECMW_graph_getNumVertex()

int HECMW_graph_getNumVertex ( const struct hecmw_graph graph)

Get number of vertices.

Returns
number of vertices

Definition at line 144 of file hecmw_graph.c.

◆ HECMW_graph_init()

int HECMW_graph_init ( struct hecmw_graph graph)

Initialize.

Return values
HECMW_SUCCESSnormal return
HECMW_ERRORfailed to initialize

Definition at line 55 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_init_with_arrays()

int HECMW_graph_init_with_arrays ( struct hecmw_graph graph,
int  num_vertex,
int *  edge_index,
int *  edge_item 
)

Initialize with given index and item arrays.

Return values
HECMW_SUCCESSnormal return
HECMW_ERRORfailed to initialize

Definition at line 73 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_print()

void HECMW_graph_print ( const struct hecmw_graph graph,
FILE *  fp 
)

Print graph.

Definition at line 123 of file hecmw_graph.c.

Here is the call graph for this function:

◆ HECMW_graph_setNumVertex()

void HECMW_graph_setNumVertex ( struct hecmw_graph graph,
int  num_vertex 
)

Set number of vertices.

Definition at line 106 of file hecmw_graph.c.

Here is the call graph for this function: