Skip to content
GraphInitWithDeepCopy

GraphInitWithDeepCopy

Description

Initialize graph with deep-copy callbacks for node payloads.

Parameters

Name Direction Description
ci in Optional deep-copy callback for nodes.
cd in Optional deinit callback for nodes.

Usage example (Cross-references)

Usage examples (Cross-references)
        WriteFmt("Testing GraphForeachNode and GraphNodeForeachNeighbor for reachability\n");
    
        CityGraph graph = GraphInitWithDeepCopy(StrInitCopy, StrDeinit);
        CityIndex index = MapInitWithDeepCopy(zstr_hash, zstr_compare_ptr, ZstrInitClone, ZstrDeinit, NULL, NULL);
    
        typedef Graph(Str) StrGraph;
        StrGraph   graph = GraphInitWithDeepCopy(StrInitCopy, StrDeinit);
        Str        name  = StrInitFromZstr("alpha");
        GraphNodeId node_id;
Last updated on