Opened 5 years ago

Last modified 19 months ago

#14103 new enhancement

Implement tables indexed by arbitrary sage objects

Reported by: andrew.mathas Owned by: was
Priority: major Milestone: sage-6.4
Component: user interface Keywords: days45
Cc: jhpalmieri, nborie, tscrim Merged in:
Authors: Andrew Mathas Reviewers:
Report Upstream: N/A Work issues:
Branch: u/andrew.mathas/ticket/14103 (Commits) Commit: e99e2813b284ae2f796e3c2edbcf9f963b2ae1bf
Dependencies: #14104, #13605 Stopgaps:

Description (last modified by andrew.mathas)

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)

trac_14103--labelled_matrices-am.patch (52.7 KB) - added by andrew.mathas 5 years ago.
Fixing function call to html_display which changed in #14104

Download all attachments as: .zip

Change History (26)

comment:1 Changed 5 years ago by andrew.mathas

  • Type changed from PLEASE CHANGE to enhancement

comment:2 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:3 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:4 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:5 Changed 5 years ago by andrew.mathas

  • Dependencies set to 14104

comment:6 Changed 5 years ago by jhpalmieri

  • Cc jhpalmieri added

comment:7 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:8 Changed 5 years ago by andrew.mathas

  • Dependencies changed from 14104 to 14104, 13605

comment:9 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:10 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:11 Changed 5 years ago by andrew.mathas

  • Description modified (diff)

comment:12 Changed 5 years ago by nborie

  • Cc nborie added

Changed 5 years ago by andrew.mathas

Fixing function call to html_display which changed in #14104

comment:13 Changed 5 years ago by andrew.mathas

  • Keywords sage45 added

comment:14 Changed 5 years ago by andrew.mathas

  • Keywords days45 added; sage45 removed

comment:15 Changed 4 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:16 Changed 4 years ago by andrew.mathas

  • 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 4 years ago by tscrim

  • Cc tscrim added
  • Commit set to 9b3a91f408b9c46d9c32025f01b5e568f47b6220

New commits:

9b3a91fImplment matrices/arrays in sage which can be indexed by arbitrary sage objects

comment:18 Changed 4 years ago by git

  • Commit changed from 9b3a91f408b9c46d9c32025f01b5e568f47b6220 to 074528180780e191ab3fd4731004a6e37f7f4e24

Branch pushed to git repo; I updated commit sha1. New commits:

0745281Merge branch 'master' into labelled_matrices-14103

comment:19 Changed 4 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:20 Changed 4 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:21 Changed 3 years ago by elixyre

  • 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

Please load #14104 in repository too.


New commits:

96201fdMerge branch '63b4' into labelled_matricess/14103
b0f5503Ticket 14103: please load 14104 in the git repository

comment:22 Changed 3 years ago by andrew.mathas

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 3 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:24 Changed 20 months ago by andrew.mathas

  • Branch changed from u/elixyre/ticket/14103 to u/andrew.mathas/ticket/14103

comment:25 Changed 19 months ago by git

  • Commit changed from b0f55031204777620bd34ff172400d0fbdd360ff to e99e2813b284ae2f796e3c2edbcf9f963b2ae1bf

Branch pushed to git repo; I updated commit sha1. New commits:

c917c1420618: imported sage.modules.tutorial_free_modules and thematic_tutorials/tutorial-implementing-algebraic-structures from the Sage-Combinat queue
7b7706c20618: fixed missing file
a9af7a4Merge branch 'develop' of git://trac.sagemath.org/sage into develop
5fae48bFixing src/sage/modules/all.py
6d89fe5Merge branch 'develop' of git://trac.sagemath.org/sage into develop
f433f7bMerge branch 'develop' of git://trac.sagemath.org/sage into develop
8cc9856Merge branch 'develop' into labelled_matrices-14103
e99e281Updating doc-tests
Note: See TracTickets for help on using tickets.