Source
// into which casacore::MS spectral windows. Since the user can select which windows
//# IDIndex.h: this defines IDIndex, which maps one indexing system into another
//# Copyright (C) 2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//#
//# $Id: IDIndex.h,v 1.2 2009/09/03 23:28:32 pteuben Exp $
// <summary>
// a simple mapping from one indexing system to another
// </summary>
//
// <use visibility=export>
//
// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
// </reviewed>
//
// <etymology>
// This class is puts an index on an ordered list of IDs.
// </etymology>
//
// <synopsis>
// Suppose that you have a list of things accessed via an index (i.e. an
// integer ID), say spectral windows. Suppose further you want to map them
// into some other index system, perhaps because you are reordering them.
// This simple class can keep track of the mapping between the two systems. <p>
//
// The mapping is set up through sequenced calls to the <src>add()</src>
// function, to which indices from the "input" system are passed. The order
// that the indices are passed indicate their order in the output system.
// One can then map to the output system by passing the input index to the
// () operator. <p>
//
// One sets the index that the first input index will be mapped to via the
// constructor, allowing one to map, for example, {1, 3, 2} into {4, 5, 6}.
// </synopsis>
//