@@ -1406,12 +1406,23 @@ for find in (:commonind, :noncommonind, :uniqueind, :unionind)
1406
1406
end
1407
1407
end
1408
1408
1409
+ function index_filter_kwargs_docstring ()
1410
+ return """
1411
+ Optional keyword arguments:
1412
+ * tags::String - a tag name or comma separated list of tag names that the returned indices must all have
1413
+ * plev::Int - common prime level that the returned indices must all have
1414
+ * inds - Index or collection of indices. Returned indices must come from this set of indices.
1415
+ """
1416
+ end
1417
+
1409
1418
# intersect
1410
1419
@doc """
1411
1420
commoninds(A, B; kwargs...)
1412
1421
1413
1422
Return a Vector with indices that are common between the indices of `A` and `B`
1414
1423
(the set intersection, similar to `Base.intersect`).
1424
+
1425
+ $(index_filter_kwargs_docstring ())
1415
1426
""" commoninds
1416
1427
1417
1428
# firstintersect
@@ -1421,6 +1432,8 @@ Return a Vector with indices that are common between the indices of `A` and `B`
1421
1432
Return the first `Index` common between the indices of `A` and `B`.
1422
1433
1423
1434
See also [`commoninds`](@ref).
1435
+
1436
+ $(index_filter_kwargs_docstring ())
1424
1437
""" commonind
1425
1438
1426
1439
# symdiff
@@ -1429,6 +1442,8 @@ See also [`commoninds`](@ref).
1429
1442
1430
1443
Return a Vector with indices that are not common between the indices of `A` and
1431
1444
`B` (the symmetric set difference, similar to `Base.symdiff`).
1445
+
1446
+ $(index_filter_kwargs_docstring ())
1432
1447
""" noncommoninds
1433
1448
1434
1449
# firstsymdiff
@@ -1438,6 +1453,8 @@ Return a Vector with indices that are not common between the indices of `A` and
1438
1453
Return the first `Index` not common between the indices of `A` and `B`.
1439
1454
1440
1455
See also [`noncommoninds`](@ref).
1456
+
1457
+ $(index_filter_kwargs_docstring ())
1441
1458
""" noncommonind
1442
1459
1443
1460
# setdiff
@@ -1446,6 +1463,8 @@ See also [`noncommoninds`](@ref).
1446
1463
1447
1464
Return Vector with indices that are unique to the set of indices of `A` and not
1448
1465
in `B` (the set difference, similar to `Base.setdiff`).
1466
+
1467
+ $(index_filter_kwargs_docstring ())
1449
1468
""" uniqueinds
1450
1469
1451
1470
# firstsetdiff
@@ -1455,6 +1474,8 @@ in `B` (the set difference, similar to `Base.setdiff`).
1455
1474
Return the first `Index` unique to the set of indices of `A` and not in `B`.
1456
1475
1457
1476
See also [`uniqueinds`](@ref).
1477
+
1478
+ $(index_filter_kwargs_docstring ())
1458
1479
""" uniqueind
1459
1480
1460
1481
# union
@@ -1463,6 +1484,8 @@ See also [`uniqueinds`](@ref).
1463
1484
1464
1485
Return a Vector with indices that are the union of the indices of `A` and `B`
1465
1486
(the set union, similar to `Base.union`).
1487
+
1488
+ $(index_filter_kwargs_docstring ())
1466
1489
""" unioninds
1467
1490
1468
1491
# firstunion
@@ -1472,6 +1495,8 @@ Return a Vector with indices that are the union of the indices of `A` and `B`
1472
1495
Return the first `Index` in the union of the indices of `A` and `B`.
1473
1496
1474
1497
See also [`unioninds`](@ref).
1498
+
1499
+ $(index_filter_kwargs_docstring ())
1475
1500
""" unionind
1476
1501
1477
1502
firstind (A... ; kwargs... ) = getfirst (map_itensor2inds (A)... ; kwargs... )
0 commit comments