PLASMA  2.8.0
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
void CORE_dpltmg_fiedler ( int  M,
int  N,
const double *  X,
int  incX,
const double *  Y,
int  incY,
double *  A,
int  LDA 
)

CORE_dpltmg_fiedler is a kernel used in fiedler matrix generation

See http://www.mathworks.fr/fr/help/matlab/ref/gallery.html#f84-999960

Fiedler matrix of size n-by-n is defined throug a random vector c of size n, such that each element is equal to abs(n(i)-n(j)).

Matrix A has a dominant positive eigenvalue and all the other eigenvalues are negative.

Explicit formulas for inv(A) and det(A) are given in [Todd, J., Basic Numerical Mathematics, Vol. 2: Numerical Algebra, Birkhauser, Basel, and Academic Press, New York, 1977, p. 159] and attributed to Fiedler. These indicate that inv(A) is tridiagonal except for nonzero (1,n) and (n,1) elements.

Parameters
[in]MThe number of rows of the tile A to initialize. M >= 0.
[in]NThe number of columns of the tile A to initialize. N >= 0.
[in]XX is a vector of dimension at least: ( 1 + ( M - 1 )*abs( incX ) ) On entry, the vector used to initialize A.
[in]incXOn entry, incX specifies the increment for the elements of X. incX != 0.
[in]YY is a vector of dimension at least: ( 1 + ( N - 1 )*abs( incY ) ) On entry, the vector used to initialize A.
[in]incYOn entry, incY specifies the increment for the elements of Y. incY != 0.
[out]AOn entry, the M-by-N tile to be initialized. On exit, each element of A is defined by: A(i,j) = abs( X(i) - Y(j) )
[in]LDAThe leading dimension of the tile A. LDA >= max(1,M).