|
| 1 | +- Define `@align`/`@aligned` such that: |
| 2 | +```julia |
| 3 | +i = namedoneto(2, "i") |
| 4 | +j = namedoneto(2, "j") |
| 5 | +a = randn(i, j) |
| 6 | +@align a[j, i] |
| 7 | +@aligned a[j, i] |
| 8 | +``` |
| 9 | +aligns the dimensions (currently `a[j, i]` doesn't align the dimensions). |
| 10 | +It could be written in terms of `align_getindex`/`align_view`. |
1 | 11 | - `svd`, `eigen` (including tensor versions) |
2 | | -- `reshape`, `vec` |
3 | | -- `swapdimnames` |
4 | | -- `mapdimnames(f, a::AbstractNamedDimsArray)` (rename `replacedimnames(f, a)` to `mapdimnames(f, a)`, or have both?) |
| 12 | +- `reshape`, `vec`, including fused dimension names. |
| 13 | +- Dimension name set logic, i.e. `setdiffnameddimsindices(a::AbstractNamedDimsArray, b::AbstractNamedDimsArray)`, etc. |
| 14 | +- `swapnameddimsindices` (written in terms of `mapnameddimsindices`/`replacenameddimsindices`). |
| 15 | +- `mapnameddimsindices(f, a::AbstractNamedDimsArray)` (rename `replacenameddimsindices(f, a)` to `mapnameddimsindices(f, a)`, or have both?) |
5 | 16 | - `cat` (define `CatName` as a combination of the input names?). |
6 | 17 | - `canonize`/`flatten_array_wrappers` (https://github.com/mcabbott/NamedPlus.jl/blob/v0.0.5/src/permute.jl#L207) |
7 | | - - `nameddims(PermutedDimsArray(a, perm), dimnames)` -> `nameddims(a, dimnames[invperm(perm)])` |
8 | | - - `nameddims(transpose(a), dimnames)` -> `nameddims(a, reverse(dimnames))` |
9 | | - - `Transpose(nameddims(a, dimnames))` -> `nameddims(a, reverse(dimnames))` |
| 18 | + - `nameddims(PermutedDimsArray(a, perm), nameddimsindices)` -> `nameddims(a, nameddimsindices[invperm(perm)])` |
| 19 | + - `nameddims(transpose(a), nameddimsindices)` -> `nameddims(a, reverse(nameddimsindices))` |
| 20 | + - `Transpose(nameddims(a, nameddimsindices))` -> `nameddims(a, reverse(nameddimsindices))` |
10 | 21 | - etc. |
11 | 22 | - `MappedName(old_name, name)`, acts like `Name(name)` but keeps track of the old name. |
12 | | - - `namedmap(a, ::Pair...)`: `namedmap(named(randn(2, 2, 2, 2), i, j, k, l), i => k, j => l)` |
| 23 | + - `nameddimsmap(a, ::Pair...)`: `namedmap(named(randn(2, 2, 2, 2), i, j, k, l), i => k, j => l)` |
13 | 24 | represents that the names map back and forth to each other for the sake of `transpose`, |
14 | 25 | `tr`, `eigen`, etc. Operators are generally `namedmap(named(randn(2, 2), i, i'), i => i')`. |
15 | 26 | - `prime(:i) = PrimedName(:i)`, `prime(:i, 2) = PrimedName(:i, 2)`, `prime(prime(:i)) = PrimedName(:i, 2)`, |
16 | 27 | `Name(:i)' = prime(:i)`, etc. |
17 | | -- `transpose`/`adjoint` based on `swapdimnames` and `MappedName(old_name, new_name)`. |
| 28 | + - Also `prime(f, a::AbstractNamedDimsArray)` where `f` is a filter function to determine |
| 29 | + which dimensions to filter. |
| 30 | +- `transpose`/`adjoint` based on `swapnameddimsindices` and `MappedName(old_name, new_name)`. |
18 | 31 | - `adjoint` could make use of a lazy `ConjArray`. |
19 | 32 | - `transpose(a, dimname1 => dimname1′, dimname2 => dimname2′)` like `https://github.com/mcabbott/NamedPlus.jl`. |
20 | 33 | - Same as `replacedims(a, dimname1 => dimname1′, dimname1′ => dimname1, dimname2 => dimname2′, dimname2′ => dimname2)`. |
|
23 | 36 | - Slicing: `nameddims(a, "i", "j")[1:2, 1:2] = nameddims(a[1:2, 1:2], Name(named(1:2, "i")), Name(named(1:2, "j")))`, i.e. |
24 | 37 | the parent gets sliced and the new dimensions names are the named slice. |
25 | 38 | - Should `NamedDimsArray` store the named axes rather than just the dimension names? |
26 | | - - Should `NamedDimsArray` have special axes types so that `axes(nameddims(a, "i", "j")) == axes(nameddims(a', "j", "i"))`? |
| 39 | + - Should `NamedDimsArray` have special axes types so that `axes(nameddims(a, "i", "j")) == axes(nameddims(a', "j", "i"))`, |
| 40 | + i.e. equality is based on `issetequal` and not dependent on the ordering of the dimensions? |
0 commit comments