summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/adigraph/adigraph_library_example.tex
blob: 021d66cc4a7674f22bc54913d562cc045dc42fe5 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
\documentclass{report}

\usepackage{adigraph}

\begin{document}

\NewAdigraph{myAdigraph}{
    s,0,0,b,red;
    1,2,2;
    3,2,-2;
    2,6,2;
    4,6,-2;
    t,8,0,e,blue;
}{
    s,3,15,10;
    s,1,25;
    3,1,5;
    3,4,10,10;
    4,2,0,5;
    2,3,15,0,black,black,near start;
    4,1,0,5,black,black,near start;
    1,2,30,5;
    2,t,10,10;
    4,t,30;
}

\begin{figure}
    \center
    \myAdigraph{}
    \caption{My Personal Graph}
\end{figure}

\begin{figure}
    \center
    \myAdigraph{
        s,3,5,20,1;
        3,4,0,20,1;
        4,t,20,10,1;
    }
    \caption{Sending 10 units over $s,3,4,t$}
\end{figure}

\begin{figure}
    \center
    \myAdigraph{
        s,3,5,20;
        3,4,0,20;
        s,1,20,5,1;
        4,1,5,0,red,blue,near start;
        4,t,15,15,1;
    }
    \caption{Sending 5 units over $s,1,4,t$}
\end{figure}

\begin{figure}
    \center
    \myAdigraph{
        s,3,5,20;
        3,4,0,20;
        s,1,15,10,1;
        1,2,25,10,1;
        4,2,5,0,1;
        4,t,10,20,1;
    }
    \caption{Sending 5 units over $s,1,2,4,t$}
\end{figure}

\begin{figure}
    \center
    \myAdigraph{
        s,3,5,20;
        3,4,0,20;
        s,1,5,20,1;
        1,2,15,20,1;
        4,2,5,0;
        2,t,0,20,1;
        4,t,10,20;
    }
    \caption{Sending 10 units over $s,1,2,t$}
\end{figure}

\begin{figure}
    \center
    \myAdigraph[
        3,4;
        2,t;
    ]{
        s,3,5,20;
        3,4,0,20;
        s,1,5,20,1;
        1,2,15,20,1;
        4,2,5,0;
        2,t,0,20,1;
        4,t,10,20;
    }
    \caption{Showing minimum cut}
\end{figure}

\end{document}