Module: IGraph::LibIGraph

Extended by:
FFI::Library
Defined in:
lib/igraph/libigraph.rb,
lib/igraph/libigraph/error.rb,
lib/igraph/libigraph/games.rb,
lib/igraph/libigraph/paths.rb,
lib/igraph/libigraph/matrix.rb,
lib/igraph/libigraph/vector.rb,
lib/igraph/libigraph/datatype.rb,
lib/igraph/libigraph/topology.rb,
lib/igraph/libigraph/bipartite.rb,
lib/igraph/libigraph/constants.rb,
lib/igraph/libigraph/interface.rb,
lib/igraph/libigraph/operators.rb,
lib/igraph/libigraph/centrality.rb,
lib/igraph/libigraph/structural.rb,
lib/igraph/libigraph/constructors.rb,
lib/igraph/libigraph/transitivity.rb

Defined Under Namespace

Classes: Graph, Matrix, MatrixStruct, VectorBoolStruct, VectorInt, VectorIntStruct, VectorStruct, VertexSelector

Constant Summary collapse

IGRAPH_SUCCESS =

Error codes

0
IGRAPH_FAILURE =
1
IGRAPH_ENOMEM =
2
IGRAPH_PARSEERROR =
3
IGRAPH_EINVAL =
4
IGRAPH_EXISTS =
5
IGRAPH_EINVEVECTOR =
6
IGRAPH_EINVVID =
7
IGRAPH_NONSQUARE =
8
IGRAPH_EINVMODE =
9
IGRAPH_EFILE =
10
IGRAPH_UNIMPLEMENTED =
12
IGRAPH_INTERRUPTED =
13
IGRAPH_DIVERGED =
14
IGRAPH_ENEGLOOP =
37
IGRAPH_EINTERNAL =
38
IGRAPH_EDIVZERO =
42
IGRAPH_EOVERFLOW =
55
IGRAPH_EUNDERFLOW =
58
IGRAPH_ERWSTUCK =
59
IGRAPH_STOP =
60
IGRAPH_ERANGE =
61
IGRAPH_ENOSOL =
62
IGRAPH_UNDIRECTED =

Graph directedness

0
IGRAPH_DIRECTED =
1
IGRAPH_NO_LOOPS =

Loop handling

0
IGRAPH_LOOPS =
1
IGRAPH_LOOPS_TWICE =
1
IGRAPH_LOOPS_ONCE =
2
IGRAPH_NO_MULTIPLE =

Multiple edges

0
IGRAPH_MULTIPLE =
1
IGRAPH_ASCENDING =

Ordering

0
IGRAPH_DESCENDING =
1
IGRAPH_MINIMUM =

Optimization

0
IGRAPH_MAXIMUM =
1
IGRAPH_OUT =

Neighbor modes

1
IGRAPH_IN =
2
IGRAPH_ALL =
3
IGRAPH_WEAK =

Connectedness

1
IGRAPH_STRONG =
2
IGRAPH_ADJ_DIRECTED =

Adjacency matrix modes

0
IGRAPH_ADJ_UNDIRECTED =
1
IGRAPH_ADJ_UPPER =
2
IGRAPH_ADJ_LOWER =
3
IGRAPH_ADJ_MIN =
4
IGRAPH_ADJ_PLUS =
5
IGRAPH_ADJ_MAX =
6
IGRAPH_STAR_OUT =

Star graph modes

0
IGRAPH_STAR_IN =
1
IGRAPH_STAR_UNDIRECTED =
2
IGRAPH_STAR_MUTUAL =
3
IGRAPH_TREE_OUT =

Tree modes

0
IGRAPH_TREE_IN =
1
IGRAPH_TREE_UNDIRECTED =
2
IGRAPH_ROW_MAJOR =

Matrix storage

0
IGRAPH_COLUMN_MAJOR =
1
IGRAPH_VS_ALL =

Vertex selector types

0
IGRAPH_VS_ADJ =
1
IGRAPH_VS_NONE =
2
IGRAPH_VS_1 =
3
IGRAPH_VS_VECTORPTR =
4
IGRAPH_VS_VECTOR =
5
IGRAPH_VS_RANGE =
6
IGRAPH_VS_NONADJ =
7
IGRAPH_ES_ALL =

Edge selector types

0
IGRAPH_ES_ALLFROM =
1
IGRAPH_ES_ALLTO =
2
IGRAPH_ES_INCIDENT =
3
IGRAPH_ES_NONE =
4
IGRAPH_ES_1 =
5
IGRAPH_ES_VECTORPTR =
6
IGRAPH_ES_VECTOR =
7
IGRAPH_ES_RANGE =
8
IGRAPH_ES_PAIRS =
9
IGRAPH_ES_PATH =
10
IGRAPH_ES_ALL_BETWEEN =
12

Class Method Summary collapse

Class Method Details

.attach_functionObject



15
16
17
18
19
# File 'lib/igraph/libigraph.rb', line 15

def self.attach_function(*)
  super
rescue FFI::NotFoundError => e
  warn e.message if $VERBOSE
end

.igraph_add_edges(pointer) ⇒ int

igraph_error_t igraph_add_edges(igraph_t *graph, const igraph_vector_int_t *edges, void *attr);

Returns:

  • (int)

    the return value of attach_function



37
# File 'lib/igraph/libigraph/interface.rb', line 37

attach_function :igraph_add_edges, i[pointer pointer pointer], :int

.igraph_add_vertices(pointer) ⇒ int

igraph_error_t igraph_add_vertices(igraph_t *graph, igraph_integer_t nv, void *attr);

Returns:

  • (int)

    the return value of attach_function



40
# File 'lib/igraph/libigraph/interface.rb', line 40

attach_function :igraph_add_vertices, i[pointer long_long pointer], :int

.igraph_adjacency(pointer) ⇒ int

igraph_error_t igraph_adjacency(igraph_t *graph, const igraph_matrix_t *adjmatrix, igraph_adjacency_t mode, igraph_loops_t loops);

Returns:

  • (int)

    the return value of attach_function



20
# File 'lib/igraph/libigraph/constructors.rb', line 20

attach_function :igraph_adjacency, i[pointer pointer int int], :int

.igraph_are_adjacent(pointer) ⇒ int

igraph_error_t igraph_are_adjacent(const igraph_t *graph, igraph_integer_t v1, igraph_integer_t v2, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



47
# File 'lib/igraph/libigraph/structural.rb', line 47

attach_function :igraph_are_adjacent, i[pointer long_long long_long pointer], :int

.igraph_atlas(pointer) ⇒ int

igraph_error_t igraph_atlas(igraph_t *graph, igraph_integer_t number);

Returns:

  • (int)

    the return value of attach_function



32
# File 'lib/igraph/libigraph/constructors.rb', line 32

attach_function :igraph_atlas, i[pointer long_long], :int

.igraph_authority_score(pointer) ⇒ int

igraph_error_t igraph_authority_score(const igraph_t *graph, igraph_vector_t *vector, igraph_real_t *value, igraph_bool_t scale, const igraph_vector_t *weights, igraph_arpack_options_t *options);

Returns:

  • (int)

    the return value of attach_function



29
# File 'lib/igraph/libigraph/centrality.rb', line 29

attach_function :igraph_authority_score, i[pointer pointer pointer bool pointer pointer], :int

.igraph_average_path_length(pointer) ⇒ int

igraph_error_t igraph_average_path_length(const igraph_t *graph, igraph_real_t *res, igraph_real_t *unconn_pairs, igraph_bool_t directed, igraph_bool_t unconn);

Returns:

  • (int)

    the return value of attach_function



53
# File 'lib/igraph/libigraph/structural.rb', line 53

attach_function :igraph_average_path_length, i[pointer pointer pointer bool bool], :int

.igraph_barabasi_game(pointer) ⇒ int

igraph_error_t igraph_barabasi_game(igraph_t *graph, igraph_integer_t n, igraph_real_t power, igraph_integer_t m, const igraph_vector_int_t *outseq, igraph_bool_t outpref, igraph_real_t A, igraph_bool_t directed, igraph_barabasi_algorithm_t algo, const igraph_t *start_from);

Returns:

  • (int)

    the return value of attach_function



14
15
# File 'lib/igraph/libigraph/games.rb', line 14

attach_function :igraph_barabasi_game,
i[pointer long_long double long_long pointer bool double bool int pointer], :int

.igraph_betweenness(pointer) ⇒ int

igraph_error_t igraph_betweenness(const igraph_t *graph, igraph_vector_t *res, const igraph_vs_t vids, igraph_bool_t directed, const igraph_vector_t *weights);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/centrality.rb', line 8

attach_function :igraph_betweenness, i[pointer pointer pointer bool pointer], :int

.igraph_closeness(pointer) ⇒ int

igraph_error_t igraph_closeness(const igraph_t *graph, igraph_vector_t *res, igraph_vector_int_t *reachable_count, igraph_bool_t *all_reachable, const igraph_vs_t vids, igraph_neimode_t mode, const igraph_vector_t *weights, igraph_bool_t normalized);

Returns:

  • (int)

    the return value of attach_function



14
# File 'lib/igraph/libigraph/centrality.rb', line 14

attach_function :igraph_closeness, i[pointer pointer pointer pointer pointer int pointer bool], :int

.igraph_complementer(pointer) ⇒ int

igraph_error_t igraph_complementer(igraph_t *res, const igraph_t *graph, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



20
# File 'lib/igraph/libigraph/operators.rb', line 20

attach_function :igraph_complementer, i[pointer pointer bool], :int

.igraph_constraint(pointer) ⇒ int

igraph_error_t igraph_constraint(const igraph_t *graph, igraph_vector_t *res, igraph_vs_t vids, const igraph_vector_t *weights);

Returns:

  • (int)

    the return value of attach_function



56
# File 'lib/igraph/libigraph/structural.rb', line 56

attach_function :igraph_constraint, i[pointer pointer int pointer], :int

.igraph_count_loops(pointer) ⇒ int

igraph_error_t igraph_count_loops(const igraph_t *graph, igraph_integer_t *loop_count);

Returns:

  • (int)

    the return value of attach_function



20
# File 'lib/igraph/libigraph/structural.rb', line 20

attach_function :igraph_count_loops, i[pointer pointer], :int

.igraph_create(pointer) ⇒ int

igraph_error_t igraph_create(igraph_t *graph, const igraph_vector_int_t *edges, igraph_integer_t n, igraph_bool_t directed);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/constructors.rb', line 8

attach_function :igraph_create, i[pointer pointer long_long bool], :int

.igraph_degree(pointer) ⇒ int

igraph_error_t igraph_degree(const igraph_t *graph, igraph_vector_int_t *res, const igraph_vs_t vids, igraph_neimode_t mode, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



53
# File 'lib/igraph/libigraph/interface.rb', line 53

attach_function :igraph_degree, [:pointer, :pointer, VertexSelector.by_value, :int, :bool], :int

.igraph_delete_edges(pointer) ⇒ int

igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges);

Returns:

  • (int)

    the return value of attach_function



56
# File 'lib/igraph/libigraph/interface.rb', line 56

attach_function :igraph_delete_edges, i[pointer int], :int

.igraph_delete_vertices(pointer) ⇒ int

igraph_error_t igraph_delete_vertices(igraph_t *graph, const igraph_vs_t vertices);

Returns:

  • (int)

    the return value of attach_function



59
# File 'lib/igraph/libigraph/interface.rb', line 59

attach_function :igraph_delete_vertices, [:pointer, VertexSelector.by_value], :int

.igraph_density(pointer) ⇒ int

igraph_error_t igraph_density(const igraph_t *graph, igraph_real_t *res, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/structural.rb', line 8

attach_function :igraph_density, i[pointer pointer bool], :int

.igraph_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_destroy(igraph_t *graph);



25
# File 'lib/igraph/libigraph/interface.rb', line 25

attach_function :igraph_destroy, [:pointer], :void

.igraph_diameter(pointer) ⇒ int

igraph_error_t igraph_diameter(const igraph_t *graph, igraph_real_t *res, igraph_integer_t *from, igraph_integer_t *to, igraph_bool_t directed, igraph_bool_t unconn);

Returns:

  • (int)

    the return value of attach_function



16
# File 'lib/igraph/libigraph/paths.rb', line 16

attach_function :igraph_diameter, i[pointer pointer pointer pointer bool bool], :int

.igraph_difference(pointer) ⇒ int

igraph_error_t igraph_difference(igraph_t *res, const igraph_t *orig, const igraph_t *sub);

Returns:

  • (int)

    the return value of attach_function



17
# File 'lib/igraph/libigraph/operators.rb', line 17

attach_function :igraph_difference, i[pointer pointer pointer], :int

.igraph_disjoint_union(pointer) ⇒ int

igraph_error_t igraph_disjoint_union(igraph_t *res, const igraph_t *left, const igraph_t *right);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/operators.rb', line 8

attach_function :igraph_disjoint_union, i[pointer pointer pointer], :int

.igraph_distances(pointer) ⇒ int

igraph_error_t igraph_distances(const igraph_t *graph, igraph_matrix_t *res, const igraph_vs_t from, const igraph_vs_t to, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



9
# File 'lib/igraph/libigraph/paths.rb', line 9

attach_function :igraph_distances, i[pointer pointer int int int], :int

.igraph_eccentricity(pointer) ⇒ int

igraph_error_t igraph_eccentricity(const igraph_t *graph, igraph_vector_t *res, const igraph_vs_t vids, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



22
# File 'lib/igraph/libigraph/paths.rb', line 22

attach_function :igraph_eccentricity, i[pointer pointer int int], :int

.igraph_ecount(pointer) ⇒ long_long

igraph_integer_t igraph_ecount(const igraph_t *graph);

Returns:

  • (long_long)

    the return value of attach_function



31
# File 'lib/igraph/libigraph/interface.rb', line 31

attach_function :igraph_ecount, [:pointer], :long_long

.igraph_edge(pointer) ⇒ int

igraph_error_t igraph_edge(const igraph_t *graph, igraph_integer_t eid, igraph_integer_t *from, igraph_integer_t *to);

Returns:

  • (int)

    the return value of attach_function



62
# File 'lib/igraph/libigraph/interface.rb', line 62

attach_function :igraph_edge, i[pointer long_long pointer pointer], :int

.igraph_edges(pointer) ⇒ int

igraph_error_t igraph_edges(const igraph_t *graph, igraph_es_t eids, igraph_vector_int_t *edges);

Returns:

  • (int)

    the return value of attach_function



65
# File 'lib/igraph/libigraph/interface.rb', line 65

attach_function :igraph_edges, i[pointer int pointer], :int

.igraph_eigenvector_centrality(pointer) ⇒ int

igraph_error_t igraph_eigenvector_centrality(const igraph_t *graph, igraph_vector_t *vector, igraph_real_t *value, igraph_bool_t directed, igraph_bool_t scale, const igraph_vector_t *weights, igraph_arpack_options_t *options);

Returns:

  • (int)

    the return value of attach_function



17
# File 'lib/igraph/libigraph/centrality.rb', line 17

attach_function :igraph_eigenvector_centrality, i[pointer pointer pointer bool bool pointer pointer], :int

.igraph_empty(pointer) ⇒ int

igraph_error_t igraph_empty(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed);

Returns:

  • (int)

    the return value of attach_function



22
# File 'lib/igraph/libigraph/interface.rb', line 22

attach_function :igraph_empty, i[pointer long_long bool], :int

.igraph_erdos_renyi_game_gnm(pointer) ⇒ int

igraph_error_t igraph_erdos_renyi_game_gnm(igraph_t *graph, igraph_integer_t n, igraph_integer_t m, igraph_bool_t directed, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/games.rb', line 11

attach_function :igraph_erdos_renyi_game_gnm, i[pointer long_long long_long bool bool], :int

.igraph_erdos_renyi_game_gnp(pointer) ⇒ int

igraph_error_t igraph_erdos_renyi_game_gnp(igraph_t *graph, igraph_integer_t n, igraph_real_t p, igraph_bool_t directed, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/games.rb', line 8

attach_function :igraph_erdos_renyi_game_gnp, i[pointer long_long double bool bool], :int

.igraph_error(string) ⇒ int

igraph_error_t igraph_error(const char *reason, const char *file, int line, igraph_error_t igraph_errno);

Returns:

  • (int)

    the return value of attach_function



32
# File 'lib/igraph/libigraph/error.rb', line 32

attach_function :igraph_error, i[string string int int], :int

.igraph_full(pointer) ⇒ int

igraph_error_t igraph_full(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/constructors.rb', line 11

attach_function :igraph_full, i[pointer long_long bool bool], :int

.igraph_get_eid(pointer) ⇒ int

igraph_error_t igraph_get_eid(const igraph_t *graph, igraph_integer_t *eid, igraph_integer_t from, igraph_integer_t to, igraph_bool_t directed, igraph_bool_t error);

Returns:

  • (int)

    the return value of attach_function



68
# File 'lib/igraph/libigraph/interface.rb', line 68

attach_function :igraph_get_eid, i[pointer pointer long_long long_long bool bool], :int

.igraph_get_shortest_paths_dijkstra(pointer) ⇒ int

igraph_error_t igraph_get_shortest_paths_dijkstra(const igraph_t *graph, igraph_vector_int_list_t *vertices, igraph_vector_int_list_t *edges, igraph_integer_t from, const igraph_vs_t to, const igraph_vector_t *weights, igraph_neimode_t mode, igraph_vector_int_t *predecessors, igraph_vector_int_t *inbound_edges);

Returns:

  • (int)

    the return value of attach_function



12
13
# File 'lib/igraph/libigraph/paths.rb', line 12

attach_function :igraph_get_shortest_paths_dijkstra,
i[pointer pointer pointer long_long int pointer int pointer pointer], :int

.igraph_girth(pointer) ⇒ int

igraph_error_t igraph_girth(const igraph_t *graph, igraph_real_t *girth, igraph_vector_int_t *circle);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/structural.rb', line 11

attach_function :igraph_girth, i[pointer pointer pointer], :int

.igraph_growing_random_game(pointer) ⇒ int

igraph_error_t igraph_growing_random_game(igraph_t *graph, igraph_integer_t n, igraph_integer_t m, igraph_bool_t directed, igraph_bool_t citation);

Returns:

  • (int)

    the return value of attach_function



25
# File 'lib/igraph/libigraph/games.rb', line 25

attach_function :igraph_growing_random_game, i[pointer long_long long_long bool bool], :int

.igraph_harmonic_centrality(pointer) ⇒ int

igraph_error_t igraph_harmonic_centrality(const igraph_t *graph, igraph_vector_t *res, const igraph_vs_t vids, igraph_neimode_t mode, const igraph_vector_t *weights, igraph_bool_t normalized);

Returns:

  • (int)

    the return value of attach_function



23
# File 'lib/igraph/libigraph/centrality.rb', line 23

attach_function :igraph_harmonic_centrality, i[pointer pointer pointer int pointer bool], :int

.igraph_has_loop(pointer) ⇒ int

igraph_error_t igraph_has_loop(const igraph_t *graph, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



14
# File 'lib/igraph/libigraph/structural.rb', line 14

attach_function :igraph_has_loop, i[pointer pointer], :int

.igraph_has_multiple(pointer) ⇒ int

igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



17
# File 'lib/igraph/libigraph/structural.rb', line 17

attach_function :igraph_has_multiple, i[pointer pointer], :int

.igraph_hub_and_authority_scores(pointer) ⇒ int

igraph_error_t igraph_hub_and_authority_scores(const igraph_t *graph, igraph_vector_t *hub_vector, igraph_vector_t *authority_vector, igraph_real_t *value, igraph_bool_t scale, const igraph_vector_t *weights, igraph_arpack_options_t *options);

Returns:

  • (int)

    the return value of attach_function



20
# File 'lib/igraph/libigraph/centrality.rb', line 20

attach_function :igraph_hub_and_authority_scores, i[pointer pointer pointer pointer bool pointer pointer], :int

.igraph_hub_score(pointer) ⇒ int

igraph_error_t igraph_hub_score(const igraph_t *graph, igraph_vector_t *vector, igraph_real_t *value, igraph_bool_t scale, const igraph_vector_t *weights, igraph_arpack_options_t *options);

Returns:

  • (int)

    the return value of attach_function



26
# File 'lib/igraph/libigraph/centrality.rb', line 26

attach_function :igraph_hub_score, i[pointer pointer pointer bool pointer pointer], :int

.igraph_incident(pointer) ⇒ int

igraph_error_t igraph_incident(const igraph_t *graph, igraph_vector_int_t *eids, igraph_integer_t vid, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



71
# File 'lib/igraph/libigraph/interface.rb', line 71

attach_function :igraph_incident, i[pointer pointer long_long int], :int

.igraph_intersection(pointer) ⇒ int

igraph_error_t igraph_intersection(igraph_t *res, const igraph_t *left, const igraph_t *right, igraph_vector_int_t *edge_map1, igraph_vector_int_t *edge_map2);

Returns:

  • (int)

    the return value of attach_function



14
# File 'lib/igraph/libigraph/operators.rb', line 14

attach_function :igraph_intersection, i[pointer pointer pointer pointer pointer], :int

.igraph_is_acyclic(pointer) ⇒ int

igraph_error_t igraph_is_acyclic(const igraph_t *graph, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



29
# File 'lib/igraph/libigraph/structural.rb', line 29

attach_function :igraph_is_acyclic, i[pointer pointer], :int

.igraph_is_bipartite(pointer) ⇒ int

igraph_error_t igraph_is_bipartite(const igraph_t *graph, igraph_bool_t *res, igraph_vector_bool_t *type);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/bipartite.rb', line 8

attach_function :igraph_is_bipartite, i[pointer pointer pointer], :int

.igraph_is_complete(pointer) ⇒ int

igraph_error_t igraph_is_complete(const igraph_t *graph, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



44
# File 'lib/igraph/libigraph/structural.rb', line 44

attach_function :igraph_is_complete, i[pointer pointer], :int

.igraph_is_connected(pointer) ⇒ int

igraph_error_t igraph_is_connected(const igraph_t *graph, igraph_bool_t *res, igraph_connectedness_t mode);

Returns:

  • (int)

    the return value of attach_function



50
# File 'lib/igraph/libigraph/structural.rb', line 50

attach_function :igraph_is_connected, i[pointer pointer int], :int

.igraph_is_directed(pointer) ⇒ bool

igraph_bool_t igraph_is_directed(const igraph_t *graph);

Returns:

  • (bool)

    the return value of attach_function



34
# File 'lib/igraph/libigraph/interface.rb', line 34

attach_function :igraph_is_directed, [:pointer], :bool

.igraph_is_forest(pointer) ⇒ int

igraph_error_t igraph_is_forest(const igraph_t *graph, igraph_bool_t *res, igraph_vector_int_t *roots, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



32
# File 'lib/igraph/libigraph/structural.rb', line 32

attach_function :igraph_is_forest, i[pointer pointer pointer int], :int

.igraph_is_simple(pointer) ⇒ int

igraph_error_t igraph_is_simple(const igraph_t *graph, igraph_bool_t *res);

Returns:

  • (int)

    the return value of attach_function



23
# File 'lib/igraph/libigraph/structural.rb', line 23

attach_function :igraph_is_simple, i[pointer pointer], :int

.igraph_is_tree(pointer) ⇒ int

igraph_error_t igraph_is_tree(const igraph_t *graph, igraph_bool_t *res, igraph_integer_t *root, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



26
# File 'lib/igraph/libigraph/structural.rb', line 26

attach_function :igraph_is_tree, i[pointer pointer pointer int], :int

.igraph_isomorphic(pointer) ⇒ int

igraph_error_t igraph_isomorphic(const igraph_t *graph1, const igraph_t *graph2, igraph_bool_t *iso);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/topology.rb', line 11

attach_function :igraph_isomorphic, i[pointer pointer pointer], :int

.igraph_isomorphic_vf2(pointer) ⇒ int

igraph_error_t igraph_isomorphic_vf2(const igraph_t *graph1, const igraph_t *graph2, const igraph_vector_int_t *vertex_color1, const igraph_vector_int_t *vertex_color2, const igraph_vector_int_t *edge_color1, const igraph_vector_int_t *edge_color2, igraph_bool_t *iso, igraph_vector_int_t *map12, igraph_vector_int_t *map21, igraph_isohandler_t *isohandler, igraph_isocompat_t *node_compat_fn, igraph_isocompat_t *edge_compat_fn, void *arg);

Returns:

  • (int)

    the return value of attach_function



14
15
# File 'lib/igraph/libigraph/topology.rb', line 14

attach_function :igraph_isomorphic_vf2,
i[pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer], :int

.igraph_k_regular_game(pointer) ⇒ int

igraph_error_t igraph_k_regular_game(igraph_t *graph, igraph_integer_t no_of_nodes, igraph_integer_t k, igraph_bool_t directed, igraph_bool_t multiple);

Returns:

  • (int)

    the return value of attach_function



22
# File 'lib/igraph/libigraph/games.rb', line 22

attach_function :igraph_k_regular_game, i[pointer long_long long_long bool bool], :int

.igraph_kary_tree(pointer) ⇒ int

igraph_error_t igraph_kary_tree(igraph_t *graph, igraph_integer_t n, igraph_integer_t children, igraph_tree_mode_t type);

Returns:

  • (int)

    the return value of attach_function



29
# File 'lib/igraph/libigraph/constructors.rb', line 29

attach_function :igraph_kary_tree, i[pointer long_long long_long int], :int

.igraph_matrix_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_matrix_destroy(igraph_matrix_t *m);



28
# File 'lib/igraph/libigraph/matrix.rb', line 28

attach_function :igraph_matrix_destroy, [:pointer], :void

.igraph_matrix_fill(pointer) ⇒ void

This method returns an undefined value.

void igraph_matrix_fill(igraph_matrix_t *m, double e);



46
# File 'lib/igraph/libigraph/matrix.rb', line 46

attach_function :igraph_matrix_fill, i[pointer double], :void

.igraph_matrix_get(pointer) ⇒ double

double igraph_matrix_get(const igraph_matrix_t *m, igraph_integer_t row, igraph_integer_t col);

Returns:

  • (double)

    the return value of attach_function



37
# File 'lib/igraph/libigraph/matrix.rb', line 37

attach_function :igraph_matrix_get, i[pointer long_long long_long], :double

.igraph_matrix_init(pointer) ⇒ int

igraph_error_t igraph_matrix_init(igraph_matrix_t *m, igraph_integer_t nrow, igraph_integer_t ncol);

Returns:

  • (int)

    the return value of attach_function



25
# File 'lib/igraph/libigraph/matrix.rb', line 25

attach_function :igraph_matrix_init, i[pointer long_long long_long], :int

.igraph_matrix_ncol(pointer) ⇒ long_long

igraph_integer_t igraph_matrix_ncol(const igraph_matrix_t *m);

Returns:

  • (long_long)

    the return value of attach_function



34
# File 'lib/igraph/libigraph/matrix.rb', line 34

attach_function :igraph_matrix_ncol, [:pointer], :long_long

.igraph_matrix_nrow(pointer) ⇒ long_long

igraph_integer_t igraph_matrix_nrow(const igraph_matrix_t *m);

Returns:

  • (long_long)

    the return value of attach_function



31
# File 'lib/igraph/libigraph/matrix.rb', line 31

attach_function :igraph_matrix_nrow, [:pointer], :long_long

.igraph_matrix_null(pointer) ⇒ void

This method returns an undefined value.

void igraph_matrix_null(igraph_matrix_t *m);



43
# File 'lib/igraph/libigraph/matrix.rb', line 43

attach_function :igraph_matrix_null, [:pointer], :void

.igraph_matrix_set(pointer) ⇒ void

This method returns an undefined value.

void igraph_matrix_set(igraph_matrix_t *m, igraph_integer_t row, igraph_integer_t col, double value);



40
# File 'lib/igraph/libigraph/matrix.rb', line 40

attach_function :igraph_matrix_set, i[pointer long_long long_long double], :void

.igraph_maxdegree(pointer) ⇒ int

igraph_error_t igraph_maxdegree(const igraph_t *graph, igraph_integer_t *res, igraph_vs_t vids, igraph_neimode_t mode, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



35
# File 'lib/igraph/libigraph/structural.rb', line 35

attach_function :igraph_maxdegree, i[pointer pointer int int bool], :int

.igraph_maximum_bipartite_matching(pointer) ⇒ int

igraph_error_t igraph_maximum_bipartite_matching(const igraph_t* graph, const igraph_vector_bool_t* types, igraph_integer_t* matching_size, igraph_real_t* matching_weight, igraph_vector_int_t* matching, const igraph_vector_t* weights, igraph_real_t eps);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/bipartite.rb', line 11

attach_function :igraph_maximum_bipartite_matching, i[pointer pointer pointer pointer pointer pointer double], :int

.igraph_mean_degree(pointer) ⇒ int

igraph_error_t igraph_mean_degree(const igraph_t *graph, igraph_real_t *res, igraph_bool_t loops);

Returns:

  • (int)

    the return value of attach_function



38
# File 'lib/igraph/libigraph/structural.rb', line 38

attach_function :igraph_mean_degree, i[pointer pointer bool], :int

.igraph_neighbors(pointer) ⇒ int

igraph_error_t igraph_neighbors(const igraph_t *graph, igraph_vector_int_t *neis, igraph_integer_t vid, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



43
# File 'lib/igraph/libigraph/interface.rb', line 43

attach_function :igraph_neighbors, i[pointer pointer long_long int], :int

.igraph_pagerank(pointer) ⇒ int

igraph_error_t igraph_pagerank(const igraph_t *graph, igraph_pagerank_algo_t algo, igraph_vector_t *vector, igraph_real_t *value, const igraph_vs_t vids, igraph_bool_t directed, igraph_real_t damping, const igraph_vector_t *weights, igraph_arpack_options_t *options);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/centrality.rb', line 11

attach_function :igraph_pagerank, i[pointer int pointer pointer pointer bool double pointer pointer], :int

.igraph_radius(pointer) ⇒ int

igraph_error_t igraph_radius(const igraph_t *graph, igraph_real_t *radius, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



19
# File 'lib/igraph/libigraph/paths.rb', line 19

attach_function :igraph_radius, i[pointer pointer int], :int

.igraph_reciprocity(pointer) ⇒ int

igraph_error_t igraph_reciprocity(const igraph_t *graph, igraph_real_t *res, igraph_bool_t ignore_loops, igraph_reciprocity_t mode);

Returns:

  • (int)

    the return value of attach_function



41
# File 'lib/igraph/libigraph/structural.rb', line 41

attach_function :igraph_reciprocity, i[pointer pointer bool int], :int

.igraph_ring(pointer) ⇒ int

igraph_error_t igraph_ring(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, igraph_bool_t mutual, igraph_bool_t circular);

Returns:

  • (int)

    the return value of attach_function



17
# File 'lib/igraph/libigraph/constructors.rb', line 17

attach_function :igraph_ring, i[pointer long_long bool bool bool], :int

.igraph_small(pointer) ⇒ int

igraph_error_t igraph_small(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, int first, …);

Returns:

  • (int)

    the return value of attach_function



23
# File 'lib/igraph/libigraph/constructors.rb', line 23

attach_function :igraph_small, i[pointer long_long bool int varargs], :int

.igraph_star(pointer) ⇒ int

igraph_error_t igraph_star(igraph_t *graph, igraph_integer_t n, igraph_star_mode_t mode, igraph_integer_t center);

Returns:

  • (int)

    the return value of attach_function



14
# File 'lib/igraph/libigraph/constructors.rb', line 14

attach_function :igraph_star, i[pointer long_long int long_long], :int

.igraph_strerror(int) ⇒ string

const char *igraph_strerror(const igraph_error_t igraph_errno);

Returns:

  • (string)

    the return value of attach_function



29
# File 'lib/igraph/libigraph/error.rb', line 29

attach_function :igraph_strerror, [:int], :string

.igraph_topological_sorting(pointer) ⇒ int

igraph_error_t igraph_topological_sorting(const igraph_t *graph, igraph_vector_int_t *res, igraph_neimode_t mode);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/topology.rb', line 8

attach_function :igraph_topological_sorting, i[pointer pointer int], :int

.igraph_transitivity_avglocal_undirected(pointer) ⇒ int

igraph_error_t igraph_transitivity_avglocal_undirected(const igraph_t *graph, igraph_real_t *res, igraph_transitivity_mode_t mode);

Returns:

  • (int)

    the return value of attach_function



14
# File 'lib/igraph/libigraph/transitivity.rb', line 14

attach_function :igraph_transitivity_avglocal_undirected, i[pointer pointer int], :int

.igraph_transitivity_barrat(pointer) ⇒ int

igraph_error_t igraph_transitivity_barrat(const igraph_t *graph, igraph_vector_t *res, const igraph_vs_t vids, const igraph_vector_t *weights, const igraph_transitivity_mode_t mode);

Returns:

  • (int)

    the return value of attach_function



17
# File 'lib/igraph/libigraph/transitivity.rb', line 17

attach_function :igraph_transitivity_barrat, i[pointer pointer int pointer int], :int

.igraph_transitivity_local_undirected(pointer) ⇒ int

igraph_error_t igraph_transitivity_local_undirected(const igraph_t *graph, igraph_vector_t *res, const igraph_vs_t vids, igraph_transitivity_mode_t mode);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/transitivity.rb', line 11

attach_function :igraph_transitivity_local_undirected, i[pointer pointer int int], :int

.igraph_transitivity_undirected(pointer) ⇒ int

igraph_error_t igraph_transitivity_undirected(const igraph_t *graph, igraph_real_t *res, igraph_transitivity_mode_t mode);

Returns:

  • (int)

    the return value of attach_function



8
# File 'lib/igraph/libigraph/transitivity.rb', line 8

attach_function :igraph_transitivity_undirected, i[pointer pointer int], :int

.igraph_tree_game(pointer) ⇒ int

igraph_error_t igraph_tree_game(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, igraph_random_tree_t method);

Returns:

  • (int)

    the return value of attach_function



28
# File 'lib/igraph/libigraph/games.rb', line 28

attach_function :igraph_tree_game, i[pointer long_long bool int], :int

.igraph_union(pointer) ⇒ int

igraph_error_t igraph_union(igraph_t *res, const igraph_t *left, const igraph_t *right, igraph_vector_int_t *edge_map1, igraph_vector_int_t *edge_map2);

Returns:

  • (int)

    the return value of attach_function



11
# File 'lib/igraph/libigraph/operators.rb', line 11

attach_function :igraph_union, i[pointer pointer pointer pointer pointer], :int

.igraph_vcount(pointer) ⇒ long_long

igraph_integer_t igraph_vcount(const igraph_t *graph);

Returns:

  • (long_long)

    the return value of attach_function



28
# File 'lib/igraph/libigraph/interface.rb', line 28

attach_function :igraph_vcount, [:pointer], :long_long

.igraph_vector_bool_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_bool_destroy(igraph_vector_bool_t *v);



76
# File 'lib/igraph/libigraph/vector.rb', line 76

attach_function :igraph_vector_bool_destroy, [:pointer], :void

.igraph_vector_bool_get(pointer) ⇒ bool

bool igraph_vector_bool_get(const igraph_vector_bool_t *v, igraph_integer_t pos);

Returns:

  • (bool)

    the return value of attach_function



82
# File 'lib/igraph/libigraph/vector.rb', line 82

attach_function :igraph_vector_bool_get, i[pointer long_long], :bool

.igraph_vector_bool_init(pointer) ⇒ int

igraph_vector_bool_t functions igraph_error_t igraph_vector_bool_init(igraph_vector_bool_t *v, igraph_integer_t size);

Returns:

  • (int)

    the return value of attach_function



73
# File 'lib/igraph/libigraph/vector.rb', line 73

attach_function :igraph_vector_bool_init, i[pointer long_long], :int

.igraph_vector_bool_set(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_bool_set(igraph_vector_bool_t *v, igraph_integer_t pos, bool value);



85
# File 'lib/igraph/libigraph/vector.rb', line 85

attach_function :igraph_vector_bool_set, i[pointer long_long bool], :void

.igraph_vector_bool_size(pointer) ⇒ long_long

igraph_integer_t igraph_vector_bool_size(const igraph_vector_bool_t *v);

Returns:

  • (long_long)

    the return value of attach_function



79
# File 'lib/igraph/libigraph/vector.rb', line 79

attach_function :igraph_vector_bool_size, [:pointer], :long_long

.igraph_vector_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_destroy(igraph_vector_t *v);



60
# File 'lib/igraph/libigraph/vector.rb', line 60

attach_function :igraph_vector_destroy, [:pointer], :void

.igraph_vector_get(pointer) ⇒ double

double igraph_vector_get(const igraph_vector_t *v, igraph_integer_t pos);

Returns:

  • (double)

    the return value of attach_function



66
# File 'lib/igraph/libigraph/vector.rb', line 66

attach_function :igraph_vector_get, i[pointer long_long], :double

.igraph_vector_init(pointer) ⇒ int

igraph_vector_t (double vector) functions igraph_error_t igraph_vector_init(igraph_vector_t *v, igraph_integer_t size);

Returns:

  • (int)

    the return value of attach_function



57
# File 'lib/igraph/libigraph/vector.rb', line 57

attach_function :igraph_vector_init, i[pointer long_long], :int

.igraph_vector_int_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_int_destroy(igraph_vector_int_t *v);



44
# File 'lib/igraph/libigraph/vector.rb', line 44

attach_function :igraph_vector_int_destroy, [:pointer], :void

.igraph_vector_int_get(pointer) ⇒ int

int igraph_vector_int_get(const igraph_vector_int_t *v, igraph_integer_t pos);

Returns:

  • (int)

    the return value of attach_function



50
# File 'lib/igraph/libigraph/vector.rb', line 50

attach_function :igraph_vector_int_get, i[pointer long_long], :int

.igraph_vector_int_init(pointer) ⇒ int

igraph_error_t igraph_vector_int_init(igraph_vector_int_t *v, igraph_integer_t size);

Returns:

  • (int)

    the return value of attach_function



41
# File 'lib/igraph/libigraph/vector.rb', line 41

attach_function :igraph_vector_int_init, i[pointer long_long], :int

.igraph_vector_int_set(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_int_set(igraph_vector_int_t *v, igraph_integer_t pos, int value);



53
# File 'lib/igraph/libigraph/vector.rb', line 53

attach_function :igraph_vector_int_set, i[pointer long_long int], :void

.igraph_vector_int_size(pointer) ⇒ long_long

igraph_integer_t igraph_vector_int_size(const igraph_vector_int_t *v);

Returns:

  • (long_long)

    the return value of attach_function



47
# File 'lib/igraph/libigraph/vector.rb', line 47

attach_function :igraph_vector_int_size, [:pointer], :long_long

.igraph_vector_set(pointer) ⇒ void

This method returns an undefined value.

void igraph_vector_set(igraph_vector_t *v, igraph_integer_t pos, double value);



69
# File 'lib/igraph/libigraph/vector.rb', line 69

attach_function :igraph_vector_set, i[pointer long_long double], :void

.igraph_vector_size(pointer) ⇒ long_long

igraph_integer_t igraph_vector_size(const igraph_vector_t *v);

Returns:

  • (long_long)

    the return value of attach_function



63
# File 'lib/igraph/libigraph/vector.rb', line 63

attach_function :igraph_vector_size, [:pointer], :long_long

.igraph_version(pointer) ⇒ void

This method returns an undefined value.

IGRAPH_EXPORT void IGraphconst char **version_string,

int *major,
int *minor,
int *subminor);


25
# File 'lib/igraph/libigraph.rb', line 25

attach_function :igraph_version, i[pointer pointer pointer pointer], :void

.igraph_vs_all(pointer) ⇒ int

Vertex selector functions igraph_error_t igraph_vs_all(igraph_vs_t *vs);

Returns:

  • (int)

    the return value of attach_function



47
# File 'lib/igraph/libigraph/interface.rb', line 47

attach_function :igraph_vs_all, [:pointer], :int

.igraph_vs_destroy(pointer) ⇒ void

This method returns an undefined value.

void igraph_vs_destroy(igraph_vs_t *vs);



50
# File 'lib/igraph/libigraph/interface.rb', line 50

attach_function :igraph_vs_destroy, [:pointer], :void

.igraph_watts_strogatz_game(pointer) ⇒ int

igraph_error_t igraph_watts_strogatz_game(igraph_t *graph, igraph_integer_t dim, igraph_integer_t size, igraph_integer_t nei, igraph_real_t p, igraph_bool_t loops, igraph_bool_t multiple);

Returns:

  • (int)

    the return value of attach_function



18
19
# File 'lib/igraph/libigraph/games.rb', line 18

attach_function :igraph_watts_strogatz_game, i[pointer long_long long_long long_long double bool bool],
:int

.igraph_wheel(pointer) ⇒ int

igraph_error_t igraph_wheel(igraph_t *graph, igraph_integer_t n, igraph_wheel_mode_t mode, igraph_integer_t center);

Returns:

  • (int)

    the return value of attach_function



26
# File 'lib/igraph/libigraph/constructors.rb', line 26

attach_function :igraph_wheel, i[pointer long_long int long_long], :int