What operations do you need to do with such tensors? You can implement the simplest way to store the sparse tensor - by storing the coordinates of the non-zero values + values itself. Then implement tensor operations for such a storage format.
If density of non-zeros is very low (as you say), then this simple data structure will be efficient and simple. On Wed, Sep 27, 2023 at 9:21 PM Janek Kozicki (yade) < [email protected]> wrote: > Hi, > > in my incoming work on implementing Loop Quantum Gravity I will need > a 15-dimensional sparse matrix (or tensor) to store the quantum > gravity data in a 15-dimensional basis. The data is very sparse, most > of it are zeros. But if I tried to use a regular vector<vector<....>> 15 > times > I will quickly run out of memory. > > > So, does libeigen offer such data type? > > best regards > Janek Kozicki > > -- > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof. > Gdansk University of Technology (Gdansk Tech) > Faculty of Applied Physics and Mathematics > Institute of Physics and Applied Computer Science > Division of Theoretical Physics and Quantum Information > -- > http://yade-dem.org/ > http://pg.edu.pl/p/jan-kozicki-19725 > http://mostwiedzy.pl/en/jan-kozicki,19725-1 > > >
