igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] How bad an idea is to access the igraph_vector_t and igraph


From: Tamas Nepusz
Subject: Re: [igraph] How bad an idea is to access the igraph_vector_t and igraph_matrix_t structs directly?
Date: Tue, 1 Sep 2015 15:03:52 +0200

> The igraph_vector_t and igraph_matrix_t structs don't seem to be
> documented.  Does this mean that they are not meant to be used by end
> users and I should stick to the documented API instead of accessing
> the structs directly?
Yes, this is how they are supposed to be used.

> For my use case, working with the structs is just more convenient,
> especially for matrices.  I use C++ style being and end iterators
> which seems to be stored int he struct and stor_begin and end.
For vectors, you can also access them as VECTOR(v) and
&VECTOR(v)[igraph_vector_size(&v)] - this avoids relying on the
existence of stor_begin and stor_end.

> So, to sum up: how stable is this interface and is it very risky is I
> use it directly?
I consider it fairly stable - I see no reason why we should change it
in the future, but we do not make promises :) But, for what it's
worth, I also use them directly in the experimental C++ interface:

https://github.com/ntamas/igraphpp/blob/master/include/igraph/cpp/vector.h

T.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]