Hi,
there is no API for this. But igraph_hrg_t is just
typedef struct igraph_hrg_t {
igraph_vector_t left, right, prob, edges, vertices;
} igraph_hrg_t;
so you could iterate over the vectors and save all of them in any format
you like.
G.
On Wed, Apr 24, 2013 at 9:28 AM, Bastian Entrup <
[email protected]> wrote:
> Hi Everyone,
>
> I'm trying out igraph in C right now and am wondering if i there is a a
> function to save a hrg object. I'm fitting the hrg to my graph and would
> like to save the state afterwards, so i can reuse the hrg later.
>
> Here you can see some sample code to (hopefully) clarify what i'm trying
> to do:
>
> //load graph
> FILE *input;
> igraph_t graph;
> input=fopen("gn_no.pairs","r");
> igraph_read_graph_edgelist(&graph, input,0,1);
> //hrg
> igraph_hrg_t hrg;
> igraph_hrg_init(&hrg,igraph_vcount(&graph));
> printf("number V: %d\n",igraph_vcount(&graph));
> igraph_hrg_fit(&graph,&hrg,0,0);
> //save hrg at this point to disk
> igraph_hrg_destroy(&hrg);
> igraph_destroy(&graph);
>
> Best regards,
> Bastian
>
> ---
> Bastian Entrup · Tel.: +49(0)641 99-29053 · Fax: -29059
> Justus-Liebig-Universität Gießen · FB 05 · Institut für Germanistik
> Arbeitsbereich Angewandte Sprachwissenschaft und Computerlinguistik
> Philosophikum I Büro D 410 · Otto-Behaghel-Str. 10 D · 35394 Gießen
>
> Justus Liebig University Giessen
> Applied and Computational Linguistics
> Otto-Behaghel-Str. 10 D
> 35394 Giessen, Germany
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <[email protected]> MTA KFKI RMKI
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help