tick icon indicating copy to clipboard operation
tick copied to clipboard

Random Sparse2dArrays

Open andro2157 opened this issue 5 years ago • 1 comments

  • Initialize Array2d with std::initializer_list using std::vector

Example :

ArrayULong2d array({
  {0,1,0},
  {1,0,1}
});

array = {
  {1,2,3,4}, {5,6,7,8}
};
  • Convert an Array2d into a SSparseArray2dPtr

andro2157 avatar Jun 20 '19 14:06 andro2157

The following is now possible

  auto random_sparse = SparseArray2d<double>::RANDOM(100, 100, .33);
  auto dense = random_sparse->as_array2d();
  auto sparse = dense.as_sparsearray2d();

PhilipDeegan avatar Jul 06 '19 13:07 PhilipDeegan