List of Functions and their Documentation Messages
Base.:== — Method(==)(M1::Matroid, M2::Matroid)Test if matroids M1 and M2 are the same.
WARNING: Except for small matroids, this function is incredibly slow.
See fuzzy_equal
Graphs.LinAlg.contract — Methodcontract(M::Matroid, X)Form a new matroid by contracting the elements of X in the matroid M. Here, X may be a Set or a Vector of integer values, or a single integer.
Graphs.LinAlg.incidence_matrix — Methodincidence_matrix(g::EasyMultiGraph)Create a signed incidence matrix for g. Multiple edges become repeated columns. Loops become all-zero columns. The order of the columns exactly matches the output of edges(g).
Graphs.edges — Methodedges(g::EasyMultiGraph)Return the edges of g as a list of ordered pairs (u,v) with u ≤ v. Edges are repeated in the list according to their multiplicity.
Graphs.ne — Methodne(M::Matroid)Return the number of elements in the matroid M.
LinearAlgebra.rank — Methodrank(M::Matroid, X::Set{T})::Int where {T<:Integer}
rank(M::Matroid)::IntReturn the rank of the set X in the matroid M.
We support alternative ways to invoke rank: For example, rank(M,a,b,c) and rank(M,[a,b,c]) are the same as rank(M,Set([a,b,c])).
Without X, return the rank of the matroid M.
Matroids.TransversalMatroid — MethodTransversalMatroid(m::Int, the_sets::Vector{Set{T}}) where {T<:Integer}Create a transversal matroid with ground set S={1,2,...,m}. Every set in the list the_sets should be a subset of S.
Matroids._column_labels — Method_column_labels(A::AbstractMatrix)Create a dictionary mapping integers i to column vectors A[:,i].
Matroids._column_picker — Method_column_picker(A::AbstractMatrix, X::Set{T}) where {T<:Integer}Return the submatrix of A using the columns specified in S.
Matroids._default_labels — Method_default_labels(m::Int)Create a dictionary with keys 1:m and the value for x is x.
Matroids._random_set — Function_random_set(n::Int, p::Real=0.5)Create a random subset of {1,2,...,n} where each element is present in the set with probability p.
Matroids._random_weights — Method_random_weights(n)::Dict{Int,Float64}Create a dictionary with keys 1 through n assigned iid random [0,1] values.
Matroids._set_check — Method_set_check(X::Set{T}, m::Int) where {T<:Integer}Check S is a subset of {1,2,...,m}. If not, throw an error.
Matroids._sets_to_matrix — Method_sets_to_matrix(m::Int, the_sets::Vector{Set{T}}) where {T<:Integer}Create an m-by-length(the_sets) matrix whose i,j-entry is -1 if j ∈ the_sets[i] and 0 otherwise.
Matroids._sort_order — Method_sort_order(wt::Dict{T,R}) where {T<:Integer,R<:Real}Return the keys of wt as a list such that their corresponding values are in nondecreasing order.
Matroids.add! — Methodadd!(g::EasyMultiGraph, u, v)
add!(g::EasyMultiGraph, (u,v))Add an edge to the multigraph by increasing its multiplicity by 1. Return true if successful.
Matroids.all_bases — Methodall_bases(M::Matroid)Return an iterator that generates all the bases of M.
Matroids.basis — Methodbasis(M::Matroid, X::Set)::Set{Int}Return a independent subset of X that has size rank(M,X).
Matroids.basis — Methodbasis(M::Matroid)::Set{Int}Return a basis (maximum size independent set) of M.
Matroids.closure — Methodclosure(M::Matroid, X::Set)Compute the closure [a.k.a. span] of a set of elements X of a matroid.
Matroids.delete — Methoddelete(M::Matroid, X)Delete the elements in X from the matroid M. Here, X may be a Set or a Vector of integer values, or a single integer.
Matroids.disjoint_union — Methoddisjoint_union(M1::Matroid, M2::Matroid)::MatroidForm the disjoint union of two matroids. May be invoked as M1 + M2.
Matroids.dual — Methoddual(M::Matroid)Create a new matroid that is the dual of M.
Matroids.find_label — Methodfind_label(M::Matroid, lab)Find an element of M whose label is lab, or return 0 if no such label exists.
Matroids.fuzzy_equal — Functionfuzzy_equal(M1::Matroid, M2::Matroid, reps::Int=1000)::BoolThis is a randomized test to see if two matroids are equal. If the result is false, they are definitely not equal. If the result is true, they probably are.
Matroids.get_label — Methodget_label(M::Matroid, x::T) where {T<:Integer}Return the label associated with element x of the matroid M.
Matroids.iscircuit — Methodiscircuit(M::Matroid, X::Set{T})::Bool where {T<:Integer}Check if X is a circuit in the matroid M.
Matroids.iscoloop — Methodiscoloop(M, x::T)::Bool where {T<:Integer}Check if x is a co-loop in the matroid M.
Matroids.isflat — Methodisflat(M::Matroid, X::Set)::BoolReturn true is X is equal to its closure in the matroid M.
Matroids.isindependent — Methodisindependent(M::Matroid, X::Set{T})::Bool where {T<:Integer}Check if the set X is independent in the matroid M.
Matroids.isloop — Methodisloop(M, x::T)::Bool where {T<:Integer}Check if x is a loop in the matroid M.
Matroids.min_weight_basis — Methodmin_weight_basis(M::Matroid, wt::Dict{T,R})::Set{Int} where {T<:Integer,R<:Real}Return a minimum weight basis of M where the weights of the elements are specified by wt.
Matroids.new_equal — Methodnew_equal(M1::Matroid, M2::Matroid)::BoolExperimental replacement for ==.
Matroids.random_basis — Methodrandom_basis(M::Matroid)::Set{Int}Generate a random basis for M by assigning random weights to the elements of M and returning a minimum weight basis.
Matroids.rem! — Methodrem!(g::EasyMultiGraph, u, v)
rem!(g::EasyMultiGraph, (u,v))Remove an edge from the multigraph by decreasing its multiplicity by 1. Return true if successful.
Matroids.reset_labels! — Methodreset_labels!(M::Matroid, labs::Dict)Reset all labels for M to be labs.
Matroids.reset_labels! — Methodreset_labels!(M::Matroid)Set the labels of the elements of M to their default, i.e., element x has label x.
Matroids.set_label! — Methodset_label!(M::Matroid, x::T, lab) where {T<:Integer}Set the label of element x in matroid M to lab.