Ralf Hemmecke wrote:
>
> > I am tempted to use only a single construcion, not two.
> > Given that matrices are used much more frequently than
> > arrays I think of deleting definition of arrays
> > and using only matrices (after generalizing definition).
>
> I tend to oppose to a removal of the array types.
>
> For me arrays are data structures, containers for data. They live on the
> lowest level and are not supposed to export any algebraic structure.
> Well if they are considered as ADTs they do anyway, but I guess, it's
> clear what I mean.
You want clear distinction, but things are fuzzy. Arrays have
rich algebraic structure due to indexing/slicing. Currently
part of this structure is only implemented for matrices...
Sometimes one needs additive structure and two dimensional
indexing. Currently, if base type has no multiplicative
structure we have no appropriate type (matrices want
multiplication in base type, array have no additive
structure). In other cases matrices are used because
arrays lack needed operations, but multiplicative
(and sometimes even additive) structure of matrices
is not used.
Also, think about incidence matrices of various
combinatorial structures. One point of view is
that they are mere data structures to store
needed information. But algebra of matrices
preved to be quite fruitful in such contexts.
I think that much power of Axiom philosophy comes from
fact that user can do operations even if original
implementer had different use in mind. Current
distinction between matrices and arrays for
me is an artificial limitation on what users
can do. Of course, we could generalize matices
to allow base types without multiplicative
structure and enrich arrays with some operations
which are currently only available for matrices.
But given current usage patterns I doubt if
we need sepatate arrays at all.
> Vectors and Matricies would be build on array types. So in some sense
> you are right that someone who programs mathematics might not need
> arrays, but still, I somehow doubt. Matricies and Vectors for me always
> come with a mathematical structure.
>
> What I rather question is that Matrix and Vector have no size in the
> type, so Vector(K) does not represent a vector space, but rather it
> represents the union over all n-dimensional vector spaces for all n.
> Same for matrix. *This* is what bothers me.
>
> However, I agree that for an end user, it's rather convenient not to be
> bothered with size information like Vector(K,5) or so.
>
Well, I tend to think that Matrices (and Vectors) form infinite
dimensional space. Simply, each matrix has only finitely
many nonzero entries and infintely many zeros. Due to practical
reasons we have to store info about possible range of nonzero
entries and we do not bother to porform operations on implicit
zeros. Of course, to be consistent with this view we would
have to implement operations between matrices of different
dimennsions. And out of bounds array references should
then produce zero instead of error. Given usefulness of
error checking I do not push forward this point of view.
But it is enough to stop me worring about size not being
part of type.
BTW: RectangularMatrix has size as part of type, so somebody
wanting finite dimensional vector space can use this.
> I'd rather like to think about dropping either DirectProduct or Vector.
>
> Vector and Matrix are end-user domains that I wouldn't encourage to use
> inside other algebra library code, i.e. Vector and Matrix are for .input
> files but not .spad files.
So what would you use? RectangularMatrix? What about cases when
size of result is not known to the caller (like reducedSystem).
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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/fricas-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.