summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikz-nef/README.md
blob: f0dec40afef49bbe0586aaa603974aea41d41dd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# tikz-nef
The *nef* TikZ library provides predefined styles and shapes to create diagrams
 for neural networks constructed with the methods of the Neural Engineering
 Framework (NEF) [1].

![Gated difference integrator example.](https://raw.githubusercontent.com/jgosmann/tikz-nef/master/example-net.png)

The example above was generated with this code:

```latex
\begin{tikzpicture}[nef]
    \graph {
        input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext];
        integrator -> [bend right, "$-1$"] gate;
        integrator -> [recurrent] integrator;
        store -> [inhibit] gate;
    };
\end{tikzpicture}
```

The following styles are supported:

* ea: ensemble array
* ens: ensemble
* ext: external input or output
* inhibt: inhibitory connection
* net: network
* pnode: pass-through node
* rect: rectification ensemble
* recurrent: recurrent connection

## Installation

While this package is not available in [CTAN](https://ctan.org/) follow these
instruction:

1. Create the required installation directory (if not already existing):
   `mkdir -p "$(kpsewhich -var-value TEXMFHOME)/tex/generic"`
2. `cd "$(kpsewhich -var-value TEXMFHOME)/tex/generic"`
3. `git clone https://github.com/jgosmann/tikz-nef.git`

## References

[1]: Chris Eliasmith and Charles H. Anderson. Neural engineering: Computation,
     representation, and dynamics in neurobiological systems. MIT Press,
     Cambridge, MA, 2003.