10#include <initializer_list>
34 const unsigned int &seed = std::random_device()());
50 const unsigned int &seed = std::random_device()());
66 const unsigned int &seed = std::random_device()());
83 const unsigned int &seed = std::random_device()());
99 const unsigned int &seed = std::random_device()());
115 const unsigned int &seed = std::random_device()());
131 const int &device =
Device.cpu,
132 const unsigned int &seed = std::random_device()());
145 Tensor normal(
const std::vector<cytnx_uint64> &Nelem,
const double &mean,
const double &std,
146 const int &device =
Device.cpu,
147 const unsigned int &seed = std::random_device()());
164 const int &device =
Device.cpu,
165 const unsigned int &seed = std::random_device()());
179 Tensor uniform(
const std::vector<cytnx_uint64> &Nelem,
const double &low,
const double &high,
180 const int &device =
Device.cpu,
181 const unsigned int &seed = std::random_device()());
an memeory storage with multi-type/multi-device support
Definition Storage.hpp:1039
an tensor (multi-dimensional array)
Definition Tensor.hpp:345
An Enhanced tensor specifically designed for physical Tensor network simulation.
Definition UniTensor.hpp:2449
Tensor normal(const cytnx_uint64 &Nelem, const double &mean, const double &std, const int &device=Device.cpu, const unsigned int &seed=std::random_device()())
create an Tensor with all the elements are initialized with normal distribution
Tensor uniform(const cytnx_uint64 &Nelem, const double &low, const double &high, const int &device=Device.cpu, const unsigned int &seed=std::random_device()())
create an Tensor with all the elements are initialized with uniform distribution
void Make_uniform(Storage &Sin, const double &low=0, const double &high=1, const unsigned int &seed=std::random_device()())
Randomize the memory of a Storage with uniform distributon.
void Make_normal(Storage &Sin, const double &mean, const double &std, const unsigned int &seed=std::random_device()())
Randomize the memory of a Storage with normal distributon.
Definition Accessor.hpp:12
Device_class Device
data on which devices.
Definition Device.cpp:140
uint64_t cytnx_uint64
Definition Type.hpp:45