MagneticMap: Magnetic Laplacian Matrix and Magnetic Eigenmap Visualization

Description Usage Arguments Value References Examples

View source: R/MagneticMap.R

Description

Constructs the normalized magnetic Laplacian Matrix of a square matrix, returns the eigenvectors and visualization of magnetic eigenmap.

Usage

1
MagneticMap(W, g, Plot2D=FALSE, Plot3D=FALSE)

Arguments

W

a numeric or complex matrix whose magnetic Laplacian matrix is to be computed

g

the electric charge parameter that quantifies the importance of the directional information, 0 <= g <1/2

Plot2D

a logical value indicating whether a 2-D map should be plotted

Plot3D

a logical value indicating whether a 3-D map should be plotted

Value

matrix

the normalized magnetic Laplacian matrix

eigenvector

the eigenvectors of normalized magnetic Laplacian matrix

References

Fanuel et al. (2016) Magnetic Eigenmaps for Visualization of Directed Networks, preprint arXiv:1606.08266.

Examples

1
2
3
4
5
6
#Create a square matrix
M <- matrix(c(1:16), 4, 4)
#Construct normalized magnetic Laplacian matrix and plot map
m <- MagneticMap(M, g=1/3, Plot2D=TRUE, Plot3D=TRUE)
#See the eigenvectors
vector<-m$eigenvector

Example output



MagneticMap documentation built on May 29, 2017, 6:17 p.m.