12void vo005_Combinations()
31 std::cout <<
"Combinations of " <<
v1 <<
" and " <<
v2 <<
":" << std::endl;
32 for(
size_t i=0; i<
v3.size(); i++) {
33 std::cout <<
c1[i] <<
" * " <<
c2[i] <<
" = " <<
v3[i] << std::endl;
35 std::cout << std::endl;
46 auto c4 =
Take(
v4, idx2[1]);
47 auto c5 =
Take(
v4, idx2[2]);
49 auto v5 =
c3 * c4 * c5;
51 std::cout <<
"Unique triples of " <<
v4 <<
":" << std::endl;
52 for(
size_t i=0; i<
v4.size(); i++) {
53 std::cout <<
c3[i] <<
" * " << c4[i] <<
" * " << c5[i] <<
" = " << v5[i] << std::endl;
55 std::cout << std::endl;
RVec< T > Take(const RVec< T > &v, const RVec< typename RVec< T >::size_type > &i)
Return elements of a vector at given indices.
RVec< RVec< std::size_t > > Combinations(const std::size_t size1, const std::size_t size2)
Return the indices that represent all combinations of the elements of two RVecs.
ROOT::VecOps::RVec< double > RVecD