Skip to content

Commit 7f7bdd6

Browse files
committed
vendor: Update vendored sources to igraph/igraph@bd7b3a8
doc: several documentation improvements and cross-referencing
1 parent 92a05db commit 7f7bdd6

File tree

6 files changed

+79
-65
lines changed

6 files changed

+79
-65
lines changed

src/vendor/cigraph/src/constructors/circulant.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
* \param directed Boolean, whether to create a directed graph.
4242
* \return Error code.
4343
*
44-
* \sa \ref igraph_ring(), \ref igraph_generalized_petersen(), \ref igraph_extended_chordal_ring()
44+
* \sa \ref igraph_ring(), \ref igraph_generalized_petersen(),
45+
* \ref igraph_extended_chordal_ring(), \ref igraph_lcf()
4546
*
46-
* Time complexity: O(|V||shifts|), the number of vertices in the graph times the number
47+
* Time complexity: O(|V| |shifts|), the number of vertices in the graph times the number
4748
* of shifts.
4849
*/
4950

src/vendor/cigraph/src/constructors/lattices.c

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -251,45 +251,47 @@ static igraph_error_t triangular_lattice_hex_shape(
251251
*
252252
* \experimental
253253
*
254-
* Creates a triangular lattice whose vertices have the form (i, j) for non-negative integers i and j
255-
* and (i, j) is generally connected with (i + 1, j), (i, j + 1), and (i - 1, j + 1).
256-
* The function constructs a planar dual of the graph constructed by \ref igraph_hexagonal_lattice().
257-
* In particular, there a one-to-one correspondence between the vertices in the constructed graph
258-
* and the cycles of length 6 in the graph constructed by \ref igraph_hexagonal_lattice()
254+
* Creates a triangular lattice whose vertices have the form (i, j) for non-negative
255+
* integers i and j and (i, j) is generally connected with (i + 1, j), (i, j + 1),
256+
* and (i - 1, j + 1). The function constructs a planar dual of the graph
257+
* constructed by \ref igraph_hexagonal_lattice(). In particular, there a one-to-one
258+
* correspondence between the vertices in the constructed graph and the cycles of
259+
* length 6 in the graph constructed by \ref igraph_hexagonal_lattice()
259260
* with the same \p dims parameter.
260261
*
261262
* </para><para>
262-
* The vertices of the resulting graph are ordered lexicographically with the 2nd coordinate being
263-
* more significant, e.g., (i, j) &lt; (i + 1, j) and (i + 1, j) &lt; (i, j + 1)
263+
* The vertices of the resulting graph are ordered lexicographically with the 2nd
264+
* coordinate being more significant, e.g., (i, j) &lt; (i + 1, j) and
265+
* (i + 1, j) &lt; (i, j + 1)
264266
*
265267
* \param graph An uninitialized graph object.
266-
* \param dims Integer vector, defines the shape of the lattice. (Below the "edge length"s are in terms of graph theoretical path lengths.)
267-
* If \p dims is of length 1, the resulting lattice has a triangular shape
268-
* where each side of the triangle contains <code>dims[0]</code> vertices.
269-
* If \p dims is of length 2, the resulting lattice has a
270-
* "quasi rectangular" shape with the sides containing <code>dims[0]</code> and
271-
* <code>dims[1]</code> vertices, respectively.
272-
* If \p dims is of length 3, the resulting lattice has a hexagonal shape
273-
* where the sides of the hexagon contain <code>dims[0]</code>, <code>dims[1]</code> and
274-
* <code>dims[2]</code> vertices.
275-
* All coordinates must be non-negative.
268+
* \param dims Integer vector, defines the shape of the lattice.
269+
* If \p dims is of length 1, the resulting lattice has a triangular shape
270+
* where each side of the triangle contains <code>dims[0]</code> vertices.
271+
* If \p dims is of length 2, the resulting lattice has a
272+
* "quasi rectangular" shape with the sides containing <code>dims[0]</code> and
273+
* <code>dims[1]</code> vertices, respectively.
274+
* If \p dims is of length 3, the resulting lattice has a hexagonal shape
275+
* where the sides of the hexagon contain <code>dims[0]</code>, <code>dims[1]</code>
276+
* and <code>dims[2]</code> vertices. All dimensions must be non-negative.
276277
* \param directed Boolean, whether to create a directed graph.
277-
* If the \c mutual argument is not set to true,
278-
* edges will be directed from lower-index vertices towards
279-
* higher-index ones.
278+
* If the \c mutual argument is not set to true, edges will be directed from
279+
* lower-index vertices towards higher-index ones.
280280
* \param mutual Boolean, if the graph is directed this gives whether
281-
* to create all connections as mutual.
281+
* to create all connections as mutual.
282282
* \return Error code:
283-
* \c IGRAPH_EINVAL: The size of \p dims must be either 1, 2, or 3 with all the components
284-
* at least 1.
285-
* \sa \ref igraph_hexagonal_lattice() for creating a triangular lattice.
283+
* \c IGRAPH_EINVAL: The size of \p dims must be either 1, 2, or 3 with all
284+
* the components at least 1.
285+
*
286+
* \sa \ref igraph_hexagonal_lattice() and \ref igraph_square_lattice() for creating
287+
* other types of lattices; \ref igraph_regular_tree() to create a Bethe lattice.
286288
*
287289
* Time complexity: O(|V|), where |V| is the number of vertices in the generated graph.
288290
*
289291
*/
290292
igraph_error_t igraph_triangular_lattice(
291-
igraph_t *graph, const igraph_vector_int_t *dims, igraph_bool_t directed,
292-
igraph_bool_t mutual) {
293+
igraph_t *graph, const igraph_vector_int_t *dims,
294+
igraph_bool_t directed, igraph_bool_t mutual) {
293295
igraph_integer_t num_dims = igraph_vector_int_size(dims);
294296
if (igraph_vector_int_any_smaller(dims, 0)) {
295297
IGRAPH_ERROR("Invalid dimension vector.", IGRAPH_EINVAL);
@@ -534,46 +536,46 @@ static igraph_error_t hexagonal_lattice_hex_shape(
534536
*
535537
* \experimental
536538
*
537-
* Creates a hexagonal lattice whose vertices have the form (i, j) for non-negative integers i and j
538-
* and (i, j) is generally connected with (i + 1, j), and if i is odd also with (i - 1, j + 1).
539-
* The function constructs a planar dual of the graph constructed by \ref igraph_triangular_lattice().
540-
* In particular, there a one-to-one correspondence between the cycles of length 6 in the constructed graph
541-
* and the vertices of the graph constructed by \ref igraph_triangular_lattice() function
539+
* Creates a hexagonal lattice whose vertices have the form (i, j) for non-negative
540+
* integers i and j and (i, j) is generally connected with (i + 1, j), and if i is
541+
* odd also with (i - 1, j + 1). The function constructs a planar dual of the graph
542+
* constructed by \ref igraph_triangular_lattice(). In particular, there a one-to-one
543+
* correspondence between the cycles of length 6 in the constructed graph and the
544+
* vertices of the graph constructed by \ref igraph_triangular_lattice() function
542545
* with the same \p dims parameter.
543546
*
544547
* </para><para>
545-
* The vertices of the resulting graph are ordered lexicographically with the 2nd coordinate being
546-
* more significant, e.g., (i, j) &lt; (i + 1, j) and (i + 1, j) &lt; (i, j + 1)
548+
* The vertices of the resulting graph are ordered lexicographically with the 2nd
549+
* coordinate being more significant, e.g., (i, j) &lt; (i + 1, j) and
550+
* (i + 1, j) &lt; (i, j + 1)
547551
*
548552
* \param graph An uninitialized graph object.
549-
* \param dims Integer vector, defines the shape of the lattice. (Below the "edge length"s are in terms of graph theoretical path lengths.)
550-
* If \p dims is of length 1, the resulting lattice has a triangular shape
551-
* where each side of the triangle contains <code>dims[0]</code> vertices.
552-
* If \p dims is of length 2, the resulting lattice has a
553-
* "quasi rectangular" shape with the sides containing <code>dims[0]</code> and
554-
* <code>dims[1]</code> vertices, respectively.
555-
* If \p dims is of length 3, the resulting lattice has a hexagonal shape
556-
* where the sides of the hexagon contain <code>dims[0]</code>, <code>dims[1]</code> and
557-
* <code>dims[2]</code> vertices.
558-
* All coordinates must be non-negative.
553+
* \param dims Integer vector, defines the shape of the lattice.
554+
* If \p dims is of length 1, the resulting lattice has a triangular shape
555+
* where each side of the triangle contains <code>dims[0]</code> vertices.
556+
* If \p dims is of length 2, the resulting lattice has a "quasi rectangular"
557+
* shape with the sides containing <code>dims[0]</code> and <code>dims[1]</code>
558+
* vertices, respectively. If \p dims is of length 3, the resulting lattice has
559+
* a hexagonal shape where the sides of the hexagon contain <code>dims[0]</code>,
560+
* <code>dims[1]</code> and <code>dims[2]</code> vertices. All coordinates must
561+
* be non-negative.
559562
* \param directed Boolean, whether to create a directed graph.
560-
* If the \c mutual argument is not set to true,
561-
* edges will be directed from lower-index vertices towards
562-
* higher-index ones.
563-
* \param mutual Boolean, if the graph is directed this gives whether
564-
* to create all connections as mutual.
563+
* If the \c mutual argument is not set to true, edges will be directed from
564+
* lower-index vertices towards higher-index ones.
565+
* \param mutual Boolean, if the graph is directed this gives whether to create
566+
* all connections as mutual.
565567
* \return Error code:
566-
* \c IGRAPH_EINVAL: The size of \p dims must be either 1, 2, or 3 with all the components
567-
* at least 1.
568-
* \sa \ref igraph_triangular_lattice() for creating a triangular lattice.
568+
* \c IGRAPH_EINVAL: The size of \p dims must be either 1, 2, or 3 with all
569+
* the components at least 1.
569570
*
570-
* Time complexity: O(|V|), where |V| is the number of vertices in the generated graph.
571+
* \sa \ref igraph_triangular_lattice() and \ref igraph_square_lattice() for creating
572+
* other types of lattices; ; \ref igraph_regular_tree() to create a Bethe lattice.
571573
*
574+
* Time complexity: O(|V|), where |V| is the number of vertices in the generated graph.
572575
*/
573576
igraph_error_t igraph_hexagonal_lattice(
574-
igraph_t *graph, const igraph_vector_int_t *dims, igraph_bool_t directed,
575-
igraph_bool_t mutual
576-
) {
577+
igraph_t *graph, const igraph_vector_int_t *dims,
578+
igraph_bool_t directed, igraph_bool_t mutual) {
577579
igraph_integer_t num_dims = igraph_vector_int_size(dims);
578580
if (igraph_vector_int_any_smaller(dims, 0)) {
579581
IGRAPH_ERROR("Invalid dimension vector.", IGRAPH_EINVAL);

src/vendor/cigraph/src/constructors/lcf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ igraph_error_t igraph_lcf_vector(igraph_t *graph, igraph_integer_t n,
112112
* plus an additional 0 to mark the end of the arguments.
113113
* \return Error code.
114114
*
115-
* \sa See \ref igraph_lcf_vector() for a similar function using a
116-
* vector_t instead of the variable length argument list.
115+
* \sa See \ref igraph_lcf_vector() for a similar function using an
116+
* \ref igraph_vector_t instead of the variable length argument list;
117+
* \ref igraph_circulant() to create circulant graphs.
117118
*
118119
* Time complexity: O(|V|+|E|), the number of vertices plus the number
119120
* of edges.

src/vendor/cigraph/src/constructors/regular.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* Time complexity: O(|V|), the
6767
* number of vertices in the graph.
6868
*
69-
* \sa \ref igraph_square_lattice(), \ref igraph_ring(), \ref igraph_kary_tree()
69+
* \sa \ref igraph_wheel(), \ref igraph_square_lattice(), \ref igraph_ring(), \ref igraph_kary_tree()
7070
* for creating other regular structures.
7171
*
7272
* \example examples/simple/igraph_star.c
@@ -346,6 +346,11 @@ igraph_error_t igraph_lattice(igraph_t *graph, const igraph_vector_int_t *dimvec
346346
* \c IGRAPH_EINVAL: invalid (negative) dimension vector or mismatch
347347
* between the length of the dimension vector and the periodicity vector.
348348
*
349+
* \sa \ref igraph_hypercube() to create a hypercube graph; \ref igraph_ring()
350+
* to create a cycle graph or path graph; \ref igraph_triangular_lattice()
351+
* and \ref igraph_hexagonal_lattice() to create other types of lattices;
352+
* \ref igraph_regular_tree() to create a Bethe lattice.
353+
*
349354
* Time complexity: If \p nei is less than two then it is O(|V|+|E|) (as
350355
* far as I remember), |V| and |E| are the number of vertices
351356
* and edges in the generated graph. Otherwise it is O(|V|*d^k+|E|), d
@@ -504,7 +509,8 @@ igraph_error_t igraph_square_lattice(
504509
*
505510
* Time complexity: O(|V|), the number of vertices in the graph.
506511
*
507-
* \sa \ref igraph_square_lattice() for generating more general lattices.
512+
* \sa \ref igraph_square_lattice() for generating more general
513+
* (periodic or non-periodic) lattices.
508514
*
509515
* \example examples/simple/igraph_ring.c
510516
*/
@@ -605,7 +611,9 @@ igraph_error_t igraph_ring(igraph_t *graph, igraph_integer_t n, igraph_bool_t di
605611
* \sa \ref igraph_regular_tree(), \ref igraph_symmetric_tree() and \ref igraph_star()
606612
* for creating other regular structures; \ref igraph_from_prufer() and
607613
* \ref igraph_tree_from_parent_vector() for creating arbitrary trees;
608-
* \ref igraph_tree_game() for uniform random sampling of trees.
614+
* \ref igraph_tree_game() for uniform random sampling of trees;
615+
* \ref igraph_realize_degree_sequence() with \c IGRAPH_REALIZE_DEGSEQ_SMALLEST
616+
* to create a tree with given degrees.
609617
*
610618
* \example examples/simple/igraph_kary_tree.c
611619
*/
@@ -869,7 +877,8 @@ igraph_error_t igraph_regular_tree(igraph_t *graph, igraph_integer_t h, igraph_i
869877
* \param directed Whether the graph should be directed.
870878
* \return Error code.
871879
*
872-
* \sa \ref igraph_ring(), \ref igraph_lcf(), \ref igraph_lcf_vector().
880+
* \sa \ref igraph_ring(), \ref igraph_lcf(), \ref igraph_lcf_vector(),
881+
* \ref igraph_circulant()
873882
*
874883
* Time complexity: O(|V|+|E|), the number of vertices plus the number
875884
* of edges.

src/vendor/cigraph/src/misc/degree_sequence.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ static igraph_error_t igraph_i_realize_directed_degree_sequence(
752752
* connected graph, regardless of whether multi-edges are allowed,
753753
* provided that a connected realization exists (see Horvát and Modes,
754754
* 2021, as well as http://szhorvat.net/pelican/hh-connected-graphs.html).
755+
* This method can be used to construct a tree from its degrees.
755756
* In the directed case it tends to generate weakly connected graphs,
756757
* but this is not guaranteed.
757758
* \cli IGRAPH_REALIZE_DEGSEQ_LARGEST

src/vendor/igraph_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
__BEGIN_DECLS
3030

31-
#define IGRAPH_VERSION "0.10.13-131-g764954eda"
31+
#define IGRAPH_VERSION "0.10.13-132-gbd7b3a82b"
3232
#define IGRAPH_VERSION_MAJOR 0
3333
#define IGRAPH_VERSION_MINOR 10
3434
#define IGRAPH_VERSION_PATCH 13
35-
#define IGRAPH_VERSION_PRERELEASE "131-g764954eda"
35+
#define IGRAPH_VERSION_PRERELEASE "132-gbd7b3a82b"
3636

3737
IGRAPH_EXPORT void igraph_version(const char **version_string,
3838
int *major,

0 commit comments

Comments
 (0)