typedef typename Types<N,T,C>::iterator iterator;
typedef typename Types<N,T,C>::const_iterator const_iterator;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
private:
/**
* Constructor. Take a pointer to the table object to know about the
class TableBase : public Subscriptor
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename AlignedVector<T>::size_type size_type;
+
+
/**
* Default constructor. Set all dimensions to zero.
*/
* Return the number of elements stored in this object, which is the product
* of the extensions in each dimension.
*/
- unsigned int n_elements () const;
+ size_type n_elements () const;
/**
* Return whether the object is empty, i.e. one of the directions is zero.
* Return the position of the indicated element within the array of elements
* stored one after the other. This function does no index checking.
*/
- typename AlignedVector<T>::size_type position (const TableIndices<N> &indices) const;
+ size_type position (const TableIndices<N> &indices) const;
/**
* Return a read-write reference to the indicated element.
class Table<1,T> : public TableBase<1,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<1,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<2,T> : public TableBase<2,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<2,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<3,T> : public TableBase<3,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<3,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<4,T> : public TableBase<4,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<4,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<5,T> : public TableBase<5,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<5,T>::size_type size_type;
+
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<6,T> : public TableBase<6,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<6,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class Table<7,T> : public TableBase<7,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<7,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
class TransposeTable : public TableBase<2,T>
{
public:
+ /**
+ * Integer type used to count the number of elements in this container.
+ */
+ typedef typename TableBase<2,T>::size_type size_type;
+
/**
* Default constructor. Set all dimensions to zero.
*/
// note: P>1, otherwise the
// specialization would have
// been taken!
- unsigned int subobject_size = table.size()[N-1];
+ size_type subobject_size = table.size()[N-1];
for (int p=P-1; p>1; --p)
subobject_size *= table.size()[N-p];
const iterator new_data = data + i*subobject_size;
{
table_size = new_sizes;
- const unsigned int new_size = n_elements();
+ const size_type new_size = n_elements();
// if zero size was given: free all memory
if (new_size == 0)
template <int N, typename T>
inline
-unsigned int
+typename TableBase<N,T>::size_type
TableBase<N,T>::n_elements () const
{
- unsigned int s = 1;
+ size_type s = 1;
for (unsigned int n=0; n<N; ++n)
s *= table_size[n];
return s;
template <int N, typename T>
inline
-typename AlignedVector<T>::size_type
+typename TableBase<N,T>::size_type
TableBase<N,T>::position (const TableIndices<N> &indices) const
{
- typedef typename AlignedVector<T>::size_type size_type;
-
// specialize this for the
// different numbers of dimensions,
// to make the job somewhat easier
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
return dealii::internal::TableBaseAccessors::Accessor<2,T,true,1>(*this,
- this->values.begin()+i*n_cols());
+ this->values.begin()+size_type(i)*n_cols());
}
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
return dealii::internal::TableBaseAccessors::Accessor<2,T,false,1>(*this,
- this->values.begin()+i*n_cols());
+ this->values.begin()+size_type(i)*n_cols());
}
ExcIndexRange (i, 0, this->table_size[0]));
Assert (j < this->table_size[1],
ExcIndexRange (j, 0, this->table_size[1]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(i)*this->table_size[1]+j];
}
ExcIndexRange (i, 0, this->table_size[0]));
Assert (j < this->table_size[1],
ExcIndexRange (j, 0, this->table_size[1]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(i)*this->table_size[1]+j];
}
Table<2,T>::el (const unsigned int i,
const unsigned int j) const
{
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(i)*this->table_size[1]+j];
}
Table<2,T>::el (const unsigned int i,
const unsigned int j)
{
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(i)*this->table_size[1]+j];
}
ExcIndexRange (i, 0, this->table_size[1]));
Assert (j < this->table_size[0],
ExcIndexRange (j, 0, this->table_size[0]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(j)*this->table_size[1]+i];
}
ExcIndexRange (i, 0, this->table_size[1]));
Assert (j < this->table_size[0],
ExcIndexRange (j, 0, this->table_size[0]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(j)*this->table_size[1]+i];
}
TransposeTable<T>::el (const unsigned int i,
const unsigned int j) const
{
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(j)*this->table_size[1]+i];
}
TransposeTable<T>::el (const unsigned int i,
const unsigned int j)
{
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[size_type(j)*this->table_size[1]+i];
}
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2];
return (dealii::internal::TableBaseAccessors::Accessor<3,T,true,2>
(*this,
this->values.begin() + i*subobject_size));
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2];
return (dealii::internal::TableBaseAccessors::Accessor<3,T,false,2>
(*this,
this->values.begin() + i*subobject_size));
ExcIndexRange (j, 0, this->table_size[1]));
Assert (k < this->table_size[2],
ExcIndexRange (k, 0, this->table_size[2]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k];
}
ExcIndexRange (j, 0, this->table_size[1]));
Assert (k < this->table_size[2],
ExcIndexRange (k, 0, this->table_size[2]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k];
}
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3];
return (dealii::internal::TableBaseAccessors::Accessor<4,T,true,3>
(*this,
this->values.begin() + i*subobject_size));
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3];
return (dealii::internal::TableBaseAccessors::Accessor<4,T,false,3>
(*this,
this->values.begin() + i*subobject_size));
ExcIndexRange (k, 0, this->table_size[2]));
Assert (l < this->table_size[3],
ExcIndexRange (l, 0, this->table_size[3]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l];
ExcIndexRange (k, 0, this->table_size[2]));
Assert (l < this->table_size[3],
ExcIndexRange (l, 0, this->table_size[3]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l];
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4];
return (dealii::internal::TableBaseAccessors::Accessor<5,T,true,4>
(*this,
this->values.begin() + i*subobject_size));
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4];
return (dealii::internal::TableBaseAccessors::Accessor<5,T,false,4>
(*this,
this->values.begin() + i*subobject_size));
ExcIndexRange (l, 0, this->table_size[3]));
Assert (m < this->table_size[4],
ExcIndexRange (m, 0, this->table_size[4]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
ExcIndexRange (l, 0, this->table_size[3]));
Assert (m < this->table_size[4],
ExcIndexRange (m, 0, this->table_size[4]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4] *
- this->table_size[5];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4] *
+ this->table_size[5];
return (dealii::internal::TableBaseAccessors::Accessor<6,T,true,5>
(*this,
this->values.begin() + i*subobject_size));
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4] *
- this->table_size[5];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4] *
+ this->table_size[5];
return (dealii::internal::TableBaseAccessors::Accessor<6,T,false,5>
(*this,
this->values.begin() + i*subobject_size));
ExcIndexRange (m, 0, this->table_size[4]));
Assert (n < this->table_size[5],
ExcIndexRange (n, 0, this->table_size[5]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
ExcIndexRange (m, 0, this->table_size[4]));
Assert (n < this->table_size[5],
ExcIndexRange (n, 0, this->table_size[5]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4] *
- this->table_size[5] *
- this->table_size[6];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4] *
+ this->table_size[5] *
+ this->table_size[6];
return (dealii::internal::TableBaseAccessors::Accessor<7,T,true,6>
(*this,
this->values.begin() + i*subobject_size));
{
Assert (i < this->table_size[0],
ExcIndexRange (i, 0, this->table_size[0]));
- const unsigned int subobject_size = this->table_size[1] *
- this->table_size[2] *
- this->table_size[3] *
- this->table_size[4] *
- this->table_size[5] *
- this->table_size[6];
+ const size_type subobject_size = size_type(this->table_size[1]) *
+ this->table_size[2] *
+ this->table_size[3] *
+ this->table_size[4] *
+ this->table_size[5] *
+ this->table_size[6];
return (dealii::internal::TableBaseAccessors::Accessor<7,T,false,6>
(*this,
this->values.begin() + i*subobject_size));
ExcIndexRange (n, 0, this->table_size[5]));
Assert (o < this->table_size[6],
ExcIndexRange (o, 0, this->table_size[6]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)
ExcIndexRange (n, 0, this->table_size[5]));
Assert (o < this->table_size[5],
ExcIndexRange (o, 0, this->table_size[6]));
-
- typedef typename AlignedVector<T>::size_type size_type;
return this->values[(((((size_type(i)*this->table_size[1]+j)
*this->table_size[2] + k)
*this->table_size[3] + l)