Research Article

Joint Resource Allocation and Power Control Based on Vehicle’s Motion Characteristics in NOMA-Based V2V Systems

Algorithm 3

Vehicle clustering algorithm.
Input:
The moving features of vehicles: denotes the distance between vehicle i and vehicle j; is the speed of vehicle i; is the direction of vehicle i; represents the communication link type between vehicle i and vehicle j; N is the number of vehicles;
Output:
The partition ;
(1)construct adjacency matrix
  for do
  for do
   compute (5)
  end for
  end for
(2)construct degree matrix D
    
(3)calculate Laplace matrix
(4)do standardization of
(5)compute all eigenvalues of L and their respective eigenvectors f
(6)normalize matrix L composed of corresponding eigenvector f by row and form the characteristic matrix F
(7)each row in F as a sample, n samples are clustered, and clustering dimension is k
(8)get cluster partition