10#include <initializer_list>
32 void Make_normal(
Storage &Sin,
const double &mean,
const double &std,
const unsigned int &seed=std::random_device()());
49 void Make_uniform(
Storage &Sin,
const double &low=0,
const double &high=1,
const unsigned int &seed=std::random_device()());
67 void Make_normal(
Tensor &Tin,
const double &mean,
const double &std,
const unsigned int &seed=std::random_device()());
84 void Make_uniform(
Tensor &Tin,
const double &low=0,
const double &high=1,
const unsigned int &seed=std::random_device()());
103 void Make_normal(
UniTensor &Tin,
const double &mean,
const double &std,
const unsigned int &seed=std::random_device()());
120 void Make_uniform(
UniTensor &Tin,
const double &low=0,
const double &high=1,
const unsigned int &seed=std::random_device()());
154 Tensor normal(
const std::vector<cytnx_uint64> &Nelem,
const double &mean,
const double &std,
const int &device=
Device.cpu,
const unsigned int &seed=std::random_device()());
185 Tensor uniform(
const std::vector<cytnx_uint64> &Nelem,
const double &low,
const double &high,
const int &device=
Device.cpu,
const unsigned int &seed=std::random_device()());
an memeory storage with multi-type/multi-device support
Definition Storage.hpp:934
an tensor (multi-dimensional array)
Definition Tensor.hpp:344
An Enhanced tensor specifically designed for physical Tensor network simulation.
Definition UniTensor.hpp:1122
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
Definition Device.cpp:105
uint64_t cytnx_uint64
Definition Type.hpp:22