VertexCapacity

VertexCapacity
is an option and property for Graph and related functions that specifies a vertex capacity.

DetailsDetails

  • The following option settings can be used:
  • Automaticautomatically determine vertex capacities
    "prop"use the property as a capacity
    {v1->c1,v2->c2,...}vertex has capacity etc.
    {c1,c2,...}give all vertex capacities in the same order as used by VertexList
    {pattern->c,...}vertex that matches the pattern has capacity c
  • The wrapper Property[v, VertexCapacity->c] can be used when creating graphs in functions such as Graph etc.
  • The weight can be any expression.
  • Vertex capacities can have special meanings for different graph computation functions.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Set a capacity for all vertices:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Use any expression as a capacity:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Get VertexCapacity for a given vertex:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »