Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2005-03-18 11:45:27

On Friday 18 March 2005 16:33, Toon Knapen wrote:
> Michael Stevens wrote:
> > Hi Toon,
> >
> > On Thursday 10 March 2005 13:13, Toon Knapen wrote:
> >>In the constructor of matrix_range for instance, the precondition checks
> >>are commented out. Now there is no error generated when you create a
> >>matrix_range that is bigger than the matrix is defined on. Anybody an
> >>idea why these precondition checks are commented out?
> >
> > The early precondition checks can now be removed. The commenting out with
> > // Early checking of preconditions here.
> > were part of the process to deprecate them.
> I was not aware that you were changing to just-in-time checking. This
> approach indeed provides a lot of advantages.
> > I think at this stage the comments and code could be completely removed.
> I will take care of that if you want.
That would be good.

> > The
> > documentation correctly describes the current behaviour.
> Since you mention the doc, I checked but I did not see any specific
> explanation that the validity of the proxy is verified _only_ when the
> indexing is used.
> The documentation mentions that 'if the specified ranges fall outside of
> the index range of the matrix than the matrix_range is not well formed'
> but this might be interpreted that the range _never_ can fall outside of
> the index range. With this new mechanism they only _need_ to fall
> _inside_ when indexing is done. Right? Should'nt we clarify the
> documentation for this ?

Correct. I see there is a flaw documentation, ill-formed sounds like a
precondition for construction!
My intention in describing ill-formed was to make it clear that not all
operations will behave the same as a well-form matrix_expression. Some may
have undefined behaviour. I guess we should explicit note the operations (may
be more then indexing so we should check the code) that are effected.


Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation  and
                 Bayesian Filtering