Sync public subset from Flux
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
|
||||
#include "./utils/random.h"
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
@@ -38,6 +38,24 @@ public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void random(const uint64_t size, const T& lower, const T& higher){
|
||||
|
||||
v.resize(size, T{0});
|
||||
|
||||
// Copy data row by row
|
||||
for (uint64_t i = 0; i < size; ++i) {
|
||||
v[i] = utils::random(lower, higher);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//##########################################################
|
||||
//# VECTOR: --- basic properties --- #
|
||||
//##########################################################
|
||||
|
||||
Reference in New Issue
Block a user