Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-scatter
Commits
e50b89be
"tutorial/vscode:/vscode.git/clone" did not exist on "0a50711f1870502c21cd131049b8610214dff3ac"
Commit
e50b89be
authored
Dec 23, 2017
by
rusty1s
Browse files
fixed template
parent
722b7cb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
26 deletions
+27
-26
docs/source/_figures/add.tex
docs/source/_figures/add.tex
+5
-14
docs/source/_figures/template.tex
docs/source/_figures/template.tex
+22
-12
No files found.
docs/source/_figures/add.tex
View file @
e50b89be
\documentclass
[class=minimal]
{
standalone
}
\def\indices
{{
0, 0, 1, 0, 2, 2, 3, 3
}}
\def\inputs
{{
5, 1, 7, 2, 3, 2, 1, 3
}}
\usepackage
{
tikz
}
\def\outputs
{{
8, 7, 5, 4
}}
\usetikzlibrary
{
shapes.geometric
}
\def\colors
{{
"cyan", "orange", "olive", "magenta"
}}
\newcommand
{
\tiny
}
[1]
{
\scalebox
{
0.45
}{
#1
}}
\def\index
{{
0, 0, 1, 0, 2, 2, 3, 3
}}
\def\input
{{
5, 1, 7, 2, 3, 2, 1, 3
}}
\def\output
{{
8, 7, 5, 4
}}
\def\color
{{
"cyan", "orange", "olive", "magenta"
}}
\def\numberInputs
{
7
}
\def\numberInputs
{
7
}
\def\numberOutputs
{
3
}
\def\numberOutputs
{
3
}
\def\operation
{
+
}
\def\operation
{
add
}
\begin{document}
\input
{
template
}
\input
{
template
}
\end{document}
docs/source/_figures/template.tex
View file @
e50b89be
\documentclass
[class=minimal]
{
standalone
}
\usepackage
{
tikz
}
\usetikzlibrary
{
shapes.geometric
}
\newcommand
{
\tiny
}
[1]
{
\scalebox
{
0.45
}{
#1
}}
\begin{document}
\begin{tikzpicture}
\begin{tikzpicture}
\tikzstyle
{
title
}
=[text width=1.1cm, inner sep=0pt]
\tikzstyle
{
title
}
=[text width=1.1cm, inner sep=0pt]
\tikzstyle
{
square
}
=[rectangle, draw, minimum width=0.5cm, minimum height=0.5cm, inner sep=0pt, fill opacity=0.5, text opacity=1]
\tikzstyle
{
square
}
=[rectangle, draw, minimum width=0.5cm, minimum height=0.5cm, inner sep=0pt, fill opacity=0.5, text opacity=1]
\tikzstyle
{
op
}
=[ellipse, draw, inner sep=
-1
pt, minimum height=8pt, minimum width=8pt]
\tikzstyle
{
op
}
=[ellipse, draw, inner sep=
0
pt, minimum height=8pt, minimum width=8pt]
\tikzstyle
{
edge
1
}
=[->]
\tikzstyle
{
edge
}
=[->]
\tikzstyle
{
edge2
}
=[out=-90, in=90, looseness=0.85]
\tikzstyle
{
round
}
=[out=-90, in=90, looseness=0.85]
\node
[title]
at (-0.8, 2.2)
{
index
}
;
\node
[title]
at (-0.8, 2.2)
{
index
}
;
\node
[title]
at (-0.8, 1.5)
{
input
}
;
\node
[title]
at (-0.8, 1.5)
{
input
}
;
\foreach
\i
in
{
0,...,
\numberInputs
}
{
\foreach
\i
in
{
0,...,
\numberInputs
}
{
\pgfmathparse
{
\ind
ex
[\i]
}
\let\idx\pgfmathresult
\pgfmathparse
{
\ind
ices
[\i]
}
\let\idx\pgfmathresult
\pgfmathparse
{
\input
[\i]
}
\let\in\pgfmathresult
\pgfmathparse
{
\input
s
[\i]
}
\let\in\pgfmathresult
\pgfmathparse
{
\color
[\idx]
}
\let\co\pgfmathresult
\pgfmathparse
{
\color
s
[\idx]
}
\let\co\pgfmathresult
\node
[square]
(index
\i
) at (
\i
* 0.5, 2.2)
{
\idx
}
;
\node
[square]
(index
\i
) at (
\i
* 0.5, 2.2)
{
\idx
}
;
\node
[square, fill=\co]
(input
\i
) at (
\i
* 0.5, 1.5)
{
\in
}
;
\node
[square, fill=\co]
(input
\i
) at (
\i
* 0.5, 1.5)
{
\in
}
;
\draw
[edge
1
]
(index
\i
) -- (input
\i
);
\draw
[edge]
(index
\i
) -- (input
\i
);
}
}
\node
[title]
at (-0.8, 0.0)
{
output
}
;
\node
[title]
at (-0.8, 0.0)
{
output
}
;
\foreach
\i
in
{
0,...,
\numberOutputs
}
{
\foreach
\i
in
{
0,...,
\numberOutputs
}
{
\pgfmathparse
{
\output
[\i]
}
\let\out\pgfmathresult
\pgfmathparse
{
\output
s
[\i]
}
\let\out\pgfmathresult
\pgfmathparse
{
\color
[\i]
}
\let\co\pgfmathresult
\pgfmathparse
{
\color
s
[\i]
}
\let\co\pgfmathresult
\def
\x
{
(
\numberInputs
-
\numberOutputs
) * 0.25 +
\i
* 0.5
}
\def
\x
{
(
\numberInputs
-
\numberOutputs
) * 0.25 +
\i
* 0.5
}
\node
[op]
(op
\i
) at (
{
\x
}
, 0.6)
{
\tiny
{
\operation
}}
;
\node
[op]
(op
\i
) at (
{
\x
}
, 0.6)
{
\tiny
{
\operation
}}
;
\node
[square, fill=\co]
(output
\i
) at (
{
\x
}
, 0.0)
{
\out
}
;
\node
[square, fill=\co]
(output
\i
) at (
{
\x
}
, 0.0)
{
\out
}
;
\draw
[edge
1
]
(op
\i
) -- (output
\i
);
\draw
[edge]
(op
\i
) -- (output
\i
);
}
}
\foreach
\i
in
{
0,...,
\numberInputs
}
{
\foreach
\i
in
{
0,...,
\numberInputs
}
{
\pgfmathparse
{
\ind
ex
[\i]
}
\let\idx\pgfmathresult
\pgfmathparse
{
\ind
ices
[\i]
}
\let\idx\pgfmathresult
\draw
[edge
1
]
(input
\i
) to[
edge2
] (op
\idx
);
\draw
[edge]
(input
\i
) to[
round
] (op
\idx
);
}
}
\end{tikzpicture}
\end{tikzpicture}
\end{document}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment