Re: automatically assigning names to indexes
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: automatically assigning names to indexes

From: George Sakkis <gsakkis@rutgers.edu>
Date: Tue Jul 12 2005 - 20:53:13 CEST

<simonwittber@gmail.com> wrote

> > And what should happen for vectors of size != 3 ? I don't think that a
> > general purpose vector class should allow it; a Vector3D subclass would
> > be more natural for this.
>
> That's the 'magic' good idea I'm looking for. I think a unified Vector
> class for all size vectors is a worthy goal!

What 'magic' ? The (x,y,z) notation is used only for 3D vectors. (x,y)
is also common for 2D and perhaps (t,x,y,z) for 4D, with t for time.
There are only 26 letters (or 52 if you allow capitals), so I don't see
how this can be generalized _usefully_ to arbitrary number of
dimensions.

George
Received on Thu Sep 29 16:54:43 2005