On 04/05/2017 12:30, jplab wrote:
Dear all,

Some time ago, during the Sage Days 84 in Olot,

https://wiki.sagemath.org/days84

some participants (including myself) wondered why would Polyhedron objects
inherit from the "Element" class.

The reason to wonder is that it seems to provide methods to a polyhedron
object which make no sense:


.is_idempotent()
.is_zero()
.n()
.numerical_approx()
.subs()
.substitute()

This is a *mess* that should actually be removed from Element!

Although 3 methods seem fair to have:

.cartesian_product()   (Well...)
.rename()
.reset_name()

So, the question is: what is good in inheriting from "Element" for a
polyhedron object?

Is there something important to inherit from "Element" that I am not aware
of?

Otherwise, perhaps it would make sense to remove this inheritance (and
check that nothing breaks...)?

Element is good when you want coercion to be involved. Such coercion might be useful for polyhdera when considering for example

 scalar x polyhedron
 scalar + polyhedron
 matrix x polyhedron
 (polyhedron over R1) + (polyhedron over R2)

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to