MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / add_graph_to_context

Function add_graph_to_context

ciphercore-base/src/optimizer/optimize.rs:44–50  ·  view source on GitHub ↗
(context: Context, source_graph: Graph)

Source from the content-addressed store, hash-verified

42}
43
44fn add_graph_to_context(context: Context, source_graph: Graph) -> Result<Graph> {
45 let new_graph = context.create_graph()?;
46 for annotation in source_graph.get_annotations()? {
47 new_graph.add_annotation(annotation)?;
48 }
49 Ok(new_graph)
50}
51
52fn graph_in_new_context(source_graph: Graph) -> Result<(Context, Graph)> {
53 let context = create_context()?;

Callers 2

optimize_contextFunction · 0.85
graph_in_new_contextFunction · 0.85

Calls 3

get_annotationsMethod · 0.80
add_annotationMethod · 0.80
create_graphMethod · 0.45

Tested by

no test coverage detected