Skip to content

Commit

Permalink
Add keyword info to docstrings for index filtering functions [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
emstoudenmire committed Aug 2, 2023
1 parent 73bc07e commit 2d48586
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/itensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,11 @@ end
Return a Vector with indices that are common between the indices of `A` and `B`
(the set intersection, similar to `Base.intersect`).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" commoninds

# firstintersect
Expand All @@ -1421,6 +1426,11 @@ Return a Vector with indices that are common between the indices of `A` and `B`
Return the first `Index` common between the indices of `A` and `B`.
See also [`commoninds`](@ref).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" commonind

# symdiff
Expand All @@ -1429,6 +1439,11 @@ See also [`commoninds`](@ref).
Return a Vector with indices that are not common between the indices of `A` and
`B` (the symmetric set difference, similar to `Base.symdiff`).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" noncommoninds

# firstsymdiff
Expand All @@ -1438,6 +1453,11 @@ Return a Vector with indices that are not common between the indices of `A` and
Return the first `Index` not common between the indices of `A` and `B`.
See also [`noncommoninds`](@ref).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" noncommonind

# setdiff
Expand All @@ -1446,6 +1466,11 @@ See also [`noncommoninds`](@ref).
Return Vector with indices that are unique to the set of indices of `A` and not
in `B` (the set difference, similar to `Base.setdiff`).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" uniqueinds

# firstsetdiff
Expand All @@ -1455,6 +1480,11 @@ in `B` (the set difference, similar to `Base.setdiff`).
Return the first `Index` unique to the set of indices of `A` and not in `B`.
See also [`uniqueinds`](@ref).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" uniqueind

# union
Expand All @@ -1463,6 +1493,11 @@ See also [`uniqueinds`](@ref).
Return a Vector with indices that are the union of the indices of `A` and `B`
(the set union, similar to `Base.union`).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" unioninds

# firstunion
Expand All @@ -1472,6 +1507,11 @@ Return a Vector with indices that are the union of the indices of `A` and `B`
Return the first `Index` in the union of the indices of `A` and `B`.
See also [`unioninds`](@ref).
Optional keyword arguments:
* tags::String - a tag name or comma separated list of tag names that the returned indices must all have
* plev::Int - common prime level that the returned indices must all have
* inds - Index or collection of indices. Returned indices must come from this set of indices.
""" unionind

firstind(A...; kwargs...) = getfirst(map_itensor2inds(A)...; kwargs...)
Expand Down

0 comments on commit 2d48586

Please sign in to comment.