According to WRI tech support:
Combinatorica functionality is not technically deprecated, though it is our hope that future versions of Mathematica will subsume it entirely by incorporating its functionality with the built-in Graphs & Networks functionality.
Leaving aside that this seems to conflict with MMA's documentation, eg:
Block[{$ContextPath}, Needs["Combinatorica`"]]
warns:
General::compat: Combinatorica Graph and Permutations functionality has been superseded by preloaded functionality. The package now being loaded may conflict with this. Please see the Compatibility Guide for details.
In the meantime, in order to use Combinatorica functionality like TransitiveClosure on built in Graphs, it's necessary to take a detour through Combinatorica, eg:
AdjacencyGraph[#, VertexLabels -> "Name"] &@
Combinatorica`ToAdjacencyMatrix@
Combinatorica`RemoveSelfLoops@
Combinatorica`TransitiveClosure@
Combinatorica`FromAdjacencyMatrix@
Normal@AdjacencyMatrix@Graph[{"E0" -> "T0", "T0" -> "E1"}]
This yields (sorry for truncation):
How to recover the built in Graph's vertex names? (These are extracted from XML metadata and so it's not so convenient to project them to positional indices)
PropertyValue
does not return theVertexLabels
or any ofVertexList
,EdgeList
, etc. SinceGraph
is atomic, one can't do structural manipulations either... Do you have control over how the firstGraph
is created (the one with E0, T0)? I think it might be possible to project them to positional indices easily, if that's a route you'd consider. $\endgroup$ – rm -rf♦ Jul 14 '12 at 21:42