Shark-ML

The Shark-ML framework has special adaptor functions that create wrappers for C++ arrays. These functions create objects that behave as regular Shark-ML matrices. To wrap a C++ container with adaptor functions, we have to pass a pointer to the data and corresponding dimensions as arguments, as illustrated in the following code snippet:

std::vector<float> data{1, 2, 3, 4};
auto m = remora::dense_matrix_adaptor<float>(data.data(), 2, 2);
auto v = remora::dense_vector_adaptor<float>(data.data(), 4);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.251.206