Example Functions
Examples from Batko et al.
ConleyDynamics.example_forman1d
— Functionlc, mvf, coords = example_forman1d()
Create the simplicial complex and multivector field for the example from Figure 1 in the FoCM 2020 paper by Batko, Kaczynski, Mrozek, and Wanner.
The function returns the Lefschetz complex lc
and the multivector field mvf
. If desired for plotting, the third return value coords
gives a vector of coordinates for the vertices. The Lefschetz complex is defined over the finite field GF(2).
Examples
julia> lc, mvf = example_forman1d();
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0 0 1]
[0 0 0 0 0]
[0 0 0 0 1]
[0 0 0 0 0]
[0 0 0 0 0]
julia> print(cm.labels)
["A", "AD", "F", "BF", "DE"]
ConleyDynamics.example_forman2d
— Functionlc, mvf, coords = example_forman2d()
Create the simplicial complex and multivector field for the example from Figure 3 in the FoCM 2020 paper by Batko, Kaczynski, Mrozek, and Wanner.
The function returns the Lefschetz complex lc
over the finite field GF(2) and the multivector field mvf
. If desired for plotting, the third return value coords
gives a vector of coordinates for the vertices.
Examples
julia> lc, mvf = example_forman2d();
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0 0 1 0 1 0 0]
[0 0 0 0 0 1 0 0 0]
[0 0 0 0 1 1 1 0 0]
[0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
julia> print(cm.labels)
["D", "E", "F", "GJ", "BF", "EF", "HI", "ADE", "FGJ"]
Examples from Mrozek & Wanner
ConleyDynamics.example_julia_logo
— Functionlc, mvf = example_julia_logo()
Create the simplicial complex and multivector field for the example from Figure 1 in the connection matrix paper by Mrozek & Wanner.
The function returns the Lefschetz complex lc
over GF(2) and the multivector field mvf
.
Examples
julia> lc, mvf = example_julia_logo();
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0]
[0 0 1]
[0 0 0]
julia> print(cm.labels)
["D", "AC", "ABC"]
ConleyDynamics.example_three_cm
— Functionlc, mvf, coords = example_three_cm(mvftype)
Create the simplicial complex and multivector field for the example from Figure 2 in the connection matrix paper by Mrozek & Wanner.
Depending on the value of mvftype
, return the periodic orbit (0=default) or one of the three gradient (1,2,3) examples.
The function returns the Lefschetz complex lc
over the rational field and the multivector field mvf
. If desired for plotting, the third return value coords
gives a vector of coordinates for the vertices.
Examples
julia> lc, mvf = example_three_cm(0);
julia> cm = connection_matrix(lc, mvf);
julia> print(cm.labels)
["A", "C", "CE", "AC", "BD", "DF", "ABC", "EFG"]
julia> full_from_sparse(cm.matrix)
8×8 Matrix{Rational{Int64}}:
0 0 0 -1 -1 0 0 0
0 0 0 1 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
ConleyDynamics.example_multiflow
— Functionlc, mvf = example_multiflow()
Create the Lefschetz complex and multivector field for the example from Figure 3 in the connection matrix paper by Mrozek & Wanner.
The function returns the Lefschetz complex lc
over GF(2) and the multivector field mvf
.
Examples
julia> lc, mvf = example_multiflow();
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
julia> print(cm.labels)
["BD", "DF", "AC", "CE"]
ConleyDynamics.example_small_periodicity
— Functionlc1, lc2, mvf = example_small_periodicity()
Create two representations of the Lefschetz complex and the multivector field for the example from Figure 4 in the connection matrix paper by Mrozek & Wanner.
The complexes lc1
and lc2
are just two representations of the same complex, but they lead to different connection matrices. Both Lefschetz complexes are defined over the finite field GF(2).
The function returns the Lefschetz complexes lc1
and lc2
, as well as the multivector field mvf
.
Examples
julia> lc1, lc2, mvf = example_small_periodicity();
julia> cm1 = connection_matrix(lc1, mvf);
julia> cm2 = connection_matrix(lc2, mvf);
julia> full_from_sparse(cm1.matrix)
4×4 Matrix{Int64}:
0 0 0 0
0 0 0 1
0 0 0 1
0 0 0 0
julia> print(cm1.labels)
["A", "a", "b", "alpha"]
julia> full_from_sparse(cm2.matrix)
4×4 Matrix{Int64}:
0 0 0 0
0 0 0 0
0 0 0 1
0 0 0 0
julia> print(cm2.labels)
["A", "c", "b", "alpha"]
ConleyDynamics.example_subdivision
— Functionlc, mvf = example_subdivision(mvftype)
Create the Lefschetz complex and multivector field for the example from Figure 11 in the connection matrix paper by Mrozek & Wanner.
Depending on the value of mvftype
, return the multivector (0=default) or one of the two combinatorial vector field (1,2) examples.
The function returns the Lefschetz complex lc
over the rationals and the multivector field mvf
.
Examples
julia> lc, mvf = example_subdivision(1);
julia> cm = connection_matrix(lc, mvf);
julia> full_from_sparse(cm.matrix)
5×5 Matrix{Rational{Int64}}:
0 0 -1 -1 -1
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
General Examples
ConleyDynamics.example_critical_simplex
— Functionlc, mvf = example_critical_simplex(dim)
Create a simplicial complex of dimension dim
as well as a multivector field on it in which every cell is critical.
The function returns the Lefschetz complex lc
over GF(2) and the multivector field mvf
.
Examples
julia> lc, mvf = example_critical_simplex(2);
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0 1 1 0 0]
[0 0 0 1 0 1 0]
[0 0 0 0 1 1 0]
[0 0 0 0 0 0 1]
[0 0 0 0 0 0 1]
[0 0 0 0 0 0 1]
[0 0 0 0 0 0 0]
julia> print(cm.labels)
["A", "B", "C", "AB", "AC", "BC", "ABC"]
ConleyDynamics.example_moebius
— Functionlc1, mvf1, lc2, mvf2 = example_moebius(p)
Create two simplicial complexes for a cylinder and Moebius strip, respectively, together with associated multivector fields on them.
The function returns the Lefschetz complexes lc1
and lc2
, as well as the multivector fields mvf1
and mvf2
. Both complexes are over a field with characteristic p
. Positive prime characteristic uses the finite field GF(p), while zero characteristic gives the rationals.
The multivector field is the same, and it has one critical cell each in dimension 1 and 2 in the interior of the strip. The boundary consists of two periodic orbits for lc1
and mvf1
, and of one periodic orbit in the Moebius case lc2
and mvf2
. The latter case leads to different connection matrices for the fields GF(2) and GF(7), for example.
Examples
julia> lc1, mvf1, lc2, mvf2 = example_moebius(0);
julia> lc2p2 = lefschetz_gfp_conversion(lc2,2);
julia> lc2p7 = lefschetz_gfp_conversion(lc2,7);
julia> cmp2 = connection_matrix(lc2p2, mvf2);
julia> cmp7 = connection_matrix(lc2p7, mvf2);
julia> sparse_show(cmp2.matrix)
[0 0 0 0]
[0 0 0 1]
[0 0 0 0]
[0 0 0 0]
julia> sparse_show(cmp7.matrix)
[0 0 0 0]
[0 0 0 1]
[0 0 0 2]
[0 0 0 0]
ConleyDynamics.example_nonunique
— Functionlc1, lc2, mvf, coords1, coords2 = example_nonunique()
Create two representations of a simplicial complex and one multivector field which illustrates nonunique connection matrices.
The two complexes lc1
and lc2
represent the same simplicial complex over GF(2), but differ in the ordering of the labels.
The function returns the Lefschetz complexes lc1
and lc2
, as well as the multivector field mvf
. If desired for plotting, the fourth and fifth return values coords1
and coords2
give vectors of coordinates for the vertices of the two complexes.
Examples
julia> lc1, lc2, mvf = example_nonunique();
julia> cm1 = connection_matrix(lc1, mvf);
julia> cm2 = connection_matrix(lc2, mvf);
julia> sparse_show(cm1.matrix)
[0 0 0 1 0 1 0 0 0]
[0 0 0 1 0 1 0 0 0]
[0 0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
julia> print(cm1.labels)
["2", "7", "79", "29", "45", "67", "168", "349", "789"]
julia> sparse_show(cm2.matrix)
[0 0 0 1 0 1 0 0 0]
[0 0 0 1 0 1 0 0 0]
[0 0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 1 1 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
julia> print(cm2.labels)
["2", "8", "78", "29", "45", "67", "168", "349", "789"]
ConleyDynamics.example_clorenz
— Functionlc, mvf = example_clorenz()
Create the simplicial complex and multivector field for the example from Figure 3 in the JCD 2016 paper by Kaczynski, Mrozek, and Wanner.
The function returns the Lefschetz complex lc
over the finite field GF(2) and the multivector field mvf
.
Examples
julia> lc, mvf = example_clorenz();
julia> cm = connection_matrix(lc, mvf);
julia> sparse_show(cm.matrix)
[0 0 0 0 1]
[0 0 0 0 0]
[0 0 0 0 1]
[0 0 0 0 0]
[0 0 0 0 0]
julia> print(cm.labels)
["i", "ip", "g", "gm", "bc"]
julia> ms, ps = morse_sets(lc, mvf, poset=true);
julia> [conley_index(lc, mset) for mset in ms]
4-element Vector{Vector{Int64}}:
[1, 1, 0]
[1, 1, 0]
[0, 1, 0]
[0, 0, 0]
julia> ps
4×4 Matrix{Bool}:
0 0 1 0
0 0 1 0
0 0 0 1
0 0 0 0