Commit b0a76b3a authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

a lot of new code

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1231
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 7dbd8d27
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.10 2002-12-20 12:21:04 forbrig Exp $
# $Id: Makefile,v 1.11 2002-12-23 11:44:03 forbrig Exp $
#
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
#
......@@ -94,8 +94,11 @@ TMPPARDEF=-D BIN_TYPE -D BIN_N -D BIN_REPR -D BIN_SUBS
# files which are to be edited
flist: Makefile tests/Makefile doxybrief.cfg doxyfull.cfg $(README) \
$(HEADERS) $(SRC) $(TESTS) $(wildcard doxy*.cfg)
echo $^ | tr ' ' '\n' | sort > $@
$(HEADERS) $(SRC) $(TESTS) $(wildcard doxy*.cfg) \
tests/f77common.inc tests/f77procs.f
echo $(filter-out lib/% tests/%,$^) | tr ' ' '\n' | sort > $@
echo $(filter lib/%,$^) | tr ' ' '\n' | sort >> $@
echo $(filter tests/%,$^) | tr ' ' '\n' | sort >> $@
# Offers you a list of files to edit (ask Thomas for appropriate vim
# configuration).
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README,v 1.11 2002-12-20 18:23:46 forbrig Exp $
* $Id: README,v 1.12 2002-12-23 11:44:03 forbrig Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -50,7 +50,7 @@ namespace aff {
\since December 2002
\date December 2002
\version V1.0
$Id: README,v 1.11 2002-12-20 18:23:46 forbrig Exp $
$Id: README,v 1.12 2002-12-23 11:44:03 forbrig Exp $
Contents of this page:
- \ref sec_main_aims
......@@ -65,6 +65,7 @@ $Id: README,v 1.11 2002-12-20 18:23:46 forbrig Exp $
- \ref page_notes
- \ref page_naming
- \ref page_representation
- \ref page_fortran
- \ref page_changelog
- \ref page_project_status
......@@ -123,7 +124,7 @@ $Id: README,v 1.11 2002-12-20 18:23:46 forbrig Exp $
basic aff::Array functionality.
These additional modules are:
-# aff::Shaper presented in aff/shaper.h and used to passed Fortran layouts
-# aff::Shaper presented in aff/shaper.h and used to pass Fortran layouts
to array constructors.
-# aff::Series presented in aff/series.h which is used to interface linear
sequences of data (like time series or Fourier spectra).
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README.changelog,v 1.17 2002-12-20 18:22:17 forbrig Exp $
* $Id: README.changelog,v 1.18 2002-12-23 11:44:03 forbrig Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -11,6 +11,7 @@
*
* This file contains:
* - \ref page_changelog
* - \ref page_project_status
*
* REVISIONS and CHANGES
* - 17/12/2002 V1.0 Thomas Forbriger
......@@ -20,12 +21,23 @@
/*! \page page_changelog ChangeLog (AFF)
$Id: README.changelog,v 1.17 2002-12-20 18:22:17 forbrig Exp $
$Id: README.changelog,v 1.18 2002-12-23 11:44:03 forbrig Exp $
\sa \ref page_project_status
Major changes in the interface of the library are marked by \b !!.
- \b 23/12/2002 (thof)
- coded class aff::Subarray
- coded class aff::Slice
- introduced tests/helpertest.cc to test aff::Iterator,
aff::Subarray and aff::Slice and tested helper classes
- reorganized aff::Iterator code. Inheritance from Stepper does not work.
- aff::Array::copyin() and aff::Array::copyout() work
- \b 22/12/2002 (thof)
- started test for interface to Fortran 77 code
- \b 20/12/2002 (thof)
- introduced aff/lib/seriesstepper.h and aff/lib/seriesstepper.cc
which define aff::util::SeriesStepper
......@@ -78,7 +90,7 @@
/*! \page page_project_status Project status (AFF)
$Id: README.changelog,v 1.17 2002-12-20 18:22:17 forbrig Exp $
$Id: README.changelog,v 1.18 2002-12-23 11:44:03 forbrig Exp $
\sa \ref page_changelog
......@@ -114,7 +126,7 @@
<TD>19/12/2002</TD><TD>20/12/2002</TD><TD> </TD><TD> </TD>
</TR>
<TR><TD>libaff/iterator.h</TD>
<TD>20/12/2002</TD><TD> </TD><TD> </TD><TD> </TD>
<TD>20/12/2002</TD><TD> </TD><TD>23/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/series.h</TD>
<TD>17/12/02</TD><TD> </TD><TD> </TD><TD> </TD>
......@@ -123,11 +135,17 @@
<TD>12/12/02</TD><TD> </TD><TD>18/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/slice.h</TD>
<TD> </TD><TD> </TD><TD> </TD><TD> </TD>
<TD>23/12/02</TD><TD> </TD><TD>23/12/02</TD>
<TD>The syntax to use a Slice object stand-alone for assignment is not
very intuitive</TD>
</TR>
<TR><TD>libaff/subarray.h</TD>
<TD> </TD><TD> </TD><TD> </TD><TD> </TD>
<TD>23/12/02</TD><TD> </TD><TD>23/12/02</TD>
<TD>The syntax to use a Subarray object stand-alone for assignment is
not very intuitive</TD>
</TR>
<TR><TD><BR><B>subdirectory "lib"</B></TD></TR>
<TR><TD>libaff/lib/README</TD>
<TD>has no code</TD><TD>20/12/02</TD><TD>has no code</TD><TD> </TD>
</TR>
......@@ -153,7 +171,7 @@
<TD>13/12/02</TD><TD> </TD><TD>15/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/strided.cc</TD>
<TD>13/12/02</TD><TD> </TD><TD>18/12/02</TD><TD> </TD>
<TD>13/12/02</TD><TD>23/12/02</TD><TD>18/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/strided.h</TD>
<TD>13/12/02</TD><TD> </TD><TD>18/12/02</TD><TD> </TD>
......@@ -165,13 +183,13 @@
<TD>20/12/02</TD><TD>20/12/02</TD><TD> </TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/stridedstepper.cc</TD>
<TD>18/12/02</TD><TD> </TD><TD>18/12/02</TD><TD> </TD>
<TD>18/12/02</TD><TD>23/12/02</TD><TD>18/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/stridedstepper.h</TD>
<TD>18/12/02</TD><TD> </TD><TD>18/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/types.h</TD>
<TD>13/12/02</TD><TD> </TD><TD>15/12/02</TD><TD> </TD>
<TD>13/12/02</TD><TD>23/12/02</TD><TD>15/12/02</TD><TD> </TD>
</TR>
<TR><TD>libaff/lib/dump_macros.h</TD>
<TD>19/12/02</TD><TD>19/12/02</TD><TD>19/12/02</TD><TD> </TD>
......@@ -191,6 +209,8 @@
<TR><TD>libaff/lib/dump_simplerigidarray.h</TD>
<TD>19/12/02</TD><TD> </TD><TD>19/12/02</TD><TD> </TD>
</TR>
<TR><TD><BR><B>tests and examples</B></TD></TR>
<TR><TD>libaff/tests/arraytest.cc</TD>
<TD>19/12/2002</TD><TD> </TD><TD>19/12/2002</TD>
<TD> </TD>
......@@ -199,6 +219,10 @@
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
</TR>
<TR><TD>libaff/tests/helpertest.cc</TD>
<TD>23/12/02</TD><TD> </TD><TD>23/12/02</TD>
<TD> </TD>
</TR>
<TR><TD>libaff/tests/rangetest.cc</TD>
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
......@@ -219,6 +243,22 @@
<TD>15/12/02</TD><TD> </TD><TD>15/12/02</TD>
<TD>does not check pathological cases</TD>
</TR>
<TR><TD>libaff/tests/f77common.inc</TD>
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
</TR>
<TR><TD>libaff/tests/f77procs.f</TD>
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
</TR>
<TR><TD>libaff/tests/f77proto.h</TD>
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
</TR>
<TR><TD>libaff/tests/f77test.cc</TD>
<TD> </TD><TD> </TD><TD> </TD>
<TD> </TD>
</TR>
</TABLE>
*/
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: array_dec.h,v 1.15 2002-12-20 18:26:13 forbrig Exp $
* $Id: array_dec.h,v 1.16 2002-12-23 11:44:03 forbrig Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -34,6 +34,8 @@
* - Access declarations are nor useable with functions
* that return a reference to *this. They must be
* reimplemented.
* - 23/12/2002 V1.5 (thof)
* - copyin() and copyout() work
*
* ============================================================================
*/
......@@ -42,9 +44,9 @@
#ifndef AFF_ARRAY_DEC_H_VERSION
#define AFF_ARRAY_DEC_H_VERSION \
"AFF_ARRAY_DEC_H V1.3"
"AFF_ARRAY_DEC_H V1.5"
#define AFF_ARRAY_DEC_H_CVSID \
"$Id: array_dec.h,v 1.15 2002-12-20 18:26:13 forbrig Exp $"
"$Id: array_dec.h,v 1.16 2002-12-23 11:44:03 forbrig Exp $"
#include <aff/lib/sharedheap.h>
#include <aff/lib/strided.h>
......@@ -139,6 +141,12 @@ namespace prebuilt {
typedef T* Tpointer;
//! Type of reference to element
typedef T& Treference;
//! const element type
typedef const T Tconst_value;
//! Type of pointer to const element
typedef const T* Tconst_pointer;
//! Type of reference to const element
typedef const T& Tconst_reference;
//@}
/*-----------------------------------------------------------------*/
......@@ -176,7 +184,6 @@ namespace prebuilt {
//! access to base class function
Tbase::operator();
Tbase::operator=;
Tbase::copyin;
Tbase::shape;
//@}
......@@ -194,6 +201,14 @@ namespace prebuilt {
this->Tbase::copyin(a);
return(*this);
}
//! create a copy of this array
Array copyout() const
{
Array copy(Tshape(this->first(),this->last()));
copy.copyin(*this);
return(copy);
}
//! return full access representation
const Trepresentation& representation()
......@@ -237,6 +252,12 @@ namespace prebuilt {
typedef const T* Tpointer;
//! Type of reference to element
typedef const T& Treference;
//! const element type
typedef const T Tconst_value;
//! Type of pointer to const element
typedef const T* Tconst_pointer;
//! Type of reference to const element
typedef const T& Tconst_reference;
//! Type of this array
typedef Array<const T> Tcontainer;
//! Type of the array of const values
......@@ -357,7 +378,12 @@ namespace prebuilt {
* affect elements of \c A, this not the case for changes applied to
* \c B.
*/
Array copyout() const;
Array copyout() const
{
Array copy(Tshape(this->first(),this->last()));
copy.copyin(*this);
return(copy);
}
//! \name access declarations
//@{
......@@ -403,7 +429,7 @@ namespace prebuilt {
* \return itself
*/
template<class TT>
Array& copyin(const Array<TT>& a);
Array& copyin(const Array<const TT>& a);
/*-----------------------------------------------------------------*/
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: array_def.h,v 1.11 2002-12-20 18:22:17 forbrig Exp $
* $Id: array_def.h,v 1.12 2002-12-23 11:44:03 forbrig Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -31,6 +31,8 @@
* constructor with default arguments
* - distinguish between mutable and non-mutable
* representation
* - 23/12/2002 V1.4 (thof)
* - copyin() and copyout() work
*
* ============================================================================
*/
......@@ -43,9 +45,9 @@
#ifndef AFF_ARRAY_DEF_H_VERSION
#define AFF_ARRAY_DEF_H_VERSION \
"AFF_ARRAY_DEF_H V1.3"
"AFF_ARRAY_DEF_H V1.4"
#define AFF_ARRAY_DEF_H_CVSID \
"$Id: array_def.h,v 1.11 2002-12-20 18:22:17 forbrig Exp $"
"$Id: array_def.h,v 1.12 2002-12-23 11:44:03 forbrig Exp $"
#include<aff/lib/error.h>
#include<aff/lib/stridedstepper.h>
......@@ -90,7 +92,7 @@ namespace prebuilt {
{
AFF_assert((shape.first_offset()>=0),
"ERROR (Array): invalid shape in constructor");
AFF_assert((shape.last_offset()<representation.size()),
AFF_assert((shape.last_offset()<Tsubscript(representation.size())),
"ERROR (Array): shape and representation are inconsistent");
this->Tshape::operator=(shape);
this->Tmutable_representation::operator=(representation);
......@@ -118,6 +120,29 @@ namespace prebuilt {
return(*this);
}
/*----------------------------------------------------------------------*/
//! read data from other array
template<class T>
template<class TT>
Array<const T>& Array<const T>::copyin(const Array<const TT>& a)
{
typedef typename Array<const TT>::Tstepper Tsta;
typedef typename Array<const T>::Tstepper Tstm;
Tsta sta(a);
Tstm stm(*this);
sta.tofirst();
stm.tofirst();
while (sta.valid() && stm.valid())
{
this->Tmutable_representation::operator[](stm.current())=
a.representation()[sta.current()];
stm.incr();
sta.incr();
}
return(*this);
}
#ifdef AFF_PREBUILT
} // namespace prebuilt
#endif
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: iterator.h,v 1.4 2002-12-20 18:26:13 forbrig Exp $
* $Id: iterator.h,v 1.5 2002-12-23 11:44:03 forbrig Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -15,6 +15,8 @@
*
* REVISIONS and CHANGES
* - 08/12/2002 V1.0 copied from libcontxx
* - 23/12/2002 V1.1 (thof)
* - reorganized code: do not inherit from Stepper
*
* ============================================================================
*/
......@@ -23,9 +25,9 @@
#ifndef AFF_ITERATOR_H_VERSION
#define AFF_ITERATOR_H_VERSION \
"AFF_ITERATOR_H V1.0"
"AFF_ITERATOR_H V1.1"
#define AFF_ITERATOR_H_CVSID \
"$Id: iterator.h,v 1.4 2002-12-20 18:26:13 forbrig Exp $"
"$Id: iterator.h,v 1.5 2002-12-23 11:44:03 forbrig Exp $"
#include<aff/lib/types.h>
#include<aff/lib/stridedstepper.h>
......@@ -45,8 +47,10 @@ namespace aff {
* Define requirements for the interface a container must provide.
*/
template<class C>
class Iterator: private typename C::Tshape::Tstepper {
class Iterator {
public:
//! type of container
typedef C Tcontainer;
//! representation class
typedef typename C::Trepresentation Trepresentation;
//! shape class
......@@ -61,40 +65,39 @@ namespace aff {
typedef typename C::Tpointer Tpointer;
//! only this constructor
Iterator(C& c):
Tstepper(c.shape()), Mrepresentation(c.representation()) { }
Mstepper(c.shape()), Mrepresentation(c.representation()) { }
//! access declarations
//! delegate to stepper
//@{
Tstepper::more;
Tstepper::less;
Tstepper::valid;
//@}
//! reimplement functions that return reference to *this
//@{
Iterator& incr() { this->Tstepper::incr(); return(*this); }
Iterator& decr() { this->Tstepper::decr(); return(*this); }
Iterator& tofirst() { this->Tstepper::tofirst(); return(*this); }
Iterator& tolast() { this->Tstepper::tolast(); return(*this); }
bool more() const { return(Mstepper.more()); }
bool less() const { return(Mstepper.less()); }
bool valid() const { return(Mstepper.valid()); }
Iterator& incr() { Mstepper.incr(); return(*this); }
Iterator& decr() { Mstepper.decr(); return(*this); }
Iterator& tofirst() { Mstepper.tofirst(); return(*this); }
Iterator& tolast() { Mstepper.tolast(); return(*this); }
//@}
//! synonym for increment
Iterator& operator++()
{ this->incr(); return(*this); }
{ return(this->incr()); }
//! synonym for decrement
Iterator& operator--()
{ this->decr(); return(*this); }
{ return(this->decr()); }
//! access element
Treference operator*()
{ return(Mrepresentation[this->Tstepper::current()]); }
{ return(Mrepresentation[Mstepper.current()]); }
//! member selection operator
Tpointer operator->()
{ return(&(Mrepresentation[this->Tstepper::current()])); }
{ return(&(Mrepresentation[Mstepper.current()])); }
private:
//! Stepper to use
Tstepper Mstepper;
//! Representation to access
Trepresentation Mrepresentation;
}; // class Iterator
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README,v 1.5 2002-12-20 18:04:14 forbrig Exp $
* $Id: README,v 1.6 2002-12-23 11:44:03 forbrig Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -114,5 +114,19 @@ deep copy (elementwise copy) and a shallow copy (copying the representation).
*/
/*======================================================================*/
/*! \page page_fortran Interfacing Fortran 77
Contents of this page:
- \ref sec_fortran_links
- \ref sec_fortran_call
- \ref sec_fortran_common
\section sec_fortran_links Links to other helpful information
\section sec_fortran_call Passing arrays through function calls
\section sec_fortran_common Accessing arrays in common blocks
*/
// ----- END OF README -----
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: dump_array.h,v 1.1 2002-12-19 18:30:06 forbrig Exp $
* $Id: dump_array.h,v 1.2 2002-12-23 11:44:04 forbrig Exp $
* \author Thomas Forbriger
* \date 19/12/2002
*
......@@ -25,7 +25,7 @@
#define AFF_DUMP_ARRAY_H_VERSION \
"AFF_DUMP_ARRAY_H V1.0 "
#define AFF_DUMP_ARRAY_H_CVSID \
"$Id: dump_array.h,v 1.1 2002-12-19 18:30:06 forbrig Exp $"
"$Id: dump_array.h,v 1.2 2002-12-23 11:44:04 forbrig Exp $"
#include<iostream>
#include<aff/array.h>
......@@ -121,7 +121,7 @@ void dump_array(const Array<const T>& array,
AFF_assert((i<Strided::Mmax_dimen),
"ERROR (dump_map): illegal dimensionality");
dump(array);
os << " elements through " << i+1 << "dimensional access:" << endl;
os << " elements through " << i+1 << " dimensional access:" << endl;
Strided::TIndexVec index(array.first());
dump_array_helper(array, i, i, index, os);
}
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: dump_macros.h,v 1.2 2002-12-20 18:22:19 forbrig Exp $
* $Id: dump_macros.h,v 1.3 2002-12-23 11:44:04 forbrig Exp $
* \author Thomas Forbriger
* \date 19/12/2002
*
......@@ -30,7 +30,7 @@
#define AFF_DUMP_MACROS_H_VERSION \
"AFF_DUMP_MACROS_H V1.0"
#define AFF_DUMP_MACROS_H_CVSID \
"$Id: dump_macros.h,v 1.2 2002-12-20 18:22:19 forbrig Exp $"
"$Id: dump_macros.h,v 1.3 2002-12-23 11:44:04 forbrig Exp $"
#include<iostream>
......@@ -57,7 +57,7 @@
*
* \ingroup group_helpers
*/
#define CODE( C ) cout << #C << endl; C
#define CODE( C ) cout << #C << ";" << endl; C
#endif // AFF_DUMP_MACROS_H_VERSION (includeguard)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seriesstepper.h,v 1.1 2002-12-20 10:18:43 forbrig Exp $
* $Id: seriesstepper.h,v 1.2 2002-12-23 11:44:04 forbrig Exp $
* \author Thomas Forbriger
* \date 20/12/2002
*
......@@ -16,6 +16,8 @@
*
* REVISIONS and CHANGES
* - 20/12/2002 V1.0 Thomas Forbriger
* - 23/12/2002 V1.1 (thof)
* - this class had no public interface
*
* ============================================================================
*/
......@@ -24,9 +26,9 @@
#ifndef AFF_SERIESSTEPPER_H_VERSION
#define AFF_SERIESSTEPPER_H_VERSION \
"AFF_SERIESSTEPPER_H V1.0"
"AFF_SERIESSTEPPER_H V1.1"
#define AFF_SERIESSTEPPER_H_CVSID \
"$Id: seriesstepper.h,v 1.1 2002-12-20 10:18:43 forbrig Exp $"
"$Id: seriesstepper.h,v 1.2 2002-12-23 11:44:04 forbrig Exp $"
#include<aff/lib/types.h>
......@@ -45,42 +47,43 @@ namespace util {
*/
class SeriesStepper
{
//! only non-copy constructor
SeriesStepper(const Tsubscript& first,
const Tsubscript& last,
const Tsize& base):
Mfirst_offset(first-base), Mlast_offset(last-base),
Mbase(base), Mcurrent(first-base), Mvalid(true) { }
//! return current index value for Representation access
const Tsubscript& current() const { return(Mcurrent); }
//! return current index vector for array access
Tsubscript index() const { return(Mcurrent+Mbase); }
//! increment offset - return reference to itself
SeriesStepper& incr();
//! decrement offset - return reference to itself
SeriesStepper& decr();
//! returns true if there are more elements in incr-direction
bool more() const
{ return(Mcurrent<Mlast_offset); }
//! returns true if there are more elements in decr-direction
bool less() const
{ return(Mcurrent>Mfirst_offset); }
//! valid if not passed end or beginning
const bool& valid() const
{ return(Mvalid); }
//! set current element index to the first - return reference to itself
SeriesStepper& tofirst();
//! set current element index to the last - return reference to itself
SeriesStepper& tolast();
private:
//! store current bounds to reduce execution time
Tsubscript Mfirst_offset, Mlast_offset;
//! hold reference to shape
Tsize Mbase;
//! hold current position offset to memory
Tsubscript Mcurrent;
//! true while not passed start or end
bool Mvalid;
public:
//! only non-copy constructor
SeriesStepper(const Tsubscript& first,
const Tsubscript& last,
const Tsize& base):
Mfirst_offset(first-base), Mlast_offset(last-base),
Mbase(base), Mcurrent(first-base), Mvalid(true) { }
//! return current index value for Representation access
const Tsubscript& current() const { return(Mcurrent); }
//! return current index vector for array access
Tsubscript index() const { return(Mcurrent+Mbase); }
//! increment offset - return reference to itself
SeriesStepper& incr();
//! decrement offset - return reference to itself
SeriesStepper& decr();
//! returns true if there are more elements in incr-direction
bool more() const
{ return(Mcurrent<Mlast_offset); }
//! returns true if there are more elements in decr-direction
bool less() const
{ return(Mcurrent>Mfirst_offset); }
//! valid if not passed end or beginning
const bool& valid() const