This set of functions tries to calculate a ranking of the nodes in a graph so that nodes sharing certain topological traits are in proximity in the resulting order. These functions are of great value when composing matrix layouts and arc diagrams but could concievably be used for other things as well.
node_rank_hclust( method = "average", dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_anneal( cool = 0.5, tmin = 1e04, swap_to_inversion = 0.5, step_multiplier = 100, reps = 1, dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_branch_bound( weighted_gradient = FALSE, dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_traveller( method = "two_opt", ..., dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_two( dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_mds( method = "cmdscale", dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_leafsort( method = "average", type = "OLO", dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_visual( dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_spectral( normalized = FALSE, dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_spin_out( step = 25, nstart = 10, dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_spin_in( step = 5, sigma = seq(20, 1, length.out = 10), dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_quadratic( criterion = "2SUM", reps = 1, step = 2 * graph_order(), step_multiplier = 1.1, temp_multiplier = 0.5, maxsteps = 50, dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_genetic( ..., dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" ) node_rank_dendser( ..., dist = "shortest", mode = "out", weights = NULL, algorithm = "automatic" )
method  The method to use. See Functions section for reference 

dist  The algorithm to use for deriving a distance matrix from the graph. One of
or a function that takes a 
mode  Which edges should be included in the distance calculation. For
distance measures based on the adjacency matrix, 
weights  An edge variable to use as weight for the shortest path
calculation if 
algorithm  The algorithm to use for the shortest path calculation if

cool  cooling rate 
tmin  minimum temperature 
swap_to_inversion  Proportion of swaps in local neighborhood search 
step_multiplier  Multiplication factor for number of iterations per temperature 
reps  Number of repeats with random initialisation 
weighted_gradient  minimize the weighted gradient measure? Defaults to 
...  Arguments passed on to other algorithms. See Functions section for reference 
type  The type of leaf reordering, either 
normalized  Should the normalized laplacian of the similarity matrix be used? 
step  The number iterations to run per initialisation 
nstart  The number of random initialisations to perform 
sigma  The variance around the diagonal to use for the weight matrix. Either a single number or a decreasing sequence. 
criterion  The criterion to minimize. Either "LS" (Linear Seriation Problem), "2SUM" (2Sum Problem), "BAR" (Banded AntiRobinson form), or "Inertia" (Inertia criterion) 
temp_multiplier  Temperature multiplication factor between 0 and 1 
maxsteps  The upper bound of iterations 
An integer vector giving the position of each node in the ranking
node_rank_hclust
: Use hierarchical clustering to rank nodes (see stats::hclust()
for allowed methods)
node_rank_anneal
: Use simulated annealing based on the "ARSA" method in seriation
node_rank_branch_bound
: Use branch and bounds strategy to minimize the gradient measure (only feasable for small graphs). Will use "BBURCG" or "BBWRCG" in seriation
dependent on the weighted_gradient
argument
node_rank_traveller
: Minimize hamiltonian path length using a travelling salesperson solver. See the the solve_TSP
function in TSP
for an overview of possible arguments
node_rank_two
: Use Ranktwo ellipse seriation to rank the nodes. Uses "R2E" method in seriation
node_rank_mds
: Rank by multidimensional scaling onto one dimension. method = 'cmdscale'
will use the classic scaling from stats
, method = 'isoMDS'
will use isoMDS
from MASS
, and method = 'sammon'
will use sammon
from MASS
node_rank_leafsort
: Minimize hamiltonian path length by reordering leafs in a hierarchical clustering. Method refers to the clustering algorithm (either 'average', 'single', 'complete', or 'ward')
node_rank_visual
: Use Prim's algorithm to find a minimum spanning tree giving the rank. Uses the "VAT" method in seriation
node_rank_spectral
: Minimize the 2sum problem using a relaxation approach. Uses the "Spectral" or "Spectral_norm" methods in seriation
depending on the value of the norm
argument
node_rank_spin_out
: Sorts points into neighborhoods by pushing large distances away from the diagonal. Uses the "SPIN_STS" method in seriation
node_rank_spin_in
: Sorts points into neighborhoods by concentrating low distances around the diagonal. Uses the "SPIN_NH" method in seriation
node_rank_quadratic
: Use quadratic assignment problem formulations to minimize criterions using simulated annealing. Uses the "QAP_LS", "QAP_2SUM", "QAP_BAR", or "QAP_Inertia" methods from seriation
dependant on the criterion
argument
node_rank_genetic
: Optimizes different criteria based on a genetic algorithm. Uses the "GA" method from seriation
. See register_GA
for an overview of relevant arguments
node_rank_dendser
: Optimizes different criteria based on heuristic dendrogram seriation. Uses the "DendSer" method from seriation
. See register_DendSer
for an overview of relevant arguments