Wolfram
Mathematica
8의 신기능: 그래프 및 네트워크 분석
◄
이전
|
다음
►
응용 분야
그래프의 기호 연산
매개 변수화된 그래프 구조의 꼭지점과 변의 개수가 명시된 수식을 생성해 봅니다.
In[1]:=
X
names = {ButterflyGraph[n, b], CompleteGraph[n], CompleteKaryTree[l, k], CycleGraph[n], DeBruijnGraph[m, n], GridGraph[{Subscript[n, 1], Subscript[n, 2]}], HararyGraph[k, n], HypercubeGraph[n], KaryTree[n], KnightTourGraph[m, n], StarGraph[n], WheelGraph[n] };
In[2]:=
X
FormulaGallery[forms_List] := Module[{vn = Map[VertexCount, forms], en = Map[EdgeCount, forms]}, TraditionalForm@ Grid[Table[{forms[[i]], vn[[i]], en[[i]]}, {i, Length[forms]}], Dividers -> All, Spacings -> {{1, 1, 1}, 2}, BaseStyle -> {FontFamily -> "Verdana"}, Background -> {None, {{Hue[.25, .15, .9], GrayLevel[.9]}}}, FrameStyle -> Directive[Thick, White]]];
In[3]:=
X
Pane[FormulaGallery[names], 500]
Out[3]=