[inline]
Destructor.
Computes Czekanovski-Dice distances.
\[ d^2(i,j)=1-\frac{|N(i)\cap N(j)|}{|N(i)|+|N(j)|},\]
where $ N(i) $ is the set including $ i $ and its neighbors.
Computes the vertex/vertex adjacency matrix.
Computes Czekanovski-Dice distances between two vertices.
\[ d^2(i,j)=1-\frac{|N(i)\cap N(j)|}{|N(i)|+|N(j)|},\]
where $ N(i) $ is the set including $ i $ and its neighbors.
Computes oriented distances.
\[ d^2(i,j)=1-\frac{|N^-(i)\cap N^-(j)|}{|N^-(i)|+|N^-(j)|}-\frac{|N^+(i)\cap N^+(j)|}{|N^+(i)|+|N^+(j)|},\]
where $ N^-(i) $ is the set including $ i $ and its incoming neighbors, and $ N^+(i) $ is the set including $ i $ and its outgoing neighbors.
Computes incoming and outgoing neighbor sets.
Computes the part of the oriented distance due to incoming edges.
\[ d^2(i,j)=1-\frac{|N^-(i)\cap N^-(j)|}{|N^-(i)|+|N^-(j)|},\]
where $ N^-(i) $ is the set including $ i $ and its incoming neighbors.
Computes the part of the oriented distance due to outgoing edges.
\[ d^2(i,j)=1-\frac{|N^+(i)\cap N^+(j)|}{|N^+(i)|+|N^+(j)|},\]
where $ N^+(i) $ is the set including $ i $ and its outgoing neighbors.
Computes adjacency distances.
\[ d^2(i,j)=\begin{cases} 0,&\text{if $i=j$ or $i$ and $j$ are adjacent}\\ 1,&\text{otherwise} \end{cases} \]
Computes Laplacian distances on the complement graph.
Actually computes the bilinear form corresponding to the Laplacian distance on the complement graph:
\[ b(i,j)=\begin{cases} n-d(i),&\text{if $i=j$}\\ 0,&\text{if $i$ and $j$ are adjacent}\\ -1,&\text{otherwise} \end{cases} \]
It is semi-definite positive, as $ B=\bar{D}\bar{D}^{\rm t}$ if $ \bar{D} $ is the oriented adjacency matrix of the complement graph for any arbitrary orientation.
The distance corresponding to this bilinear form is:
\[ d^2(i,j)=\begin{cases} 0,&\text{if $i=j$}\\ 2n-d(i)-d(j),&\text{if $i$ and $j$ are adjacent}\\ 2n-d(i)-d(j)+2,&\text{otherwise} \end{cases} \]
Computes translated adjacency distances.
\[ d^2(i,j)=\begin{cases} 0,&\text{if $i=j$}\\ 1-\frac{2}{n},&\text{if $i$ and $j$ are adjacent}\\ 1,&\text{otherwise} \end{cases} \]
Computes bisection distances.
\[ d^2(i,j)=\begin{cases} 0,&\text{if $i=j$}\\ 1-\frac{2}{d(i)+d(j)+2},&\text{if $i$ and $j$ are adjacent}\\ 1,&\text{otherwise} \end{cases} \]
where $ d(i) $ is the degree of $ i $
Computes distances in $ \mathbb{R}^2$.
\[ d^2(i,j)=x^2(i)+y^2(i),\]
where $ x(i) $ and $ y(i) $ are the coordinates of $ i $ in the plane.
[private]
Class initialization.
Computes a distance among the vertices of the graph and embed it in $\mathbb{R}^{n-1}$.
[private]
Member destructions.
release the memory
Defines the distance that will be used to isometrically embed the graph in $\mathbb{R}^{n-1}$.
The returned reference has the following meaning:
0 Czekanovski-Dice distance 1 Bisection distance 2 Adjacency distance 3 Translated adjacency distance 4 Laplacian distance 5 Oriented distance 6 R2 distance
vertex/vertex sorted adjacency
incoming adjacency lists
outgoing adjacency lists
squared Euclidean distances
coordinates in $ \mathbb{R}^{n-1}$
computation status
eigenvalues