CINNA (version 1.0.0)

giant.component.extract: Giant component extraction of a graph

Description

This function extracts the largest connected or the giant component of the input graph which can be an "igraph" object or a "network" object and convert them as "igraph" objects. For the bipartite graph, this will apply projection before extracting the components.

Usage

giant.component.extract(x, directed = TRUE, bipartite.proj = FALSE,
  num.proj = 1)

Arguments

x

An igraph or a network object

directed

Whether to create a directed graph(default=TRUE)

bipartite.proj

Whether the bipartite network must be projected or not(default=FALSE)

num.proj

A number which shows the number of projects especifically for bipartite graphs.(default=1)

Value

the giant componet of the input as igraph object

Details

This function distinguishes the largest component of an "igraph" or a "network" object and illustrates them as a list which contains the edgelist of the giant component. If the input graph was bipartite and the "bipartite.proj" was TRUE, it will projet it and you can decide to which project you want to continue to work with that.

References

Newman, M. (2010). Networks. Oxford University Press.

See Also

induced.subgraph,clusters

Examples

Run this code
# NOT RUN {
# a graph with 4 vertices

data(zachary)
giant.component.extract(zachary)

# }

Run the code above in your browser using DataCamp Workspace