
From:  David Bateman 
Subject:  Class of User Types [Was: Moving code from octaveforge to octave [Was: polyderiv problem?]] 
Date:  Fri, 25 Feb 2005 10:20:38 +0100 
Useragent:  Mozilla Thunderbird 0.8 (X11/20040923) 
How do you save and load such beasts from files? Does typeinfo give more complete information?If the types really are not compatible, then the string names should not match.Maybe class should return "GF(2)" if it is GF(2), and octave can pass the extra info in the parentheses to the zeros constructor.  Paul
Paul,load/save is no problems, I just save which extension field of GF(2) I'm in an the primitive polynominal, together with the class. Its just another piece of information associated with the variable.
As for having class return all of the information on the type, I really hope your kidding. The problem is then that there are a huge number of different primitive polynomials available as we take larger extension fields of GF(2). For example GF(2^15) has 1800 different possible primitive polynomials. The problem is even worse for fixed point types, where each element of a matrix can have a different representation and each of those between 0 and 32 bits in the representation of the integer and decimal parts of the elements.
The implication that class returns the full information to define the type, is that there is a completely different type for all possible galois fields and fixed point matrices. Even if there were seperate types for each of the possibilities, imagine the number of different versions of the operators I'd need to implement, particularly for the fixed point types. In all practical senses this is not feasible.
For the fixed point types, having different representations doesn't make them incompatiable. All aritmetic operators can still be performed. However the same can not be said for galois fields. So I think for galois fields we just have to live with the return string of class being the same for incompatiable galois fields...
Regards David  David Bateman address@hiddenMotorola Labs  Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 GifSurYvette FRANCE
The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary
[Prev in Thread]  Current Thread  [Next in Thread] 