MCPcopy Create free account
hub / github.com/alicevision/AliceVision / createRandomArrayOfIntegers

Function createRandomArrayOfIntegers

src/aliceVision/mvsUtils/common.cpp:697–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697std::vector<int> createRandomArrayOfIntegers(const int size, const unsigned int seed)
698{
699 std::mt19937 generator(seed != 0 ? seed : std::random_device{}());
700
701 std::vector<int> v(size);
702 std::iota(v.begin(), v.end(), 0);
703
704 std::shuffle(v.begin(), v.end(), generator);
705
706 return v;
707}
708
709
710std::string num2str(int num)

Callers 2

fillGraphMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected