Details and Options
A Szeged matrix S is a matrix whose entries S〚i,j〛 depend on the number of vertices that are closer to vertex νi or vertex νj of the given graph.
ResourceFunction["SzegedMatrix"] assumes that the graph g is undirected and connected.
ResourceFunction["SzegedMatrix"][g] is equivalent to ResourceFunction["SzegedMatrix"][g,"Edge"].
ResourceFunction["SzegedMatrix"][g,"Edge"] gives an edge-Szeged matrix (sometimes referred to as "the" Szeged matrix), where the nonzero off-diagonal S〚i,j〛 entries correspond to edges connecting vertex νi and vertex νj in the graph.
ResourceFunction["SzegedMatrix"][g,"Path"] gives an path-Szeged matrix, where the off-diagonal S〚i,j〛 entries correspond to paths connecting vertex νi and vertex νj in the graph.
The diagonal entries of a Szeged matrix are taken to be 0.
ResourceFunction["SzegedMatrix"][g,"Edge"] gives a
SparseArray object.
With the option setting
"Symmetric"→False,
ResourceFunction["SzegedMatrix"] gives an unsymmetric matrix whose entries
S〚i,j〛 count the number of vertices that are closer to vertex
νi than to vertex
νj. Vertices equidistant from the two are not counted.
With the default option setting
"Symmetric"→True,
ResourceFunction["SzegedMatrix"] produces a symmetric matrix equivalent to the Hadamard product of an unsymmetric Szeged matrix with its transpose.
ResourceFunction["SzegedMatrix"][mol,"type"] computes the Szeged matrix of a molecule
mol, where the hydrogens are ignored by default. Use the option setting
IncludeHydrogens→All to account for hydrogens.
ResourceFunction["SzegedMatrix"][entity,"type"] computes the Szeged matrix of an entity of type
"Chemical" or
"Graph".