Interesting! -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Igor Stasenko Sent: Saturday, August 15, 2009 3:50 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Complex number support discussion 2009/8/15 Schwab,Wilhelm K <bschwab@anest.ufl.edu>:
Sig,
I don't know in what context you mean "scalars," but complex numbers are indeed used as the scalar field for vector spaces. Â That is done both in (abstract) algegra and functional analysis - see Hilbert Space. Â That said, I see what you mean and generally agree. Â Definitely agreed about the linear dimension; complex does not fit in the magnitude hierarchy.
Yes, the scalar term is a bit ambiguous, so i'd better stop using it. The wiki gives a disambiguation (http://en.wikipedia.org/wiki/Scalar) and , by scalar i mean Scalar (computing), which defined as: In computing, a scalar is a variable or field that can hold only one value at a time; as opposed to composite variables like array, list, record, etc. In some contexts, a scalar value may be understood to be numeric. A scalar data type is the type of a scalar variable. For example, char, int, float, and double are the most common scalar data types in the C programming language. The origin of the term "scalar" in computing dates back to the 1970s, where the intended meaning was "opposite of vector", so as to distinguish from the idea of vector processing in computer processor design.
We also have to remember that there are pgragmatic aspects to this. Â We have been over this several times now, so I think we should table this until Ken has time to write up his proposal.
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Igor Stasenko Sent: Saturday, August 15, 2009 3:18 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Complex number support discussion
Btw, here is another argument why Complex is not part of Number class hierarchy.
Here what reads the Magnitude class:
I'm the abstract class Magnitude that provides common protocol for objects that have the ability to be compared along a ___linear dimension___, such as dates or times. Subclasses of Magnitude include Date, ArithmeticValue, and Time, as well as Character and LookupKey.
---
Since complex values is not scalars and hence cannot be compared along a linear dimension, they could not be inherited from a Magnitude.
Btw this comment seems veeery dated, because it refers to ArithmeticValue, which not present in current class hierarchy :)
As you stated earlier that Real set is a subset of Complex, then if you want to see both of them lying in same class hierarchy, it could require a major redesign the class hierarchy to make Complex a base class, and Float/Integer a subclasses. Since subclasses are specialization of superclasses, and superclass always is more generic than any of its subclass.
Others could step up and say: hey scalars could be seen as a specialized kind of vectors, and vectors could be seen as a specialized kind of matrices, so lets make Matrix to be the ultimate superclass, and then Vector, and then Scalar etc etc..
I can only guess, how far we can go with such generalization(s).
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project