Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFlat2DMatrixOperators.hxx
Go to the documentation of this file.
1// Author: Martin Føll, University of Oslo (UiO) & CERN 1/2026
2
3/*************************************************************************
4 * Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_INTERNAL_ML_RFLAT2DMATRIXOPERATORS
12#define ROOT_INTERNAL_ML_RFLAT2DMATRIXOPERATORS
13
14#include <vector>
15
16// Forward decl
18struct RFlat2DMatrix;
19} // namespace ROOT::Experimental::Internal::ML
20
22/**
23\class ROOT::Experimental::Internal::ML::RFlat2DMatrixOperators
24
25\brief Collection of operations applied to one or multiple flat 2D matrices.
26*/
27
29private:
31 std::size_t fSetSeed;
32
33public:
34 RFlat2DMatrixOperators(bool shuffle = true, const std::size_t setSeed = 0) : fShuffle(shuffle), fSetSeed(setSeed) {}
35
37
39
40 void
41 SliceTensor(RFlat2DMatrix &SlicedTensor, RFlat2DMatrix &Tensor, const std::vector<std::vector<std::size_t>> &slice);
42
43 void ConcatenateTensors(RFlat2DMatrix &ConcatTensor, const std::vector<RFlat2DMatrix> &Tensors);
44};
45
46} // namespace ROOT::Experimental::Internal::ML
47#endif // ROOT_INTERNAL_ML_RFLAT2DMATRIXOPERATORS
Collection of operations applied to one or multiple flat 2D matrices.
void SliceTensor(RFlat2DMatrix &SlicedTensor, RFlat2DMatrix &Tensor, const std::vector< std::vector< std::size_t > > &slice)
RFlat2DMatrixOperators(bool shuffle=true, const std::size_t setSeed=0)
void ConcatenateTensors(RFlat2DMatrix &ConcatTensor, const std::vector< RFlat2DMatrix > &Tensors)
void ShuffleTensor(RFlat2DMatrix &ShuffledTensor, RFlat2DMatrix &Tensor)
Wrapper around ROOT::RVec<float> representing a 2D matrix.