Hi Christian,

2014-05-28 15:21 UTC+02:00, Christian Stump <christian.st...@gmail.com>:
>> The second step would be to think how to add semantic to the map. Part
>> of is already managed by the axioms/categories (for example a Morphism
> --> How do you think "more semantic" should be implemented? As a dict
> with some conventions for keys and values?

Here I am not sure. As Simon pointed out we do not want to start
having tons of informations attached to maps... but for most of them I
would be in favor of methods (some of them my be trivial as "return
True" and some others might involve computations).

> --> What if I want to give properties that depend on input parameter
> like the length of the permutation? Say I look at the map from
> Permutations(n) to itself given by composition with the long cycle
> (1..n), and now want to add the semantic information that it has order
> n?

In that very particular case, I would implement a generic  class
InteriorAutomorphism (that is an element of the group of the
automorphisms of a given group). Then the order would simply be
obtained through the method .order() that exists for any group
element. Then it is up to you to see which of these interior
automorphisms you want to add to your database.

> --> Is there a way to implement your ideas such that the lines of code
> I need to touch in order to turn a method into a map is right where
> the method is implemented?

decorator is exactly the kind of objects design to do that.

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to