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()());
133 const int &device =
Device.cpu,
const unsigned int &seed = std::random_device()(),
134 const unsigned int &dtype =
Type.Double);
148 Tensor normal(
const std::vector<cytnx_uint64> &Nelem,
const double &mean,
const double &std,
149 const int &device =
Device.cpu,
const unsigned int &seed = std::random_device()(),
150 const unsigned int &dtype =
Type.Double);
168 const int &device =
Device.cpu,
169 const unsigned int &seed = std::random_device()(),
170 const unsigned int &dtype =
Type.Double);
185 Tensor uniform(
const std::vector<cytnx_uint64> &Nelem,
const double &low,
const double &high,
186 const int &device =
Device.cpu,
187 const unsigned int &seed = std::random_device()(),
188 const unsigned int &dtype =
Type.Double);
an memeory storage with multi-type/multi-device support
Definition Storage.hpp:1051
an tensor (multi-dimensional array)
Definition Tensor.hpp:345
An Enhanced tensor specifically designed for physical Tensor network simulation.
Definition UniTensor.hpp:1705
Tensor normal(const cytnx_uint64 &Nelem, const double &mean, const double &std, const int &device=Device.cpu, const unsigned int &seed=std::random_device()(), const unsigned int &dtype=Type.Double)
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()(), const unsigned int &dtype=Type.Double)
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.
uint64_t cytnx_uint64
Definition Type.hpp:45