MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / load_graph

Function load_graph

src/geode/mesh/io/graph_input.cpp:38–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace geode
37{
38 std::unique_ptr< Graph > load_graph(
39 const MeshImpl& impl, std::string_view filename )
40 {
41 constexpr auto TYPE = "Graph";
42 try
43 {
44 auto graph = detail::geode_object_input_impl< GraphInputFactory >(
45 TYPE, filename, impl );
46 Logger::info( TYPE, " has: ", graph->nb_vertices(), " vertices, ",
47 graph->nb_edges(), " edges" );
48 return graph;
49 }
50 catch( const OpenGeodeException& e )
51 {
52 Logger::error( e.what() );
53 print_available_extensions< GraphInputFactory >( TYPE );
54 Logger::info( "Other extensions are available in parent classes." );
55 print_available_extensions< VertexSetInputFactory >( "VertexSet" );
56 throw OpenGeodeMeshException{ nullptr,
57 OpenGeodeException::TYPE::internal,
58 "Cannot load Graph from file: ", filename };
59 }
60 }
61
62 std::unique_ptr< Graph > load_graph( std::string_view filename )
63 {

Callers 2

test_ioFunction · 0.85
test_backward_ioFunction · 0.85

Calls 4

infoFunction · 0.85
errorFunction · 0.85
nb_verticesMethod · 0.45
nb_edgesMethod · 0.45

Tested by 2

test_ioFunction · 0.68
test_backward_ioFunction · 0.68