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