Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
sgd.h
Go to the documentation of this file.
1#pragma once
2
3#include <cgraph/bitarray.h>
4#include <stddef.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct term_sgd {
11 int i, j;
12 float d, w;
14
15typedef struct graph_sgd {
16 size_t n; // number of nodes
17 size_t *sources; // index of first edge in *targets for each node (length n+1)
18 bitarray_t pinneds; // whether a node is fixed or not
19
20 size_t *targets; // index of targets for each node (length sources[n])
21 float *weights; // weights of edges (length sources[n])
23
24extern void sgd(graph_t *, int);
25
26#ifdef __cplusplus
27}
28#endif
API for compacted arrays of booleans.
void sgd(graph_t *, int)
Definition sgd.c:147
graph or subgraph
Definition cgraph.h:425
size_t * targets
Definition sgd.h:20
size_t n
Definition sgd.h:16
bitarray_t pinneds
Definition sgd.h:18
float * weights
Definition sgd.h:21
size_t * sources
Definition sgd.h:17
Definition sgd.h:10
float d
Definition sgd.h:12
int j
Definition sgd.h:11
float w
Definition sgd.h:12
int i
Definition sgd.h:11