Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twodimarraydoc #7

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Twodimarraydoc #7

wants to merge 9 commits into from

Conversation

raoulb
Copy link

@raoulb raoulb commented Oct 5, 2013

Document the slicing notation for matrices.

@raoulb
Copy link
Author

raoulb commented Oct 5, 2013

I plan to add more documentation here. Please do not yet merge.

@raoulb
Copy link
Author

raoulb commented Oct 8, 2013

TODO

  • Recheck index error checking
  • Test all new routines in corner cases
  • Update documentation

@raoulb
Copy link
Author

raoulb commented Oct 12, 2013

raoul and others added 9 commits April 28, 2014 00:52
Now we have the full grid of possibilities implemented: An instance 'M' of
a domain satisfying 'TwoDimensionalArrayCategory' is, in the simplest case,
indexed by two selectors like:

  M(u, v)

where both u and v can be any of:

- A single Integer
- An Integer Segment
- List of Integers
- A List of Integer Segemnts

All these functions can not only slice out subsets of M but also create
new, larger versions by repeating some parts as specified by repeated
selector entries.
Now we have the full grid of possibilities implemented: For 'M', 'N'
two instances of a domain satisfying 'TwoDimensionalArrayCategory' we
can write the following assignment to a subset of 'M'

  M(u, v) := N

where both selectors u and v can be any of:

- A single Integer
- An Integer Segment
- List of Integers
- A List of Integer Segemnts
Before this change, the second and fourth example failed
while the first and third did not. I think ignoring but
not failing on empty segments is the correct fix.

m([1..2,2..1], 1)

         +1+
   (90)  | |
         +4+
                                                        Type: Matrix(Integer)
m([1..3,3..1], 1)

         +1+
         | |
   (91)  |4|
         | |
         +7+
                                                        Type: Matrix(Integer)
m(1, [1..2,2..1])

   (92)  [1  2]
                                                        Type: Matrix(Integer)
m(1, [1..3,3..1])

   (93)  [1  2  3]
                                                        Type: Matrix(Integer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant