summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex46
1 files changed, 14 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex b/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex
index 9b42c78ed5e..6b4351887a4 100644
--- a/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex
+++ b/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex
@@ -1,6 +1,6 @@
% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%
-% Sa-TikZ package v0.6 * * (C) Claudio Fiandrino 2012-2013
+% Sa-TikZ package v0.7 * * (C) Claudio Fiandrino 2012-2014
%
% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -14,22 +14,6 @@
% UTILITY
% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-% PGFMATHISODD: 1 = true, 0 = false
-%
-% #1: number to be checked
-% #2: output macro
-%
-% example:
-%% \pgfmathisodd{32}{output}
-%% \ifnum\output=1
-%% \node{\output};
-%% \fi
-\newcommand*{\pgfmathisodd}[2]{
- \pgfmathparse{mod(#1,2)}
- \pgfmathtruncatemacro\res\pgfmathresult
- \global\expandafter\edef\csname #2\endcsname{\res}
-}
-
% PGFMATHOMEGAROTATION:
%
% #1: number to be rotated
@@ -37,8 +21,8 @@
% #3: output macro
%
\newcommand*{\pgfmathomegarotation}[3]{
- \pgfmathisodd{#1}{test}
- \ifnum\test=1
+ \pgfmathisodd{#1}
+ \ifnum\pgfmathresult=1
\pgfmathparse{#1/2 + 2^#2}
\else
\pgfmathparse{#1/2}
@@ -47,8 +31,6 @@
\global\expandafter\edef\csname #3\endcsname{\res}
}
-
-
% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
% KEY DEFINITION - Design choices
% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -914,9 +896,9 @@
\pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)}
\pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1}
\foreach \startmodule in {\startingpoint,...,\endingpoint}{
- \pgfmathisodd{\startmodule}{initmodule}
+ \pgfmathisodd{\startmodule}
\ifnum\t=1
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)}
@@ -931,7 +913,7 @@
\fi
\fi
\ifnum\t=2
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))}
@@ -946,7 +928,7 @@
\fi
\fi
\ifnum\t>2
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))}
@@ -974,9 +956,9 @@
\pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)}
\pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1}
\foreach \startmodule in {\startingpoint,...,\endingpoint}{
- \pgfmathisodd{\startmodule}{initmodule}
+ \pgfmathisodd{\startmodule}
\ifnum\t=1
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)}
@@ -991,7 +973,7 @@
\fi
\fi
\ifnum\t=2
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))}
@@ -1006,7 +988,7 @@
\fi
\fi
\ifnum\t>2
- \ifnum\initmodule=1
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))}
\pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))}
@@ -1038,8 +1020,8 @@
% Drawing
\foreach \startmodule in {1,...,\r}{
- \pgfmathisodd{\startmodule}{initmodule}
- \ifnum\initmodule=1
+ \pgfmathisodd{\startmodule}
+ \ifnum\pgfmathresult=1
% if odd
\pgfmathtruncatemacro\endmodule{int(\startmodule+1)}
\draw(r\middlestage-\startmodule-output-1)--(r\middlestagei-\startmodule-input-1);
@@ -1062,7 +1044,7 @@
% BANYAN NETWORKS
-% BANYAN-OMEGA (thanks to Joćo Gabriel Reis)
+% BANYAN-OMEGA (thanks to JoĆ£o Gabriel Reis)
\tikzset{banyan omega/.code={
% Number of ports per module