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

added range modifiers

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: 1445
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 284f0eed
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README.changelog,v 1.40 2003-12-23 13:53:30 tforb Exp $
* $Id: README.changelog,v 1.41 2004-01-11 17:25:23 tforb Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -21,12 +21,15 @@
/*! \page page_changelog ChangeLog (AFF)
$Id: README.changelog,v 1.40 2003-12-23 13:53:30 tforb Exp $
$Id: README.changelog,v 1.41 2004-01-11 17:25:23 tforb Exp $
\sa \ref page_project_status
Major changes in the interface of the library are marked by \b !!.
- \b 11/01/2004 (thof)
- added index range modifiers to aff::LinearShape
- \b 23/12/2003 (thof)
- defined Browser
- made Browser run with Series class (involves updates to SeriesStepper)
......@@ -184,7 +187,7 @@
/*! \page page_project_status Project status (AFF)
$Id: README.changelog,v 1.40 2003-12-23 13:53:30 tforb Exp $
$Id: README.changelog,v 1.41 2004-01-11 17:25:23 tforb Exp $
\sa \ref page_changelog
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: linearshape.h,v 1.1 2003-12-23 13:53:31 tforb Exp $
* $Id: linearshape.h,v 1.2 2004-01-11 17:25:23 tforb Exp $
* \author Thomas Forbriger
* \date 23/12/2003
*
......@@ -13,6 +13,7 @@
*
* REVISIONS and CHANGES
* - 23/12/2003 V1.0 Thomas Forbriger
* - 11/01/2004 V1.1 now offers index range modifiers
*
* ============================================================================
*/
......@@ -21,9 +22,9 @@
#ifndef AFF_LINEARSHAPE_H_VERSION
#define AFF_LINEARSHAPE_H_VERSION \
"AFF_LINEARSHAPE_H V1.0 "
"AFF_LINEARSHAPE_H V1.1 "
#define AFF_LINEARSHAPE_H_CVSID \
"$Id: linearshape.h,v 1.1 2003-12-23 13:53:31 tforb Exp $"
"$Id: linearshape.h,v 1.2 2004-01-11 17:25:23 tforb Exp $"
namespace aff {
......@@ -45,6 +46,9 @@ namespace aff {
* (\a first-base, \a last-base).
* Thus the element \a k of the series will be found at index \a k-base
* in the representation.
*
* Since we do not need to handle multiple dimensions, we offer in-class
* reshaping functions.
*/
class LinearShape
{
......@@ -67,6 +71,26 @@ namespace aff {
Tsize size() const
{ return(static_cast<Tsize>(Mlast-Mfirst+1)); }
Tsize memory_size() const { return(this->size()); }
void setindexrange(const Tsubscript& first,
const Tsubscript last)
{
AFF_assert((last>=first),
"ERROR (LinearShape::setindexrange): inconsistent arguments");
setfirstindex(first);
setlastindex(last);
}
void setfirstindex(const Tsubscript& first)
{
AFF_assert(((first>=Mfirst)&&(first<=Mlast)),
"ERROR (LinearShape::setfirstindex): index value out of range");
Mfirst=first;
}
void setlastindex(const Tsubscript& last)
{
AFF_assert(((last>=Mfirst)&&(last<=Mlast)),
"ERROR (LinearShape::setlastindex): index value out of range");
Mlast=last;
}
private:
Tsubscript Mfirst; //!< first valid index
Tsubscript Mlast; //!< last valid index
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment