From e171b44cf1826c116937eb7cf7839a3e99525e3d Mon Sep 17 00:00:00 2001 From: guido Date: Tue, 24 Feb 2004 15:13:46 +0000 Subject: [PATCH] some documentation changes and new size(i) function git-svn-id: https://svn.dealii.org/trunk@8515 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/table.h | 55 ++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/deal.II/base/include/base/table.h b/deal.II/base/include/base/table.h index 49990cb39d..db8bedda36 100644 --- a/deal.II/base/include/base/table.h +++ b/deal.II/base/include/base/table.h @@ -35,7 +35,7 @@ template class Table<6,T>; /** * Base class for an array of indices of fixed size used for the - * @ref{TableBase} class. Actually, this class serves a dual purpose, + * TableBase class. Actually, this class serves a dual purpose, * as it not only stores indices into said class, but also the sizes * of the table in its various coordinates. * @@ -60,7 +60,7 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the general template, and has no implementation. There are @@ -68,7 +68,7 @@ template class Table<6,T>; * each used value of N), which only differ in the way they * implement their constructors (they take N arguments, something * that cannot be represented by a general template). Actual storage - * of and access to data is done by the @ref{TableIndicesBase} base + * of and access to data is done by the TableIndicesBase base * class of a specializations. * * @author Wolfgang Bangerth, 2002 @@ -81,13 +81,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a one-dimensional table, i.e. a * vector. This class only differs in the non-default constructors * from the other specializations. Actual storage of and access to - * data is done by the @ref{TableIndicesBase} base class of a + * data is done by the TableIndicesBase base class of a * specializations. * * @author Wolfgang Bangerth, 2002 @@ -112,13 +112,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a two-dimensional table. This class * only differs in the non-default constructors from the other * specializations. Actual storage of and access to data is done by - * the @ref{TableIndicesBase} base class of a specializations. + * the TableIndicesBase base class of a specializations. * * @author Wolfgang Bangerth, 2002 */ @@ -143,13 +143,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a three-dimensional table. This class * only differs in the non-default constructors from the other * specializations. Actual storage of and access to data is done by - * the @ref{TableIndicesBase} base class of a specializations. + * the TableIndicesBase base class of a specializations. * * @author Wolfgang Bangerth, 2002 */ @@ -174,13 +174,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a four-dimensional table. This class * only differs in the non-default constructors from the other * specializations. Actual storage of and access to data is done by - * the @ref{TableIndicesBase} base class of a specializations. + * the TableIndicesBase base class of a specializations. * * @author Wolfgang Bangerth, Ralf Hartmann 2002 */ @@ -206,13 +206,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a five-dimensional table. This class * only differs in the non-default constructors from the other * specializations. Actual storage of and access to data is done by - * the @ref{TableIndicesBase} base class of a specializations. + * the TableIndicesBase base class of a specializations. * * @author Wolfgang Bangerth, Ralf Hartmann 2002 */ @@ -239,13 +239,13 @@ template class Table<6,T>; /** - * Array of indices of fixed size used for the @ref{TableBase} + * Array of indices of fixed size used for the TableBase * class. * * This is the specialization for a six-dimensional table. This class * only differs in the non-default constructors from the other * specializations. Actual storage of and access to data is done by - * the @ref{TableIndicesBase} base class of a specializations. + * the TableIndicesBase base class of a specializations. * * @author Wolfgang Bangerth, Ralf Hartmann 2002 */ @@ -652,7 +652,7 @@ namespace internal * Therefore, this data type was invented. Its implementation is * rather straightforward, with two exceptions. The first thing to * think about is how to pass the size in each of the coordinate - * directions to the object; this is done using the @ref{TableIndices} + * directions to the object; this is done using the TableIndices * class. Second, how to access the individual elements. The basic * problem here is that we would like to make the number of arguments * to be passed to the constructor as well as the access functions @@ -673,7 +673,7 @@ namespace internal * access function recursively until we were at the innermost * object. Emulating this behavior without losing the ability to do * index checks, and in particular without losing performance is - * possible but nontrivial, and done in the @ref{TableBaseAccessors} + * possible but nontrivial, and done in the TableBaseAccessors * namespace. * * @@ -787,12 +787,19 @@ class TableBase : public Subscriptor */ void reinit (const TableIndices &new_size); + /** + * Size of the table in direction + * i. + */ + unsigned int size (unsigned int i) const; + + */ /** * Return the sizes of this * object in each direction. */ const TableIndices & size () const; - + /** * Return the number of elements * stored in this object, which @@ -951,7 +958,7 @@ class TableBase : public Subscriptor /** * A class representing a table with arbitrary but fixed number of * indices. This general template implements some additional functions - * over those provided bythe @ref{TableBase} class, such as indexing + * over those provided bythe TableBase class, such as indexing * functions taking the correct number of arguments, etc. * * Rather than this general template, these functions are implemented @@ -2015,6 +2022,16 @@ TableBase::size () const +template +unsigned int +TableBase::size (unsigned int i) const +{ + Assert (i unsigned int TableBase::n_elements () const -- 2.39.5