There are many ways to convert between compression formats in IVSparse. This page will show you how to convert between the different formats.
For the three conversion formats supported by IVSparse (CSC, VCSC, and IVCSC) its simple to convert between each of these. There isn't in place conversion but you can easily create a new matrix for the desired format and pass in the old matrix to the constructor or use a method call. Here are some examples:
The toCSC()
method is exlusive to the non-CSC compression formats as each compression format has two methods for converting to the other two compression formats. This is demonstrated below:
toVCSC()
and toIVCSC()
toCSC()
and toIVCSC()
toCSC()
and toVCSC()
The other conversion supported by IVSparse is to convert an IVSparse Matrix to an Eigen Sparse Matrix. This is also very simple to do. Here are some examples: