Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute projections of the Wolfram–Ricci curvature tensor of a graph and many associated properties
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,vin,vout] computes the projection of the Wolfram–Ricci curvature tensor from vertex vin to vertex vout in a graph graph of dimension dim, with an automatically-computed maximum tube radius. | |
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,vin,vout,rad] uses maximum tube radius rad. | |
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,vin,vout,{radmin,radmax}] uses minimum tube radius radmin and maximum tube radius radmax. | |
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,v,All] gives an Association showing the projections of the Wolfram–Ricci curvature tensor from vertex v to each vertex in a graph graph of dimension dim, with an automatically-computed maximum tube radius. | |
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,v,All,rad] uses maximum tube radius rad. | |
ResourceFunction["WolframRicciCurvatureTensor"][graph,dim,v,All,{radmin,radmax}] uses minimum tube radius radmin and maximum tube radius radmax. | |
ResourceFunction["WolframRicciCurvatureTensor"][…,"prop"] gives the property "prop" for the specified Wolfram–Ricci curvature tensor computation. |
"BallVolume" | the volumes of geodesic balls of various radi around a given vertex |
"AllBallVolumes" | an association showing the volumes of geodesic balls of various radii around each vertex |
"ScalarCurvature" | the Wolfram–Ricci scalar curvatures at a given vertex |
"AllScalarCurvatures" | an association showing the Wolfram–Ricci scalar curvatures at each vertex |
"ScalarHighlightedGraph" | a highlighted graph showing how the Wolfram–Ricci scalar curvature is computed |
"TubeVolume" | the volumes of geodesic tubes of various radii between two given vertices |
"AllTubeProjectionVolumes" | an association showing the volumes of geodesic tubes of various volumes between a given vertex and all other vertices |
"Curvature" | the projection of the Wolfram–Ricci curvature tensor between two given vertices |
"AllCurvatureProjections" | an association showing the projections of the Wolfram–Ricci curvature tensor between a given vertex and all other vertices |
"HighlightedGraph" | a highlighted graph showing how the projection of the Wolfram–Ricci curvature tensor is computed |
"TransitivelyReduce" | False | whether to use the transitive reduction of the input graph |
"UndirectedGraph" | False | whether to use the undirected form of the input graph |
"VolumeMethod" | Mean | whether to take a maximum, minimum or mean over geodesic balls of different volumes (or simply return all values) |
"CurvatureMethod" | Mean | whether to take a maximum, minimum or mean over geodesic balls yielding different curvatures (or simply return all values) |
"VertexMethod" | Identity | whether to take a maximum, minimum or mean over all vertices in the input graph (or simply return all values) |
Compute the projection of the Wolfram–Ricci curvature tensor between vertices 145 and 355 in a 20-by-20 2-dimensional grid graph:
In[1]:= |
|
Out[1]= |
|
In[2]:= |
|
Out[2]= |
|
Compute the maximum and minimum projections of the curvature tensor over geodesic tubes with radii up to 4:
In[3]:= |
|
Out[3]= |
|
In[4]:= |
|
Out[4]= |
|
Return a list of all projections of the curvature tensor over geodesic tubes with radii up to 4:
In[5]:= |
|
Out[5]= |
|
Show the geodesic tubes with radii up to 4 as a highlighted graph:
In[6]:= |
|
Out[6]= |
|
Return an Association showing the projections of the Wolfram–Ricci curvature tensor between vertex 145 and each vertex in the graph, over geodesic tubes with radii up to 4:
In[7]:= |
|
Out[7]= |
|
Compute the maximum and minimum projections of the curvature tensor across all vertices:
In[8]:= |
|
Out[8]= |
|
In[9]:= |
|
Out[9]= |
|
Compute the average projection of the curvature tensor across all vertices:
In[10]:= |
|
Out[10]= |
|
Compute the average volume of geodesic tubes between vertices 145 and 855 in a 10-by-10-by-10 3-dimensional grid graph:
In[11]:= |
|
Out[11]= |
|
In[12]:= |
|
Out[12]= |
|
Compute the maximum and minimum volumes of geodesic tubes with radii between 2 and 4:
In[13]:= |
|
Out[13]= |
|
In[14]:= |
|
Out[14]= |
|
Return a list of all volumes of geodesic tubes with radii between 2 and 4:
In[15]:= |
|
Out[15]= |
|
Show the geodesic tubes with radii between 2 and 4 as a highlighted graph:
In[16]:= |
|
Out[16]= |
|
Return an Association showing the geodesic tube volumes between vertex 145 and each vertex in the graph, with radii up to 3:
In[17]:= |
|
Out[17]= |
|
Compute the maximum and minimum tube volumes between vertex 145 and each vertex in the graph, with radii up to 3:
In[18]:= |
|
Out[18]= |
|
In[19]:= |
|
Out[19]= |
|
Compute the projection of the Wolfram–Ricci curvature tensor between two arbitrary vertices in an approximately spherical graph (produced using the resource function ExtrinsicCurvedManifoldToGraph) and show that the projection is positive:
In[20]:= |
|
In[21]:= |
|
Out[21]= |
|
Show the geodesic tubes with radii up to 2 as a highlighted graph:
In[22]:= |
|
Out[22]= |
|
Compute the projection of the Wolfram–Ricci curvature tensor between two arbitrary vertices in an approximately hyperbolic paraboloidal graph (produced using the resource function ExtrinsicCurvedManifoldToGraph) and show that the projection is negative:
In[23]:= |
|
In[24]:= |
|
Out[24]= |
|
Show the geodesic tubes with radii up to 3 as a highlighted graph:
In[25]:= |
|
Out[25]= |
|
Compute the Wolfram–Ricci scalar curvature at vertex 150 in a 20-by-20 2-dimensional grid graph:
In[26]:= |
|
Out[26]= |
|
In[27]:= |
|
Out[27]= |
|
Compute the maximum and minimum scalar curvatures over geodesic balls with radii up to 8:
In[28]:= |
|
Out[28]= |
|
In[29]:= |
|
Out[29]= |
|
Return a list of all scalar curvatures over geodesic balls with radii up to 8:
In[30]:= |
|
Out[30]= |
|
Show the geodesic balls with radii up to 8 as a highlighted graph:
In[31]:= |
|
Out[31]= |
|
Return an association showing the Wolfram–Ricci scalar curvatures at each vertex:
In[32]:= |
|
Out[32]= |
|
Compute the maximum and minimum scalar curvatures across all vertices:
In[33]:= |
|
Out[33]= |
|
In[34]:= |
|
Out[34]= |
|
Compute the average scalar curvature across all vertices:
In[35]:= |
|
Out[35]= |
|
Compute the average volume of geodesic balls around vertex 250 in a 10-by-10-by-10 3-dimensional grid graph:
In[36]:= |
|
Out[36]= |
|
In[37]:= |
|
Out[37]= |
|
Compute the maximum and minimum volumes of geodesic balls with radii between 3 and 9:
In[38]:= |
|
Out[38]= |
|
In[39]:= |
|
Out[39]= |
|
Return a list of all volumes of geodesic balls with radii between 3 and 9:
In[40]:= |
|
Out[40]= |
|
Show the geodesic balls with radii between 3 and 9 as a highlighted graph:
In[41]:= |
|
Out[41]= |
|
Return an association showing the geodesic ball volumes around each vertex:
In[42]:= |
|
Out[42]= |
|
Compute the maximum and minimum ball volumes across all vertices:
In[43]:= |
|
Out[43]= |
|
In[44]:= |
|
Out[44]= |
|
Compute the average ball volume across all vertices:
In[45]:= |
|
Out[45]= |
|
If given a graph, a number of dimensions and a vertex, WolframRicciCurvatureTensor returns an association showing the projections of the Wolfram–Ricci curvature tensor to each vertex in the graph, using the graph radius as the maximum geodesic tube radius:
In[46]:= |
|
Out[46]= |
|
In[47]:= |
|
Out[47]= |
|
Use geodesic tube radii between 3 and 5 instead:
In[48]:= |
|
Out[48]= |
|
If given a graph, a number of dimensions, a pair of vertices and a maximum radius, WolframRicciCurvatureTensor returns the projection of the Wolfram–Ricci curvature tensor between those vertices:
In[49]:= |
|
Out[49]= |
|
WolframRicciCurvatureTensor also supports directed graphs:
In[50]:= |
|
In[51]:= |
|
Out[51]= |
|
In the directed case, projections of the Wolfram–Ricci curvature tensor are computed using volumes of geodesic diamonds, as opposed to geodesic tubes:
In[52]:= |
|
Out[52]= |
|
However, WolframRicciCurvatureTensor can be made to treat directed graphs as though they were undirected (and hence revert to using geodesic tubes) with the option "UndirectedGraph":
In[53]:= |
|
Out[53]= |
|
In[54]:= |
|
Out[54]= |
|
WolframRicciCurvatureTensor also supports curvature computations in graphs with non-integer dimensionality, such as this Sierpinski sieve graph:
In[55]:= |
|
Out[55]= |
|
In[56]:= |
|
Out[56]= |
|
In[57]:= |
|
Out[57]= |
|
Compute the average projection of the Wolfram–Ricci curvature tensor over geodesic tubes between vertices 145 and 355 with radii between 2 and 6 in a 20-by-20 2-dimensional grid graph with the option value "CurvatureMethod"→Mean (default):
In[58]:= |
|
Out[58]= |
|
In[59]:= |
|
Out[59]= |
|
Return a list of curvatures over geodesic tubes with radii between 2 and 6 instead:
In[60]:= |
|
Out[60]= |
|
Compute the maximum and minimum curvatures over geodesic tubes with radii between 2 and 6 with the option values "CurvatureMethod"→Max and "CurvatureMethod"→Min, respectively:
In[61]:= |
|
Out[61]= |
|
In[62]:= |
|
Out[62]= |
|
By default, directed graphs are not transitively-reduced:
In[63]:= |
|
Compute (and visualize) the Wolfram–Ricci curvature tensor, assuming that the graph is not transitively-reduced:
In[64]:= |
|
Out[64]= |
|
In[65]:= |
|
Out[65]= |
|
WolframRicciCurvatureTensor can be made to treat unreduced directed graphs as though they were transitively-reduced with the option "TransitivelyReduce":
In[66]:= |
|
Out[66]= |
|
In[67]:= |
|
Out[67]= |
|
By default, directed graphs are treated as directed (and so curvature computations use the volumes of geodesic diamonds, as opposed to geodesic tubes):
In[68]:= |
|
In[69]:= |
|
Out[69]= |
|
In[70]:= |
|
Out[70]= |
|
WolframRicciCurvatureTensor can be made to treat directed graphs as though they were undirected with the option "UndirectedGraph":
In[71]:= |
|
Out[71]= |
|
In[72]:= |
|
Out[72]= |
|
Return an association showing the geodesic tube volumes between vertex 145 and each vertex, with radii up to 3, in a 20-by-20 2-dimensional grid graph (default):
In[73]:= |
|
Out[73]= |
|
In[74]:= |
|
Out[74]= |
|
Compute the average tube volume between vertex 145 and all vertices with the option value "VertexMethod"→Mean:
In[75]:= |
|
Out[75]= |
|
Compute the maximum and minimum tube volumes between vertex 145 and all vertices with the option values "VertexMethod"→Max and "VertexMethod"→Min, respectively:
In[76]:= |
|
Out[76]= |
|
In[77]:= |
|
Out[77]= |
|
Return an association showing the projections of the Wolfram–Ricci curvature tensor between vertex 145 and each vertex, with tube radii up to 3, in a 20-by-20 2-dimensional grid graph:
In[78]:= |
|
Out[78]= |
|
In[79]:= |
|
Out[79]= |
|
Compute the average projection of the Wolfram–Ricci curvature tensor between vertex 145 and all vertices with the option value "VertexMethod"→Mean:
In[80]:= |
|
Out[80]= |
|
Compute the maximum and minimum projections of the Wolfram–Ricci curvature tensor between vertex 145 and all vertices with the option values "VertexMethod"→Max and "VertexMethod"→Min, respectively:
In[81]:= |
|
Out[81]= |
|
In[82]:= |
|
Out[82]= |
|
Compute the average volume of geodesic tubes between vertices 145 and 355 with radii between 2 and 6 in a 20-by-20 2-dimensional grid graph with the option value "VolumeMethods"→Mean (default):
In[83]:= |
|
Out[83]= |
|
In[84]:= |
|
Out[84]= |
|
Return a list of all volumes of geodesic tubes with radii between 2 and 6 instead:
In[85]:= |
|
Out[85]= |
|
Compute the maximum and minimum volumes of geodesic balls with radii between 2 and 6 with the option values "VolumeMethod"→Max and "VolumeMethod"→Min, respectively:
In[86]:= |
|
Out[86]= |
|
In[87]:= |
|
Out[87]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License