%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  changes.tex       LiDIA documentation
%%
%%  This file contains the changes in LiDIA.
%%
%%  Copyright (c) 1995,1996,1997 by LiDIA-Group 
%%
%%  Authors: Thomas Papanikolaou
%%           Markus Maurer
%%

\chapter{Changes}

This is a short overview of some changes in {\LiDIA}
from version 1.2.1 to version 1.3.

\vspace{0.5cm}

\subsubsection{class bigint}

The constructor \TT{bigint(double)} was replaced by the
assignment-function \TT{void bigint::assign(double)}
to avoid unexspected behaviour of the class
\TT{bigint} when adding a \TT{bigint} and a \TT{double}.


\subsubsection{class base\_vector\TEMPL{T}}

The function \TT{base\_vector\TEMPL{T}::member(lidia\_size\_t)} now 
returns a const-reference instead of a reference. 


\subsubsection{class bigfloat/bigint\_lattice\_gensys/basis}

These classes are obsolete. Please use the new classes 
\TT{bigfloat/bigint\_lattice} which replace the old ones
and provide a much bigger functionality. The old classes 
won't be supported in future versions of LiDIA and will be 
removed.

The new lattice classes bigint\_lattice and bigfloat\_lattice comprise
algorithms for lattices represented by generating systems, bases and
gram matrices. In order to adjust programs written by using the
old lattice classes one has to replace the class names 
bigint/bigfloat\_lattice\_basis/gensys by bigint/bigfloat\_lattice. In
addition one has to set the appropriate flags (see documentation of the
new lattice classes). Please note the changes in the function names and
the parameters. The functions compute\_basis, extract\_basis
and make\_basis do not exist any more. 


\subsubsection{Handling of algebraic\_numbers}

\begin{itemize}
\item Whereas the constructors for \BF{alg\_numbers} and \BF{modules}
  always had a last optional argument of type \TT{order *} in the old
  version, now this last argument must be either of type \TT{order} or of
  type \TT{number\_field}. This means, that calls like
  \TT{alg\_number(a,3,\&O)} need to be changed to \TT{alg\_number(a,3,O)}.
\item \TT{order(number\_field \&)} now yields the maximal order of a number
  field, not the order generated by the base elements of the field. This
  means, that this constructor may need more than polynomial time. If you
  want the old behaviour, use \TT{order(F.which\_base())} instead.
\item The functions \TT{alg\_number::which\_order()},
  \TT{module::which\_order()}, and \TT{order::which\_field()} no longer
  exist. Instead, there is always the member function \TT{which\_base()},
  which can be usually be used instead. E.g.~instead of 
  \TT{alg\_number(b,1,a.which\_order())} you must now write
  \TT{alg\_number(b,1,a.which\_base())}.

  In the rare cases, where you really need to obtain an order or number
  field, use \TT{order(a.which\_base())} instead of \TT{*a.which\_order()}.
\item The functions \TT{order::maximize(p,f)} and
  \TT{module::ring\_of\_multipliers(p,f)} are replaced by
  \TT{order::maximize(p)} and \TT{module::ring\_of\_multipliers(p)}, since
  the currently implemented algorithm does not require \MATH{p} to be
  prime any longer.
\item The new class \BF{alg\_ideal} has been introduced to handle the special
  case of modules that are in fact even ideals. Although, modules can still
  be used for computations on ideals, using the new class will sometimes be
  slightly faster; as the behaviour of the class module will change a bit
  in the future (e.g.~\TT{module(a,b)} will no longer construct the \EM{ideal}
  generated by \MATH{a} and \MATH{b}), it is recommended, to update your
  code to use the class \BF{alg\_ideal} where possible.
\item An \BF{order} is no longer automatically casted to a
  \BF{module}. Instead it is casted to an \BF{alg\_ideal}. This sometimes
  may result in problems with the \TT{divide} and \TT{multiply} functions,
  since the compiler may not be able to determine whether to use the
  variant for \BF{alg\_ideal}s or the variant for \BF{modules}, without an
  additional hint from the user.
\end{itemize}






