0

I'm starting to use uBLAS for my sparse matrices. For static allocation, I do the following:

compressed_matrix<double> m (10,10,10);

However, I need dynamic allocation. Here, they suggest the following for dynamic allocation of uBLAS matrices:

matrix<double> m;
m.resize(10,10);

But that doesn't seem to work for sparse matrices. Any ideas how to dynamically allocate sparse matrices? Thanks in advance!

Lisa
  • 3,365
  • 3
  • 19
  • 30

1 Answers1

0

The memory seems to be allocated dynamically anyway, so I can just do:

int n;
n = 10;

compressed_matrix<double> m (n,n,n);
Lisa
  • 3,365
  • 3
  • 19
  • 30