AlignedPairs {GraphAlignment}R Documentation

Get aligned node pairs

Description

Create a matrix of pairs of aligned nodes from networks A and B using the permutation vector P, where P is in the format returned by AlignNetworks().

Usage

AlignedPairs(A, B, P)

Arguments

A adjacency matrix for network A
B adjacency matrix for network B
P permutation vector to be used as the alignment

Value

The return value is a matrix with two columns. The number of rows is equal to the number of aligned node pairs. Each row in the matrix denotes a pair of aligned nodes. In each row, the first element (index 1) is the label of a node in network A, and the second element (index 2) is the label of a node in network B.

Examples

  ex<-GenerateExample(dimA=22, dimB=22, filling=.5, covariance=.6,
    symmetric=TRUE, numOrths=10, correlated=seq(1,18))
  
  pinitial<-InitialAlignment(psize=34, r=ex$r, mode="reciprocal")
  
  lookupLink<-seq(-2,2,.5)
  linkParams<-ComputeLinkParameters(ex$a, ex$b, pinitial, lookupLink)
  
  lookupNode<-c(-.5,.5,1.5)
  nodeParams<-ComputeNodeParameters(dimA=22, dimB=22, ex$r,
    pinitial, lookupNode)
  
  al<-AlignNetworks(A=ex$a, B=ex$b, R=ex$r, P=pinitial,
    linkScore=linkParams$ls,
    selfLinkScore=linkParams$ls,
    nodeScore1=nodeParams$s1, nodeScore0=nodeParams$s0,
    lookupLink=lookupLink, lookupNode=lookupNode,
    bStart=.1, bEnd=30,
    maxNumSteps=50)
  
  alignedPairs<-AlignedPairs(A=ex$a, B=ex$b, al)

[Package GraphAlignment version 1.0-0 Index]