Opened 8 years ago
Last modified 9 months ago
#14103 new enhancement
Implement tables indexed by arbitrary sage objects
Reported by:  andrew.mathas  Owned by:  was 

Priority:  major  Milestone:  sagewishlist 
Component:  user interface  Keywords:  days45 
Cc:  jhpalmieri, nborie, nthiery, slelievre, tscrim, zerline  Merged in:  
Authors:  Andrew Mathas  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/andrew.mathas/ticket/14103 (Commits, GitHub, GitLab)  Commit:  e99e2813b284ae2f796e3c2edbcf9f963b2ae1bf 
Dependencies:  #14104, #13605  Stopgaps: 
Description (last modified by )
Implement a wrapper for tables/matrices which are indexed by arbitrary sage objects. For example, this would allow for things like
EXAMPLES:: sage: ct=CharacterTable( SymmetricGroup(5) ).display() Character table of Symmetric group of order 5! as a permutation group   1a 2a 2b 3a 6a 4a 5a  X0  1 1 1 1 1 1 1 X1  4 2 0 1 1 0 1 X2  5 1 1 1 1 1 0 X3  6 0 2 0 0 0 1 X4  5 1 1 1 1 1 0 X5  4 2 0 1 1 0 1 X6  1 1 1 1 1 1 1 sage: ct['X3'] [6, 0, 2, 0, 0, 0, 1] sage: ct[3] [6, 0, 2, 0, 0, 0, 1] sage: ct[:,'3a'] [1, 1, 1, 0, 1, 1, 1] sage: ct['X3','3a'] 0 sage: ct.html_display() # display in web browser using #14104
There should also be an HTML interface as per #14104.
This is related to #13131, which provides better formatting for tables in sage, however the main thrust here is different as we want to index matrices/tables by other sage objects.
Preliminary patch is attached. It has quite a lot of documentation, however, I would like to add sections on how the labelled, reordering, options, ... all work. Some of the examples depend upon #13605 which gives extended options for printing partitions. The are a few minor issues to be fixed including refactoring the _repr_/latex/html methods.
Comments welcome.
Attachments (1)
Change History (27)
comment:1 Changed 8 years ago by
 Type changed from PLEASE CHANGE to enhancement
comment:2 Changed 8 years ago by
 Description modified (diff)
comment:3 Changed 8 years ago by
 Description modified (diff)
comment:4 Changed 8 years ago by
 Description modified (diff)
comment:5 Changed 8 years ago by
 Dependencies set to 14104
comment:6 Changed 8 years ago by
 Cc jhpalmieri added
comment:7 Changed 8 years ago by
 Description modified (diff)
comment:8 Changed 8 years ago by
 Dependencies changed from 14104 to 14104, 13605
comment:9 Changed 8 years ago by
 Description modified (diff)
comment:10 Changed 8 years ago by
 Description modified (diff)
comment:11 Changed 8 years ago by
 Description modified (diff)
comment:12 Changed 8 years ago by
 Cc nborie added
Changed 8 years ago by
comment:13 Changed 8 years ago by
 Keywords sage45 added
comment:14 Changed 8 years ago by
 Keywords days45 added; sage45 removed
comment:15 Changed 8 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:16 Changed 7 years ago by
 Branch set to u/andrew.mathas/ticket/14103
 Created changed from 02/12/13 18:05:34 to 02/12/13 18:05:34
 Modified changed from 08/13/13 15:35:53 to 08/13/13 15:35:53
comment:17 Changed 7 years ago by
 Cc tscrim added
 Commit set to 9b3a91f408b9c46d9c32025f01b5e568f47b6220
New commits:
9b3a91f  Implment matrices/arrays in sage which can be indexed by arbitrary sage objects

comment:18 Changed 7 years ago by
 Commit changed from 9b3a91f408b9c46d9c32025f01b5e568f47b6220 to 074528180780e191ab3fd4731004a6e37f7f4e24
Branch pushed to git repo; I updated commit sha1. New commits:
0745281  Merge branch 'master' into labelled_matrices14103

comment:19 Changed 7 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:20 Changed 7 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:21 Changed 7 years ago by
 Branch changed from u/andrew.mathas/ticket/14103 to u/elixyre/ticket/14103
 Commit changed from 074528180780e191ab3fd4731004a6e37f7f4e24 to b0f55031204777620bd34ff172400d0fbdd360ff
 Dependencies changed from 14104, 13605 to #14104, #13605
comment:22 Changed 7 years ago by
I thought that I'd already created a git branch for this commit? Perhaps I didn't push it? As far as I can see your commit didn't change the ticket is that right. I'll update both of these tickets when I get a chance but it may not be until next week as I am travelling.
comment:23 Changed 7 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:24 Changed 5 years ago by
 Branch changed from u/elixyre/ticket/14103 to u/andrew.mathas/ticket/14103
comment:25 Changed 5 years ago by
 Commit changed from b0f55031204777620bd34ff172400d0fbdd360ff to e99e2813b284ae2f796e3c2edbcf9f963b2ae1bf
Branch pushed to git repo; I updated commit sha1. New commits:
c917c14  20618: imported sage.modules.tutorial_free_modules and thematic_tutorials/tutorialimplementingalgebraicstructures from the SageCombinat queue

7b7706c  20618: fixed missing file

a9af7a4  Merge branch 'develop' of git://trac.sagemath.org/sage into develop

5fae48b  Fixing src/sage/modules/all.py

6d89fe5  Merge branch 'develop' of git://trac.sagemath.org/sage into develop

f433f7b  Merge branch 'develop' of git://trac.sagemath.org/sage into develop

8cc9856  Merge branch 'develop' into labelled_matrices14103

e99e281  Updating doctests

comment:26 Changed 9 months ago by
 Cc nthiery slelievre zerline added
 Milestone changed from sage6.4 to sagewishlist
Fixing function call to html_display which changed in #14104