Re: Maintaining Math_Integer, Math_Complex, Math_Vector, Math_Matrix

From: Date: Thu, 12 May 2011 12:44:45 +0000
Subject: Re: Maintaining Math_Integer, Math_Complex, Math_Vector, Math_Matrix
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54280@lists.php.net to get a copy of this message
На 15.3.2011 г. 22:29, Louis Mullie wrote:
After this is done, I would like to achieve better integration between these different packages. i.e. add support for complex numbers in Math_Vector and Math_Matrix. I am quite open to ideas about how to go about this; my basic idea would be to provide a common "Math_Number" class providing a common interface for Math_Complex and Math_Integer (and maybe eventually Math_Fraction?), and a "Math_NumberOp" class interfacing Math_ComplexOp and Math_IntegerOp (and Math_FractionOp?). The updated versions of Math_Vector and Math_Matrix would support matrixes and vectors of Math_Number objects as well as native PHP numbers.
That makes sense. I would say we need some abstract / wrapping Math_Op class / package, which would handle such cases as adding Math_Complex to a Math_Fraction, or just having a fraction of complex numbers, etc. Also, since we would have to start a new release process anyway, I would go towards PHP 5 only version. -- Kouber Saparev http://kouber.saparev.com

« previous php.pear.dev (#54280) next »