Bernoulli

A Bernoulli matrix with parameter \(0 < p < 1\) is a matrix which is equal to \(0\) with probability \(1-p\) and \(1\) with probability \(p\).

C++ API

void Bernoulli(Matrix<T> &A, Int m, Int n, double p = 0.5)
void Bernoulli(AbstractDistMatrix<T> &A, Int m, Int n, double p = 0.5)

C API

ElError ElBernoulli_i(ElMatrix_i A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulli_s(ElMatrix_s A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulli_d(ElMatrix_d A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulli_c(ElMatrix_c A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulli_z(ElMatrix_z A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulliDist_i(ElDistMatrix_i A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulliDist_s(ElDistMatrix_s A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulliDist_d(ElDistMatrix_d A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulliDist_c(ElDistMatrix_c A, ElInt m, ElInt n, double p=0.5)
ElError ElBernoulliDist_z(ElDistMatrix_z A, ElInt m, ElInt n, double p=0.5)

Python API

Bernoulli(A, m, n[, p=0.5])