VertexCount[g]
グラフ g 中の頂点数を与える.
VertexCount[g,patt]
パターン patt にマッチする頂点数を与える.
VertexCount[{vw,…},…]
規則 vw を使ってグラフ g を指定する.
VertexCount
VertexCount[g]
グラフ g 中の頂点数を与える.
VertexCount[g,patt]
パターン patt にマッチする頂点数を与える.
VertexCount[{vw,…},…]
規則 vw を使ってグラフ g を指定する.
詳細
- VertexCountは,グラフ次数としても知られている.
- VertexCount[g]は,グラフ g の頂点数を返す.
- VertexCountは,無向グラフ,有向グラフ,多重グラフ,混合グラフに使うことができる.
例題
すべて開く すべて閉じる例 (2)
スコープ (7)
VertexCountは無向グラフに使うことができる:
VertexCount[[image]]VertexCount[[image]]VertexCount[[image]]VertexCount[[image]]VertexCount[{1 -> 2, 2 -> 3, 3 -> 1}]g = Graph[{12, 21, a1, a2, b1, b2, bb}]VertexCount[g, _Integer]VertexCount[g, Except[_Integer]]VertexCountは大きいグラフに使える:
g = GridGraph[{10, 10, 10, 10}];Timing[VertexCount[g]]一般化と拡張 (1)
VertexCount[ButterflyGraph[n, b]]VertexCount[CirculantGraph[n, j]]VertexCount[CirculantGraph[n, j]]VertexCount[CompleteGraph[n]]VertexCount[CompleteKaryTree[level, k]]VertexCount[CycleGraph[n]]VertexCount[DeBruijnGraph[m, n]]VertexCount[GridGraph[{n, m, l}]]VertexCount[HararyGraph[k, n]]VertexCount[HypercubeGraph[n]]VertexCount[KaryTree[n]]VertexCount[KnightTourGraph[m, n]]VertexCount[PetersenGraph[n, k]]VertexCount[StarGraph[n]]VertexCount[TuranGraph[n, r]]VertexCount[WheelGraph[n]]アプリケーション (3)
g = PetersenGraph[5, 2]{ConnectedGraphQ[g], EdgeCount[g] ≥ VertexCount[g] - 1}g = PathGraph[Range[20]]{ConnectedGraphQ[g], EdgeCount[g] ≥ VertexCount[g] - 1}g = GridGraph[{10, 10}, VertexStyle -> ((# -> RandomChoice[{Red, Green, Blue, Yellow}])& /@ VertexList[GridGraph[{10, 10}]]), VertexSize -> Large]VertexCount[g, _ ? (AnnotationValue[{g, #}, VertexStyle] == Blue&)]g = HararyGraph[3, 5, VertexSize -> Large, ImagePadding -> 10];vd = VertexDegree[g];HighlightGraph[g, Table[Style[Labeled[VertexList[g][[i]], vd[[i]]], ColorData["TemperatureMap"][vd[[i]] / Max[vd]]], {i, VertexCount[g]}]]VertexCount[g, _ ? (VertexDegree[g, #] == 3&)]特性と関係 (5)
CompleteGraph[n]の頂点数:
VertexCount[CompleteGraph[n]]VertexCountはVertexListで求めることができる:
g = CompleteGraph[5]VertexCount[g]Length[VertexList[g]]g = CompleteGraph[5]VertexCount[g]Dimensions[AdjacencyMatrix[g]]Dimensions[IncidenceMatrix[g]]Dimensions[KirchhoffMatrix[g]]グラフ g の線グラフの頂点の数は g の辺の数と同じである:
g = CompleteGraph[5]EdgeCount[g]LineGraph[g]VertexCount[%]{g, h} = {PetersenGraph[4, 1], HypercubeGraph[3]}IsomorphicGraphQ[g, h]VertexCount[g] == VertexCount[h]テキスト
Wolfram Research (2010), VertexCount, Wolfram言語関数, https://reference.wolfram.com/language/ref/VertexCount.html (2015年に更新).
CMS
Wolfram Language. 2010. "VertexCount." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexCount.html.
APA
Wolfram Language. (2010). VertexCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexCount.html
BibTeX
@misc{reference.wolfram_2026_vertexcount, author="Wolfram Research", title="{VertexCount}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexCount.html}", note=[Accessed: 16-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_vertexcount, organization={Wolfram Research}, title={VertexCount}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexCount.html}, note=[Accessed: 16-November-2026]}