Qurak

VertexCount

ใช้งานได้

Returns the number of vertices in a graph (optionally matching a pattern)

VertexCount[g]
VertexCount[g, patt]
VertexCount[{v -> w, …}, …]
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&)] → 4

ใช้ใน

หัวข้อ

ที่เกี่ยวข้อง

ฟังก์ชันทั้งหมด 6300 รายการ · ใช้สิ่งนี้จากไคลเอนต์ MCP