On 5/22/11 5:00 AM, Luc Maisonobe wrote:
> Hello,
>
> The current o.a.c.math.geometry.euclidean packages are
> inconsistent. The oned and twod packages define respectively
> Point1D and Point2D classes, with namings akin to affine spaces
> and the threed package defines a Vector3D class, akin to vector
> spaces.
>
> I would suggest, for the sake of type safety, to provide in all
> packages both a PointxD and a VectorxD class, one corresponding to
> affine spaces and the other one to vectorial spaces. Of course,
> there would be conversions between the two classes (for example
> the difference between two points is a vector, adding a vector to
> a point is a point but adding to vectors is a vector).
>
> This would improve readability, avoid errors and allow overriding
> some methods (like addition for vectors in the example above) and
> constructors (like Line(Point, Point) and Line(Point, Vector)).
>
> I need this to have a generic way to build an hyperplane, from a
> point and a normal vector without types clashing.

Can you explain a little more why a) you need a generic way to build
hyperplanes (i.e., what dimensions)?

Assuming this is really needed, then +1; otherwise I am not sure we
need VectorxD for x = 1, 2.

Phil
>
> What do you think ?
>
> Luc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to