2.5. Vector views

2.5.1. igraph_vector_view — Handle a regular C array as a igraph_vector_t.

2.5.1. igraph_vector_view — Handle a regular C array as a igraph_vector_t.

const igraph_vector_t*igraph_vector_view (const igraph_vector_t *v,
							const igraph_real_t *data, 
							long int length);

This is a special igraph_vector_t constructor. It allows to handle a regular C array as a igraph_vector_t temporarily. Be sure that you don't ever call the destructor (igraph_vector_destroy()) on objects created by this constructor.

Arguments: 

v:

Pointer to an uninitialized igraph_vector_t object.

data:

Pointer, the C array.

length:

The length of the C array.

Returns: 

Pointer to the vector object, the same as the v parameter, for convenience.

Time complexity: O(1)