I want to use a quadruple pointer to represent a matrix split up into blocks. I think this could be a bad idea. It would look something like this:
double ****A=malloc(NBlocks*sizeof(double***));
for(i=0;i<NBlocks;i++)
{
A[i]=malloc(NBlocks*sizeof(double**));
for(j=0;j<NBlocks;j++)
{
A[i][j]=malloc(Blocksize*sizeof(double*));
for(k=0;k<Blocksize;k++)
{
A[i][j][k]=malloc(Blocksize*sizeof(double));
}
}
}
Is this a good way to go about this?
Note I assume a square matrix and I make the blocks square.