#13605: Partition options and cleanup partitions documentation
-----------------------------------------------+----------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: combinatorics | Resolution:
Keywords: partition, options, output | Work issues:
Report Upstream: N/A | Reviewers: Andew Mathas
Authors: Travis Scrimshaw | Merged in:
Dependencies: #13074 #13762 #13840 #10193 | Stopgaps:
-----------------------------------------------+----------------------------
Comment (by andrew.mathas):
Hi Travis,
Replying to [comment:24 tscrim]:
> However the major point of the options is so you can customize the
output to what you want. Since partitions would be the indices for your
matrix, I would want the matrix's indices output to depend on what I set
in the partition options. A place where you might want to call a specific
latex output would be something like a `StrictlyDecreasingIntegers` (I'm
sorry it's somewhat of a contrived example) class which would inherit from
`Partition` but only has meaning as a list.
I don't fully agree because I think that when one object is used by
another object then it takes on different characteristics so that the
global defaults may not necessarily make sense or may be overridden by
other constraints. For example, the labels for my matrices need to print
on one line so using the diagram _repr_'s would break the table _repr_.
With methods like _latex_ my table does use the global default BUT the
idea is that it will be possible to further override these as options to
the table.
>
> > A second point, as above, I think that none of the "option clients"
should ever access partition_options and tableau_options directly. Rather,
they should call self.options() or self.parent().options() to do this.
>
> Then how would you allow global access? I don't think these dictionaries
should be private (and/or name-mangled) to `Partitions` (and `Tableaux`)
because it indicates (to me) the options are only bound to `Partitions`,
and that they don't have a global impact (such as to `PartitionTuple`). I
think we should have the `option()` method to `PartitionTuples` and any
other class that wants access to options.
Sorry, my bad, I played around a little with a generic options class which
let you do things like this. It was derived from UniqueRepresentation
which allowed it to be used by multiple classes, but in the I decided that
this wasn't really workable as to get all of the features I wanted in this
generic options class the syntax became too contrived. I like your idea of
a PartitionsOptions class.
Andrew
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13605#comment:27>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.