#include <sparse/IntStack.h>
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* binary heap code.
Caution: items inserted should be kept untouched, e.g., the value of the item should be kepted unchanged while the heap is still in use!
To change the valud of am item, use BinaryHeap_reset
void BinaryHeap_print(BinaryHeap h, void (*pnt)(void*));
void BinaryHeap_sanity_check(BinaryHeap h);
+
+#ifdef __cplusplus
+}
+#endif
#include <cgraph.h>
#include <sparse/SparseMatrix.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum {COLOR_SCHEME_NONE, COLOR_SCHEME_PASTEL = 1, COLOR_SCHEME_BLUE_YELLOW, COLOR_SCHEME_WHITE_RED, COLOR_SCHEME_GREY_RED, COLOR_SCHEME_PRIMARY, COLOR_SCHEME_SEQUENTIAL_SINGLEHUE_RED, COLOR_SCHEME_ADAM, COLOR_SCHEME_ADAM_BLEND, COLOR_SCHEME_SEQUENTIAL_SINGLEHUE_RED_LIGHTER, COLOR_SCHEME_GREY};
extern void initDotIO (Agraph_t *g);
void attached_clustering(Agraph_t* g, int maxcluster, int clustering_scheme);
int Import_dot_splines(Agraph_t* g, int *ne, char ***xsplines);
+
+#ifdef __cplusplus
+}
+#endif
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* last in first out integer stack */
struct IntStack_struct{
size_t last; // position of the last element, If empty, last = SIZE_MAX
int IntStack_pop(IntStack s, int *flag);/* remove the last item. If none exist, flag = -1, and return -1. */
void IntStack_print(IntStack s);
+
+#ifdef __cplusplus
+}
+#endif
#pragma once
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct SingleLinkedList_struct* SingleLinkedList;
struct SingleLinkedList_struct {
DoubleLinkedList DoubleLinkedList_get_next(DoubleLinkedList l);
void DoubleLinkedList_delete_element(DoubleLinkedList l, void (*linklist_deallocator)(void*), DoubleLinkedList *head);
+
+#ifdef __cplusplus
+}
+#endif
#include <sparse/LinkedList.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct QuadTree_struct *QuadTree;
struct QuadTree_struct {
void QuadTree_get_nearest(QuadTree qt, double *x, double *ymin, int *imin, double *min, int *flag);
QuadTree QuadTree_new_in_quadrant(int dim, double *center, double width, int max_level, int i);
+
+#ifdef __cplusplus
+}
+#endif
#include <sparse/general.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define SYMMETRY_EPSILON 0.0000001
enum {FORMAT_CSC, FORMAT_CSR, FORMAT_COORD};
enum {UNMASKED = -10, MASKED = 1};
#define SparseMatrix_known_undirected(A) test_flag((A)->property, MATRIX_UNDIRECTED)
#define SparseMatrix_known_symmetric(A) test_flag((A)->property, MATRIX_SYMMETRIC)
#define SparseMatrix_known_strucural_symmetric(A) test_flag((A)->property, MATRIX_PATTERN_SYMMETRIC)
+
+#ifdef __cplusplus
+}
+#endif
#pragma once
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Multilevel_Modularity_Clustering_struct *Multilevel_Modularity_Clustering;
struct Multilevel_Modularity_Clustering_struct {
*/
void modularity_clustering(SparseMatrix A, int inplace, int maxcluster, int use_value,
int *nclusters, int **assignment, double *modularity, int *flag);
+
+#ifdef __cplusplus
+}
+#endif
#pragma once
#include "stdio.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum {MAX_COLOR = 1001};
enum {npalettes = 265};
extern float palette_sequential_singlehue_red_lighter[1001][3];
extern float palette_adam_blend[1001][3];
extern float palette_adam[11][3];
+
+#ifdef __cplusplus
+}
+#endif
#include <color.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type);
void rgb2hex(float r, float g, float b, char *cstring, const char* opacity);
/* dimension of cstring must be >=7 */
char* hue2rgb(double hue, char *color);
+
+#ifdef __cplusplus
+}
+#endif
#include <common/memory.h>
#endif /* STANDALONE */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define set_flag(a, flag) ((a)=((a)|(flag)))
#define test_flag(a, flag) ((a)&(flag))
#define clear_flag(a, flag) ((a) &=(~(flag)))
char *strip_dir(char *s);
void scale_to_box(double xmin, double ymin, double xmax, double ymax, int n, int dim, double *x);
+
+#ifdef __cplusplus
+}
+#endif
#pragma once
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct Multilevel_MQ_Clustering_struct *Multilevel_MQ_Clustering;
struct Multilevel_MQ_Clustering_struct {
*/
void mq_clustering(SparseMatrix A, int inplace, int maxcluster, int use_value,
int *nclusters, int **assignment, double *mq, int *flag);
+
+#ifdef __cplusplus
+}
+#endif
#pragma once
#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct vector_struct {
int maxlen;
int len;
int Vector_get_length(Vector v);
Vector Vector_reset(Vector v, void *stuff, int i);
+
+#ifdef __cplusplus
+}
+#endif