check_graph | R Documentation |
Function that checks that the pair of graphs passed to a matching-related functions satisfies necessary conditions and modifies them according to specified parameters. check_single_graph does similar checks and modifications but just for one graph or list of graphs.
check_graph(
A,
B,
same_order = TRUE,
square = TRUE,
as_list = TRUE,
as_igraph = FALSE
)
check_single_graph(A, square = TRUE, as_list = TRUE, as_igraph = FALSE)
A |
A matrix, an igraph object, or list of either. |
B |
A matrix, an igraph object, or list of either. |
same_order |
Whether the returned objects should have the same number of nodes. If the graphs start with different numbers of nodes the smaller graph is padded with isolated vertices. (default = TRUE) |
square |
Whether the matrices need to be square. (default = TRUE) Currently non-square matrices are not supported. |
as_list |
Whether to return the results as a matrix_list. (default = TRUE) If FALSE and A and B have length > 1 |
as_igraph |
Whether to return an igraph object. (default=FALSE) Only allowed if the original parameters are igraph objects. If FALSE, then this converts the objects to sparse matrices. |
If A and B are lists of matrices or igraph objects, then the lists must be the same length. Additionally, within each list the graphs need to have the same number of vertices but this does not need to be true across lists.
List containing A and B modified according to the parameters and the number of vertices in each graph in totv1 and totv2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.