The size you initialize it with has nothing to do with the type. Therefore:
// this makes things easier!
typedef boost::numeric::ublas::matrix<double> matrix_type;
// this is the type (no initialization)
matrix_type arrayM[arraySize];
The problem comes with initializing the array. You can't do this:
TheClass::TheClass() :
arrayM(1, 3) // nope
{}
Instead, you have to let them default-construct, then resize them all:
TheClass::TheClass()
{
std::fill(arrayM, arrayM + arraySize, matrix_type(1, 3));
}
Since you're using boost, consider using boost::array
, since it gives a nicer syntax:
typedef boost::numeric::ublas::matrix<double> matrix_type;
typedef boost::array<matrix_type, arraySize> matrix_array;
matrix_array arrayM; // ah
TheClass::TheClass()
{
arrayM.assign(matrix_type(1, 3));
}