1 /* -*- mode: C -*- */ 2 /* 3 IGraph library. 4 Copyright (C) 2009-2012 Gabor Csardi <csardi.gabor@gmail.com> 5 334 Harvard street, Cambridge, MA 02139 USA 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 02110-1301 USA 21 22 */ 23 24 #ifndef IGRAPH_CONSTRUCTORS_H 25 #define IGRAPH_CONSTRUCTORS_H 26 27 #include "igraph_decls.h" 28 #include "igraph_constants.h" 29 #include "igraph_types.h" 30 #include "igraph_matrix.h" 31 #include "igraph_datatype.h" 32 #include "igraph_graphicality.h" 33 34 __BEGIN_DECLS 35 36 /* -------------------------------------------------- */ 37 /* Constructors, deterministic */ 38 /* -------------------------------------------------- */ 39 40 IGRAPH_EXPORT int igraph_create(igraph_t *graph, const igraph_vector_t *edges, igraph_integer_t n, 41 igraph_bool_t directed); 42 IGRAPH_EXPORT int igraph_small(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, 43 ...); 44 IGRAPH_EXPORT int igraph_adjacency(igraph_t *graph, igraph_matrix_t *adjmatrix, 45 igraph_adjacency_t mode); 46 IGRAPH_EXPORT int igraph_weighted_adjacency(igraph_t *graph, igraph_matrix_t *adjmatrix, 47 igraph_adjacency_t mode, const char* attr, 48 igraph_bool_t loops); 49 IGRAPH_EXPORT int igraph_star(igraph_t *graph, igraph_integer_t n, igraph_star_mode_t mode, 50 igraph_integer_t center); 51 IGRAPH_EXPORT int igraph_lattice(igraph_t *graph, const igraph_vector_t *dimvector, igraph_integer_t nei, 52 igraph_bool_t directed, igraph_bool_t mutual, igraph_bool_t circular); 53 IGRAPH_EXPORT int igraph_ring(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, 54 igraph_bool_t mutual, igraph_bool_t circular); 55 IGRAPH_EXPORT int igraph_tree(igraph_t *graph, igraph_integer_t n, igraph_integer_t children, 56 igraph_tree_mode_t type); 57 IGRAPH_EXPORT int igraph_from_prufer(igraph_t *graph, const igraph_vector_int_t *prufer); 58 IGRAPH_EXPORT int igraph_full(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, igraph_bool_t loops); 59 IGRAPH_EXPORT int igraph_full_citation(igraph_t *graph, igraph_integer_t n, 60 igraph_bool_t directed); 61 IGRAPH_EXPORT int igraph_atlas(igraph_t *graph, int number); 62 IGRAPH_EXPORT int igraph_extended_chordal_ring(igraph_t *graph, igraph_integer_t nodes, 63 const igraph_matrix_t *W, igraph_bool_t directed); 64 IGRAPH_EXPORT int igraph_linegraph(const igraph_t *graph, igraph_t *linegraph); 65 66 IGRAPH_EXPORT int igraph_de_bruijn(igraph_t *graph, igraph_integer_t m, igraph_integer_t n); 67 IGRAPH_EXPORT int igraph_kautz(igraph_t *graph, igraph_integer_t m, igraph_integer_t n); 68 IGRAPH_EXPORT int igraph_famous(igraph_t *graph, const char *name); 69 IGRAPH_EXPORT int igraph_lcf_vector(igraph_t *graph, igraph_integer_t n, 70 const igraph_vector_t *shifts, 71 igraph_integer_t repeats); 72 IGRAPH_EXPORT int igraph_lcf(igraph_t *graph, igraph_integer_t n, ...); 73 IGRAPH_EXPORT int igraph_realize_degree_sequence(igraph_t *graph, 74 const igraph_vector_t *outdeg, const igraph_vector_t *indeg, 75 igraph_edge_type_sw_t allowed_edge_types, 76 igraph_realize_degseq_t method); 77 78 __END_DECLS 79 80 #endif 81