--- a/doc/comms.txi +++ b/doc/comms.txi @@ -1484,56 +1484,37 @@ @node Known Problems, , Function Overloading, Galois Field Basics @subsection Known Problems -Before reporting a bug compare it to this list of known problems +Please review the following list of known problems with the Galois type +before reporting a bug against this package. @table @asis -@item Concatenation -For versions of Octave prior to 2.1.58, the concatenation of Galois arrays -returns a Matrix type. That is @code{[gf([1, 0],m) gf(1, m)]} returns a -matrix went it should return another Galois array. The workaround is to -explicitly convert the returned value back to the correct Galois field using -@code{gf([gf([1, 0],m) gf(1,m)],m)}. - -Since Octave version 2.1.58, @code{[gf([1, 0],m) gf(1, m)]} returns another -Galois array as expected. - @item Saving and loading Galois variables -Saving of Galois variables is only implemented in versions of Octave -later than 2.1.53. If you are using a recent version of Octave then -saving a Galois variable is as simple as - -@example +Saving a Galois variable to a file is as simple as + +@example +octave:1> a = gf (@dots{}); octave:2> save a.mat a @end example -where @var{a} is a Galois variable. To reload the variable within -Octave, the Galois type must be installed prior to a call to -@code{load}. That is +@noindent +where @var{a} is any Galois variable. Galois variables can be saved in the +Octave binary and ASCII formats, as well as the HDF5 format. To load a +Galois variable from a file, the Galois type must already be registered to +the Octave interpreter prior to the call to @code{load}. If no Galois +variables have been created yet, you will have to do something like @example octave:1> dummy = gf (1); octave:2> load a.mat -@end example - -With versions of Octave later than 2.1.53, Galois variables can be -saved in the Octave binary and ASCII formats, as well as the HDF5 -format. If you are using an earlier version of Octave, you can not -directly save a Galois variable. You can however save the information -it contains and reconstruct the data afterwards by doing something -like - -@example -octave:2> x = a.x; m = a.m; p = a.prim_poly; -octave:3> save a.mat x m p; @end example @item Logarithm of zero does not return NaN The logarithm of zero in a Galois field is not defined. However, to avoid segmentation faults in later calculations the logarithm of zero is defined as @code{2^@var{m} - 1}, whose value is not the logarithm of any other value -in the Galois field. A warning is however printed to tell the user about -the problem. For example +in the Galois field. A warning is also shown to tell the user about the +problem. For example @example octave:1> m = 3; @@ -1552,9 +1533,8 @@ exceptions will certainly slow the code down. @item Speed -The code was written piece-meal with no attention to optimum code. Now -that I have something working I should probably go back and tidy the -code up, optimizing it at the same time. +The code was written piecemeal with no attention to optimization. Some +operations may be slower than they could be. Contributions are welcome. @end table @@ -1649,14 +1629,13 @@ within the Galois field. In this case they will be assumed to be of the same field. -As Octave supports concatenation of typed matrices only for version -2.1.58 and later, matrix concatenation will force the Galois array back -to a normal matrix for earlier version. For instance for Octave 2.1.58 -and later. +Galois arrays can also be concatenated with real matrices or with other +Galois arrays in the same field. For example @example octave:1> a = [gf([0:7], 3); gf([7:-1:0], 3)]; octave:2> b = [a, a]; +octave:3> c = [a, eye(2)]; octave:3> whos Variables in the current scope: @@ -1664,37 +1643,12 @@ ==== ==== ==== ===== ===== a 2x8 64 galois b 2x16 128 galois - -Total is 48 elements using 192 bytes -@end example - -and for previous versions of Octave - -@example -octave:1> a = [gf([0:7], 3); gf([7:-1:0], 3)]; -octave:2> b = [a, a]; -octave:3> whos - -*** local user variables: - -prot type rows cols name -==== ==== ==== ==== ==== - rwd matrix 2 8 a - rwd matrix 2 16 b -@end example - -This has the implication that many of the scripts included with Octave -that should work with Galois fields, won't work correctly for versions -earlier than 2.1.58. If you wish to concatenate Galois arrays with earlier -versions, use the syntax - -@example -octave:1> a = gf ([0:7], 3); -octave:2> b = gf ([a, a], a.m, a.prim_poly); -@end example - -which explicitly reconverts @var{b} to the correct Galois Field. Other -basic manipulations of Galois arrays are + c 2x10 80 galois + +Total is 68 elements using 272 bytes +@end example + +Other basic manipulations of Galois arrays are @table @code @item isempty