* or not (i.e. write access is only allowed if the value is false).
*
* Since with <tt>N</tt> indices, the effect of applying
- * <tt>operator[]</tt> is getting access to something we <tt>N-1</tt>
+ * <tt>operator[]</tt> is getting access to something with <tt>N-1</tt>
* indices, we have to implement these accessor classes recursively, with
* stopping when we have only one index left. For the latter case, a
* specialization of this class is declared below, where calling
* elements, and to know which subset we need to know the dimensions of
* the table and the present index, which is indicated by <tt>P</tt>.
*
- * As stated for the entire namespace, you will not usually have to do
+ * As stated for the entire namespace, you will not usually have to deal
* with these classes directly, and should not try to use their interface
* directly as it may change without notice. In fact, since the
* constructors are made private, you will not even be able to generate
/**
* Index operator. Performs a range check.
*/
- Accessor<N,T,C,P-1> operator [] (const unsigned int i) const;
+ Accessor<N,T,C,P-1> operator [] (const size_type i) const;
/**
* Exception for range check. Do not use global exception since this way
* we can output which index is the wrong one.
*/
- DeclException3 (ExcIndexRange, int, int, int,
+ DeclException3 (ExcIndexRange, size_type, size_type, size_type,
<< "Index " << N-P+1 << "has a value of "
<< arg1 << " but needs to be in the range ["
<< arg2 << "," << arg3 << "[.");
/**
* Index operator. Performs a range check.
*/
- reference operator [] (const unsigned int) const;
+ reference operator [] (const size_type) const;
/**
* Return the length of one row, i.e. the number of elements
* corresponding to the last index of the table object.
*/
- unsigned int size () const;
+ size_type size () const;
/**
* Return an iterator to the first element of this row.
/**
* Size of the table in direction <tt>i</tt>.
*/
- unsigned int size (const unsigned int i) const;
+ size_type size (const unsigned int i) const;
/**
* Return the sizes of this object in each direction.
/**
* Constructor. Pass down the given dimension to the base class.
*/
- Table (const unsigned int size);
+ Table (const size_type size);
/**
* Constructor. Create a table with a given size and initialize it from a
* input range. If false, change the first index fastest.
*/
template <typename InputIterator>
- Table (const unsigned int size,
+ Table (const size_type size,
InputIterator entries,
const bool C_style_indexing = true);
* accesses the requested data element. Returns a read-only reference.
*/
typename AlignedVector<T>::const_reference
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Since this is a one-dimensional object, this simply
* accesses the requested data element. Returns a read-write reference.
*/
typename AlignedVector<T>::reference
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Access operator. Since this is a one-dimensional object, this simply
* accesses the requested data element. Returns a read-only reference.
*/
typename AlignedVector<T>::const_reference
- operator () (const unsigned int i) const;
+ operator () (const size_type i) const;
/**
* Access operator. Since this is a one-dimensional object, this simply
* accesses the requested data element. Returns a read-write reference.
*/
typename AlignedVector<T>::reference
- operator () (const unsigned int i);
+ operator () (const size_type i);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2);
+ Table (const size_type size1,
+ const size_type size2);
/**
* Constructor. Create a table with a given size and initialize it from a
* input range. If false, change the first index fastest.
*/
template <typename InputIterator>
- Table (const unsigned int size1,
- const unsigned int size2,
+ Table (const size_type size1,
+ const size_type size2,
InputIterator entries,
const bool C_style_indexing = true);
* with the earlier <tt>vector2d</tt> class. Passes down to the base class
* by converting the arguments to the data type requested by the base class.
*/
- void reinit (const unsigned int size1,
- const unsigned int size2,
+ void reinit (const size_type size1,
+ const size_type size2,
const bool omit_default_initialization = false);
using TableBase<2,T>::reinit;
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<2,T,true,1>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested row of
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<2,T,false,1>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
* This version of the function only allows read access.
*/
typename AlignedVector<T>::const_reference
- operator () (const unsigned int i,
- const unsigned int j) const;
+ operator () (const size_type i,
+ const size_type j) const;
/**
* This version of the function allows read-write access.
*/
typename AlignedVector<T>::reference
- operator () (const unsigned int i,
- const unsigned int j);
+ operator () (const size_type i,
+ const size_type j);
/**
* Make the corresponding operator () from the TableBase base class
* Number of rows. This function really makes only sense since we have a
* two-dimensional object here.
*/
- unsigned int n_rows () const;
+ size_type n_rows () const;
/**
* Number of columns. This function really makes only sense since we have a
* two-dimensional object here.
*/
- unsigned int n_cols () const;
+ size_type n_cols () const;
protected:
/**
* implementation of these table classes for 2d arrays, then called
* <tt>vector2d</tt>.
*/
- typename AlignedVector<T>::reference el (const unsigned int i,
- const unsigned int j);
+ typename AlignedVector<T>::reference el (const size_type i,
+ const size_type j);
/**
* Return the value of the element <tt>(i,j)</tt> as a read-only reference.
* implementation of these table classes for 2d arrays, then called
* <tt>vector2d</tt>.
*/
- typename AlignedVector<T>::const_reference el (const unsigned int i,
- const unsigned int j) const;
+ typename AlignedVector<T>::const_reference el (const size_type i,
+ const size_type j) const;
};
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3);
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3);
/**
* Constructor. Create a table with a given size and initialize it from a
* input range. If false, change the first index fastest.
*/
template <typename InputIterator>
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
InputIterator entries,
const bool C_style_indexing = true);
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<3,T,true,2>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested two-
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<3,T,false,2>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j,
+ const size_type k) const;
/**
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j,
+ const size_type k);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4);
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4);
/**
* Access operator. Generate an object that accesses the requested three-
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<4,T,true,3>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested three-
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<4,T,false,3>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l) const;
/**
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5);
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5);
/**
* Access operator. Generate an object that accesses the requested four-
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<5,T,true,4>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested four-
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<5,T,false,4>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m) const;
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5,
- const unsigned int size6);
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5,
+ const size_type size6);
/**
* Access operator. Generate an object that accesses the requested five-
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<6,T,true,5>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested five-
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<6,T,false,5>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n) const;
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5,
- const unsigned int size6,
- const unsigned int size7);
+ Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5,
+ const size_type size6,
+ const size_type size7);
/**
* Access operator. Generate an object that accesses the requested six-
* This version of the function only allows read access.
*/
dealii::internal::TableBaseAccessors::Accessor<7,T,true,6>
- operator [] (const unsigned int i) const;
+ operator [] (const size_type i) const;
/**
* Access operator. Generate an object that accesses the requested six-
* This version of the function allows read-write access.
*/
dealii::internal::TableBaseAccessors::Accessor<7,T,false,6>
- operator [] (const unsigned int i);
+ operator [] (const size_type i);
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n,
- const unsigned int o) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n,
+ const size_type o) const;
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n,
- const unsigned int o);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n,
+ const size_type o);
/**
* Make the corresponding operator () from the TableBase base class
/**
* Constructor. Pass down the given dimensions to the base class.
*/
- TransposeTable (const unsigned int size1,
- const unsigned int size2);
+ TransposeTable (const size_type size1,
+ const size_type size2);
/**
* Reinitialize the object. This function is mostly here for compatibility
* with the earlier <tt>vector2d</tt> class. Passes down to the base class
* by converting the arguments to the data type requested by the base class.
*/
- void reinit (const unsigned int size1,
- const unsigned int size2,
+ void reinit (const size_type size1,
+ const size_type size2,
const bool omit_default_initialization = false);
/**
*
* This version of the function only allows read access.
*/
- typename AlignedVector<T>::const_reference operator () (const unsigned int i,
- const unsigned int j) const;
+ typename AlignedVector<T>::const_reference operator () (const size_type i,
+ const size_type j) const;
/**
* Direct access to one element of the table by specifying all indices at
*
* This version of the function allows read-write access.
*/
- typename AlignedVector<T>::reference operator () (const unsigned int i,
- const unsigned int j);
+ typename AlignedVector<T>::reference operator () (const size_type i,
+ const size_type j);
/**
* Number of rows. This function really makes only sense since we have a
* two-dimensional object here.
*/
- unsigned int n_rows () const;
+ size_type n_rows () const;
/**
* Number of columns. This function really makes only sense since we have a
* two-dimensional object here.
*/
- unsigned int n_cols () const;
+ size_type n_cols () const;
protected:
/**
* implementation of these table classes for 2d arrays, then called
* <tt>vector2d</tt>.
*/
- typename AlignedVector<T>::reference el (const unsigned int i,
- const unsigned int j);
+ typename AlignedVector<T>::reference el (const size_type i,
+ const size_type j);
/**
* Return the value of the element <tt>(i,j)</tt> as a read-only reference.
* implementation of these table classes for 2d arrays, then called
* <tt>vector2d</tt>.
*/
- typename AlignedVector<T>::const_reference el (const unsigned int i,
- const unsigned int j) const;
+ typename AlignedVector<T>::const_reference el (const size_type i,
+ const size_type j) const;
};
template <int N, typename T, bool C, unsigned int P>
inline
Accessor<N,T,C,P-1>
- Accessor<N,T,C,P>::operator [] (const unsigned int i) const
+ Accessor<N,T,C,P>::operator [] (const size_type i) const
{
Assert (i < table.size()[N-P],
ExcIndexRange (i, 0, table.size()[N-P]));
template <int N, typename T, bool C>
inline
typename Accessor<N,T,C,1>::reference
- Accessor<N,T,C,1>::operator [] (const unsigned int i) const
+ Accessor<N,T,C,1>::operator [] (const size_type i) const
{
- Assert (i < table.size()[N-1],
- ExcIndexRange (i, 0, table.size()[N-1]));
+ AssertIndexRange (i, table.size()[N-1]);
return *(data+i);
}
template <int N, typename T, bool C>
inline
- unsigned int
+ typename Accessor<N,T,C,1>::size_type
Accessor<N,T,C,1>::size () const
{
return table.size()[N-1];
template <int N, typename T>
inline
-unsigned int
+typename TableBase<N,T>::size_type
TableBase<N,T>::size (const unsigned int i) const
{
Assert (i<N, ExcIndexRange(i,0,N));
void fill_Fortran_style (InputIterator entries,
TableBase<1,T> &table)
{
- for (unsigned int i=0; i<table.size()[0]; ++i)
+ using size_type = typename TableBase<1,T>::size_type;
+ for (size_type i=0; i<table.size()[0]; ++i)
table(TableIndices<1>(i)) = *entries++;
}
void fill_Fortran_style (InputIterator entries,
TableBase<2,T> &table)
{
- for (unsigned int j=0; j<table.size()[1]; ++j)
- for (unsigned int i=0; i<table.size()[0]; ++i)
+ using size_type = typename TableBase<2,T>::size_type;
+ for (size_type j=0; j<table.size()[1]; ++j)
+ for (size_type i=0; i<table.size()[0]; ++i)
table(TableIndices<2>(i,j)) = *entries++;
}
void fill_Fortran_style (InputIterator entries,
TableBase<3,T> &table)
{
- for (unsigned int k=0; k<table.size()[2]; ++k)
- for (unsigned int j=0; j<table.size()[1]; ++j)
- for (unsigned int i=0; i<table.size()[0]; ++i)
+ using size_type = typename TableBase<3,T>::size_type;
+ for (size_type k=0; k<table.size()[2]; ++k)
+ for (size_type j=0; j<table.size()[1]; ++j)
+ for (size_type i=0; i<table.size()[0]; ++i)
table(TableIndices<3>(i,j,k)) = *entries++;
}
+ indices[2]);
default:
{
- size_type s = indices[0];
+ unsigned int s = indices[0];
for (unsigned int n=1; n<N; ++n)
s = s*table_size[n] + indices[n];
return s;
TableBase<N,T>::operator () (const TableIndices<N> &indices) const
{
for (unsigned int n=0; n<N; ++n)
- Assert (indices[n] < table_size[n],
- ExcIndexRange (indices[n], 0, table_size[n]));
+ AssertIndexRange (indices[n], table_size[n]);
return el(indices);
}
TableBase<N,T>::operator () (const TableIndices<N> &indices)
{
for (unsigned int n=0; n<N; ++n)
- Assert (indices[n] < table_size[n],
- ExcIndexRange (indices[n], 0, table_size[n]));
+ AssertIndexRange (indices[n], table_size[n]);
return el(indices);
}
typename AlignedVector<T>::reference
TableBase<N,T>::el (const TableIndices<N> &indices)
{
- Assert (position(indices) < values.size(),
- ExcIndexRange (position(indices), 0, values.size()));
+ AssertIndexRange (position(indices), values.size());
return values[position(indices)];
}
template <typename T>
inline
-Table<1,T>::Table (const unsigned int size)
+Table<1,T>::Table (const size_type size)
:
TableBase<1,T> (TableIndices<1> (size))
{}
template <typename T>
template <typename InputIterator>
inline
-Table<1,T>::Table (const unsigned int size,
+Table<1,T>::Table (const size_type size,
InputIterator entries,
const bool C_style_indexing)
:
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<1,T>::operator [] (const unsigned int i) const
+Table<1,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return this->values[i];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<1,T>::operator [] (const unsigned int i)
+Table<1,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return this->values[i];
}
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<1,T>::operator () (const unsigned int i) const
+Table<1,T>::operator () (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return this->values[i];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<1,T>::operator () (const unsigned int i)
+Table<1,T>::operator () (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return this->values[i];
}
template <typename T>
inline
-Table<2,T>::Table (const unsigned int size1,
- const unsigned int size2)
+Table<2,T>::Table (const size_type size1,
+ const size_type size2)
:
TableBase<2,T> (TableIndices<2> (size1, size2))
{}
template <typename T>
template <typename InputIterator>
inline
-Table<2,T>::Table (const unsigned int size1,
- const unsigned int size2,
+Table<2,T>::Table (const size_type size1,
+ const size_type size2,
InputIterator entries,
const bool C_style_indexing)
:
template <typename T>
inline
void
-Table<2,T>::reinit (const unsigned int size1,
- const unsigned int size2,
+Table<2,T>::reinit (const size_type size1,
+ const size_type size2,
const bool omit_default_initialization)
{
this->TableBase<2,T>::reinit (TableIndices<2> (size1, size2),omit_default_initialization);
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<2,T,true,1>
-Table<2,T>::operator [] (const unsigned int i) const
+Table<2,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return dealii::internal::TableBaseAccessors::Accessor<2,T,true,1>(*this,
this->values.begin()+size_type(i)*n_cols());
}
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<2,T,false,1>
-Table<2,T>::operator [] (const unsigned int i)
+Table<2,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
return dealii::internal::TableBaseAccessors::Accessor<2,T,false,1>(*this,
this->values.begin()+size_type(i)*n_cols());
}
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<2,T>::operator () (const unsigned int i,
- const unsigned int j) const
+Table<2,T>::operator () (const size_type i,
+ const size_type j) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
return this->values[size_type(i)*this->table_size[1]+j];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<2,T>::operator () (const unsigned int i,
- const unsigned int j)
+Table<2,T>::operator () (const size_type i,
+ const size_type j)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
return this->values[size_type(i)*this->table_size[1]+j];
}
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<2,T>::el (const unsigned int i,
- const unsigned int j) const
+Table<2,T>::el (const size_type i,
+ const size_type j) const
{
return this->values[size_type(i)*this->table_size[1]+j];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<2,T>::el (const unsigned int i,
- const unsigned int j)
+Table<2,T>::el (const size_type i,
+ const size_type j)
{
return this->values[size_type(i)*this->table_size[1]+j];
}
template <typename T>
inline
-unsigned int
+typename Table<2,T>::size_type
Table<2,T>::n_rows () const
{
return this->table_size[0];
template <typename T>
inline
-unsigned int
+typename Table<2,T>::size_type
Table<2,T>::n_cols () const
{
return this->table_size[1];
//---------------------------------------------------------------------------
template <typename T>
inline
-TransposeTable<T>::TransposeTable (const unsigned int size1,
- const unsigned int size2)
+TransposeTable<T>::TransposeTable (const size_type size1,
+ const size_type size2)
:
TableBase<2,T> (TableIndices<2> (size2, size1))
{}
template <typename T>
inline
void
-TransposeTable<T>::reinit (const unsigned int size1,
- const unsigned int size2,
- const bool omit_default_initialization)
+TransposeTable<T>::reinit (const size_type size1,
+ const size_type size2,
+ const bool omit_default_initialization)
{
this->TableBase<2,T>::reinit (TableIndices<2> (size2, size1), omit_default_initialization);
}
template <typename T>
inline
typename AlignedVector<T>::const_reference
-TransposeTable<T>::operator () (const unsigned int i,
- const unsigned int j) const
+TransposeTable<T>::operator () (const size_type i,
+ const size_type j) const
{
- Assert (i < this->table_size[1],
- ExcIndexRange (i, 0, this->table_size[1]));
- Assert (j < this->table_size[0],
- ExcIndexRange (j, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[1]);
+ AssertIndexRange (j, this->table_size[0]);
return this->values[size_type(j)*this->table_size[1]+i];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-TransposeTable<T>::operator () (const unsigned int i,
- const unsigned int j)
+TransposeTable<T>::operator () (const size_type i,
+ const size_type j)
{
- Assert (i < this->table_size[1],
- ExcIndexRange (i, 0, this->table_size[1]));
- Assert (j < this->table_size[0],
- ExcIndexRange (j, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[1]);
+ AssertIndexRange (j, this->table_size[0]);
return this->values[size_type(j)*this->table_size[1]+i];
}
template <typename T>
inline
typename AlignedVector<T>::const_reference
-TransposeTable<T>::el (const unsigned int i,
- const unsigned int j) const
+TransposeTable<T>::el (const size_type i,
+ const size_type j) const
{
return this->values[size_type(j)*this->table_size[1]+i];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-TransposeTable<T>::el (const unsigned int i,
- const unsigned int j)
+TransposeTable<T>::el (const size_type i,
+ const size_type j)
{
return this->values[size_type(j)*this->table_size[1]+i];
}
template <typename T>
inline
-unsigned int
+typename TransposeTable<T>::size_type
TransposeTable<T>::n_rows () const
{
return this->table_size[1];
template <typename T>
inline
-unsigned int
+typename TransposeTable<T>::size_type
TransposeTable<T>::n_cols () const
{
return this->table_size[0];
template <typename T>
inline
-Table<3,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3)
+Table<3,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3)
:
TableBase<3,T> (TableIndices<3> (size1, size2, size3))
{}
template <typename T>
template <typename InputIterator>
inline
-Table<3,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
+Table<3,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
InputIterator entries,
const bool C_style_indexing)
:
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<3,T,true,2>
-Table<3,T>::operator [] (const unsigned int i) const
+Table<3,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2];
return (dealii::internal::TableBaseAccessors::Accessor<3,T,true,2>
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<3,T,false,2>
-Table<3,T>::operator [] (const unsigned int i)
+Table<3,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2];
return (dealii::internal::TableBaseAccessors::Accessor<3,T,false,2>
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<3,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k) const
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
+Table<3,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k) const
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
return this->values[(size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k];
}
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<3,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k)
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
+Table<3,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k)
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
return this->values[(size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k];
}
template <typename T>
inline
-Table<4,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4)
+Table<4,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4)
:
TableBase<4,T> (TableIndices<4> (size1, size2, size3, size4))
{}
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<4,T,true,3>
-Table<4,T>::operator [] (const unsigned int i) const
+Table<4,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3];
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<4,T,false,3>
-Table<4,T>::operator [] (const unsigned int i)
+Table<4,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3];
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<4,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l) const
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
+Table<4,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l) const
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
return this->values[((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l];
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<4,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l)
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
+Table<4,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l)
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
return this->values[((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l];
template <typename T>
inline
-Table<5,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5)
+Table<5,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5)
:
TableBase<5,T> (TableIndices<5> (size1, size2, size3, size4, size5))
{}
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<5,T,true,4>
-Table<5,T>::operator [] (const unsigned int i) const
+Table<5,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<5,T,false,4>
-Table<5,T>::operator [] (const unsigned int i)
+Table<5,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<5,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m) const
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
+Table<5,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m) const
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
return this->values[(((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<5,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m)
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
+Table<5,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m)
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
return this->values[(((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
template <typename T>
inline
-Table<6,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5,
- const unsigned int size6)
+Table<6,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5,
+ const size_type size6)
:
TableBase<6,T> ()
{
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<6,T,true,5>
-Table<6,T>::operator [] (const unsigned int i) const
+Table<6,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<6,T,false,5>
-Table<6,T>::operator [] (const unsigned int i)
+Table<6,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<6,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n) const
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
- Assert (n < this->table_size[5],
- ExcIndexRange (n, 0, this->table_size[5]));
+Table<6,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n) const
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
+ AssertIndexRange (n, this->table_size[5]);
return this->values[((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<6,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n)
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
- Assert (n < this->table_size[5],
- ExcIndexRange (n, 0, this->table_size[5]));
+Table<6,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n)
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
+ AssertIndexRange (n, this->table_size[5]);
return this->values[((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
template <typename T>
inline
-Table<7,T>::Table (const unsigned int size1,
- const unsigned int size2,
- const unsigned int size3,
- const unsigned int size4,
- const unsigned int size5,
- const unsigned int size6,
- const unsigned int size7)
+Table<7,T>::Table (const size_type size1,
+ const size_type size2,
+ const size_type size3,
+ const size_type size4,
+ const size_type size5,
+ const size_type size6,
+ const size_type size7)
:
TableBase<7,T> ()
{
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<7,T,true,6>
-Table<7,T>::operator [] (const unsigned int i) const
+Table<7,T>::operator [] (const size_type i) const
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
dealii::internal::TableBaseAccessors::Accessor<7,T,false,6>
-Table<7,T>::operator [] (const unsigned int i)
+Table<7,T>::operator [] (const size_type i)
{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
+ AssertIndexRange (i, this->table_size[0]);
const size_type subobject_size = size_type(this->table_size[1]) *
this->table_size[2] *
this->table_size[3] *
template <typename T>
inline
typename AlignedVector<T>::const_reference
-Table<7,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n,
- const unsigned int o) const
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
- Assert (n < this->table_size[5],
- ExcIndexRange (n, 0, this->table_size[5]));
- Assert (o < this->table_size[6],
- ExcIndexRange (o, 0, this->table_size[6]));
+Table<7,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n,
+ const size_type o) const
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
+ AssertIndexRange (n, this->table_size[5]);
+ AssertIndexRange (o, this->table_size[6]);
return this->values[(((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
template <typename T>
inline
typename AlignedVector<T>::reference
-Table<7,T>::operator () (const unsigned int i,
- const unsigned int j,
- const unsigned int k,
- const unsigned int l,
- const unsigned int m,
- const unsigned int n,
- const unsigned int o)
-{
- Assert (i < this->table_size[0],
- ExcIndexRange (i, 0, this->table_size[0]));
- Assert (j < this->table_size[1],
- ExcIndexRange (j, 0, this->table_size[1]));
- Assert (k < this->table_size[2],
- ExcIndexRange (k, 0, this->table_size[2]));
- Assert (l < this->table_size[3],
- ExcIndexRange (l, 0, this->table_size[3]));
- Assert (m < this->table_size[4],
- ExcIndexRange (m, 0, this->table_size[4]));
- Assert (n < this->table_size[5],
- ExcIndexRange (n, 0, this->table_size[5]));
- Assert (o < this->table_size[5],
- ExcIndexRange (o, 0, this->table_size[6]));
+Table<7,T>::operator () (const size_type i,
+ const size_type j,
+ const size_type k,
+ const size_type l,
+ const size_type m,
+ const size_type n,
+ const size_type o)
+{
+ AssertIndexRange (i, this->table_size[0]);
+ AssertIndexRange (j, this->table_size[1]);
+ AssertIndexRange (k, this->table_size[2]);
+ AssertIndexRange (l, this->table_size[3]);
+ AssertIndexRange (m, this->table_size[4]);
+ AssertIndexRange (n, this->table_size[5]);
+ AssertIndexRange (o, this->table_size[6]);
return this->values[(((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)