| igraph Reference Manual |
|---|
int igraph_lazy_adjedgelist_init(const igraph_t *graph, igraph_lazy_adjedgelist_t *al, igraph_neimode_t mode);
Create a lazy adjacency list for edges. This function only
allocates some memory for storing the vectors of an adjacency list,
but the adjacent edges are not queried, only when igraph_lazy_adjedgelist_get() is called.
Arguments:
|
The input graph. |
|
Pointer to an uninitialized adjacency list. |
|
Constant, it gives whether incoming edges
( |
Returns:
Error code. |
Time complexity: O(|V|), the number of vertices, possibly. But it also depends on the underlying memory management too.
void igraph_lazy_adjedgelist_destroy(igraph_lazy_adjedgelist_t *al);
Free all allocated memory for a lazy edge adjacency list.
Arguments:
|
The adjacency list to deallocate. |
Time complexity: depends on memory management.
#define igraph_lazy_adjedgelist_get(al,no)
If the function is called for the first time for a vertex, then the result is stored in the adjacency list and no further query operations are needed when the adjacent edges of the same vertex are queried again.
Arguments:
|
The lazy adjacency list object. |
|
The vertex id to query. |
Returns:
Pointer to a vector. It is allowed to modify it and modification does not affect the original graph. |
Time complexity: O(d), the number of adjacent edges for the first
time, O(1) for subsequent calls with the same no argument.
| << 9.3. Lazy adjacency list for vertices | Chapter 7. Graph Generators >> |