Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions csa/elementary.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ def ival (beg, end):
# Cartesian product
#
def cross (set0, set1):
"""
Compute the Cartesian product of two sets.

Note
----
The Cartesian product returned by `cross()` is not automatically
restricted to a finite mask. When visualized using `show()`,
connections may appear in the default (infinite) mask unless
explicitly multiplied with a finite mask.

Example
-------
# To obtain a bounded all-to-all connectivity pattern:
cross(A, B) * full(len(A), len(B))
"""

return _cs.intervalSetMask (set0, set1)

# Elementary masks
Expand Down