Skip to content

Commit

Permalink
Internal docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scheinerman committed Feb 7, 2025
1 parent 51bf137 commit c5a03c6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Matroids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ export AbstractRankFunction,

include("RankFunctions.jl")

"""
Create a `Matroid` as follows:
* `Matroid(m::Int, r::AbstractRankFunction)` given the number of elements and a rank function.
* `Matroid(A::AbstractMatrix)` given a matrix.
* `Matroid(g::Graph)` given a graph.
* `Matroid()` yields the matroid with no elements.
See also: `UniformMatroid`.
"""
struct Matroid
m::Int
r::AbstractRankFunction
function Matroid(mm::Int, rr::AbstractRankFunction)
function Matroid(mm::T, rr::AbstractRankFunction) where {T<:Integer}
return new(mm, rr)
end
function Matroid(A::AbstractMatrix)
Expand Down

0 comments on commit c5a03c6

Please sign in to comment.