Graphviz 13.1.3~dev.20250813.2319
Loading...
Searching...
No Matches
sgd.h
Go to the documentation of this file.
1#pragma once
2
3#include <stddef.h>
4#include <util/bitarray.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
11#define INTERNAL __attribute__((visibility("hidden")))
12#else
13#define INTERNAL /* nothing */
14#endif
15
16typedef struct {
17 int i, j;
18 float d, w;
19} term_sgd;
20
21typedef struct graph_sgd {
22 size_t n; // number of nodes
23 size_t *sources; // index of first edge in *targets for each node (length n+1)
24 bitarray_t pinneds; // whether a node is fixed or not
25
26 size_t *targets; // index of targets for each node (length sources[n])
27 float *weights; // weights of edges (length sources[n])
29
30INTERNAL void sgd(graph_t *, int);
31
32#undef INTERNAL
33
34#ifdef __cplusplus
35}
36#endif
API for compacted arrays of booleans.
#define INTERNAL
Definition sgd.h:13
INTERNAL void sgd(graph_t *, int)
Definition sgd.c:140
graph or subgraph
Definition cgraph.h:424
size_t * targets
Definition sgd.h:26
size_t n
Definition sgd.h:22
bitarray_t pinneds
Definition sgd.h:24
float * weights
Definition sgd.h:27
size_t * sources
Definition sgd.h:23
Definition sgd.h:16
float d
Definition sgd.h:18
int i
Definition sgd.h:17