20 std::vector<std::size_t>
indices(rows);
35 std::random_device rd;
48 const std::vector<std::size_t> &permutation, std::size_t begin, std::size_t end)
54 const std::size_t cols = Tensor.
GetCols();
56 auto &values = Dest.
fRVec;
59 const std::size_t
offset = values.size();
60 values.resize(
offset + (end - begin) * cols);
61 float *out = values.data() +
offset;
63 if (permutation.empty()) {
64 std::copy(
data + begin * cols,
data + end * cols, out);
66 for (std::size_t i = begin; i < end; i++) {
67 out = std::copy_n(
data + permutation[i] * cols, cols, out);
71 Dest.
Reshape(values.size() / cols, cols);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
void ShuffleIndices(std::vector< std::size_t > &indices)
~RFlat2DMatrixOperators()
std::vector< std::size_t > MakePermutation(std::size_t rows)
static void AppendRows(RFlat2DMatrix &Dest, const RFlat2DMatrix &Tensor, const std::vector< std::size_t > &permutation, std::size_t begin, std::size_t end)
Wrapper around ROOT::RVec<float> representing a 2D matrix.
void Reshape(std::size_t rows, std::size_t cols)
std::size_t GetCols() const