Module: RGraph::IO::GraphML
- Included in:
- Graph
- Defined in:
- lib/rgraph/io/graph_ml.rb
Overview
GraphML
Defined Under Namespace
Modules: Read
Class Method Summary collapse
-
.included(base) ⇒ Object
Adds class methods.
Instance Method Summary collapse
-
#write(path, prefixattr: false) ⇒ Object
Writes the graph to a file in GraphML format.
Class Method Details
Instance Method Details
#write(path, prefixattr: false) ⇒ Object
Writes the graph to a file in GraphML format.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rgraph/io/graph_ml.rb', line 32 def write(path, prefixattr: false) file_pointer = Bindings::C.fopen(path, "w") if file_pointer.null? raise "Error: Openning a file with fopen failed." end Bindings.igraph_write_graph_graphml(self, file_pointer, prefixattr) Bindings::C.fclose(file_pointer) end |