WLJS LogoWLJS Notebook

NestGraph

NestGraph[f,expr,n] gives the graph obtained by starting with expr and applying f successively n times.

NestGraph[f,{expr1,expr2,…},n] gives the graph obtained by applying f to expr1, expr2, ….

NestGraph[f,graph,n] gives the graph obtained by applying f to the vertices of graph and extending the graph.

Examples

Create a graph by nesting a function:

NestGraph[{# + 1, 2 #} &, 1, 4]

Please visit the official Wolfram Language Reference for more details.

On this page