Cauchy

An \(m \times n\) matrix \(A\) is called Cauchy if there exist vectors \(x\) and \(y\) such that

\[A(i,j) = \frac{1}{x(i) - y(j)}.\]

The following functions generate a Cauchy matrix using the defining vectors, \(x\) and \(y\).

C++ API

void Cauchy(Matrix<F> &A, const std::vector<F> &x, const std::vector<F> &y)
void Cauchy(AbstractDistMatrix<F> &A, const std::vector<F> &x, const std::vector<F> &y)

C API

ElError ElCauchy_s(ElMatrix_s A, ElInt xSize, float* xBuf, ElInt ySize, float* yBuf)
ElError ElCauchy_d(ElMatrix_d A, ElInt xSize, double* xBuf, ElInt ySize, double* yBuf)
ElError ElCauchy_c(ElMatrix_c A, ElInt xSize, complex_float* xBuf, ElInt ySize, complex_float* yBuf)
ElError ElCauchy_z(ElMatrix_z A, ElInt xSize, complex_double* xBuf, ElInt ySize, complex_double* yBuf)
ElError ElCauchyDist_s(ElDistMatrix_s A, ElInt xSize, float* xBuf, ElInt ySize, float* yBuf)
ElError ElCauchyDist_d(ElDistMatrix_d A, ElInt xSize, double* xBuf, ElInt ySize, double* yBuf)
ElError ElCauchyDist_c(ElDistMatrix_c A, ElInt xSize, complex_float* xBuf, ElInt ySize, complex_float* yBuf)
ElError ElCauchyDist_z(ElDistMatrix_z A, ElInt xSize, complex_double* xBuf, ElInt ySize, complex_double* yBuf)

Python API

Cauchy(A, x, y)