Cython module: linalg_c

The functions in this module are called by the BQ object, and in most cases shouldn’t need to be called directly by user code. However, they are provided here for reference.

bayesian_quadrature.linalg_c.cho_factor(__Pyx_memviewslice C, __Pyx_memviewslice L) → int

Compute the Cholesky factorization of matrix \(C\) and store the result in \(L\). The lower part will contain the factorization; upper values could be anything.

Parameters :

C : float64_t[::1, :]

\(n\times n\) input matrix

L : float64_t[::1, :]

\(n\times n\) output matrix

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.cho_solve_mat(__Pyx_memviewslice L, __Pyx_memviewslice B, __Pyx_memviewslice X) → int

Solve the equation \(AX=B\), where \(A\), \(X\), and \(B\) are matrices.

Parameters :

L : float64_t[::1, :]

\(n\times n\) lower-triangular Cholesky factor of \(A\)

B : float64_t[::1, :]

\(n\times n\) input matrix

X : float64_t[::1, :]

\(n\times n\) output matrix

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.cho_solve_vec(__Pyx_memviewslice L, __Pyx_memviewslice b, __Pyx_memviewslice x) → int

Solve the equation \(Ax=b\), where \(A\) is a matrix and \(x\) and \(b\) are vectors.

Parameters :

L : float64_t[::1, :]

\(n\times n\) lower-triangular Cholesky factor of \(A\)

b : float64_t[::1]

\(n\) input vector

x : float64_t[::1]

\(n\) output vector

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.dot11(__Pyx_memviewslice x, __Pyx_memviewslice y) → float64_t

Compute the dot product between vectors \(x\) and \(y\).

Parameters :

x : float64_t[::1]

\(n\) left-side vector

y : float64_t[::1]

\(n\) right-side vector

Returns :

out : dot product

bayesian_quadrature.linalg_c.dot12(__Pyx_memviewslice x, __Pyx_memviewslice Y, __Pyx_memviewslice xY) → int

Compute the dot product between a vector \(x\) and a matrix \(Y\).

Parameters :

x : float64_t[::1]

\(n\) left-side vector

Y : float64_t[::1, :]

\(n\times p\) right-side matrix

xY : float64_t[::1]

\(p\) output vector

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.dot21(__Pyx_memviewslice X, __Pyx_memviewslice y, __Pyx_memviewslice Xy) → int

Compute the dot product between a matrix \(X\) and a vector \(y\).

Parameters :

X : float64_t[::1, :]

\(m\times n\) left-side matrix

y : float64_t[::1]

\(n\) right-side vector

xY : float64_t[::1]

\(m\) output vector

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.dot22(__Pyx_memviewslice X, __Pyx_memviewslice Y, __Pyx_memviewslice XY) → int

Compute the dot product between a matrix \(X\) and a vector \(y\).

Parameters :

X : float64_t[::1, :]

\(m\times n\) left-side matrix

Y : float64_t[::1, :]

\(n\times p\) right-side matrix

XY : float64_t[::1, :]

\(m\times p\) output matrix

Returns :

out : 0 on success, -1 on failure

bayesian_quadrature.linalg_c.logdet(__Pyx_memviewslice L) → float64_t

Compute the log determinant of a matrix \(A\) from its lower-triangular Cholesky factor \(L\).

Parameters :

L : float64_t[::1, :]

\(n\times n\) lower-triangular Cholesky factor of \(A\)

Returns :

out : log-determinant

bayesian_quadrature.linalg_c.vecdiff(__Pyx_memviewslice x, __Pyx_memviewslice y) → float64_t

Compute the Euclidean distance between two vectors \(x\) and \(y\).

Parameters :

x : float64_t[::1]

\(n\) left-side vector

y : float64_t[::1]

\(n\) right-side vector

Returns :

out : Euclidean distance, \(\sqrt{\sum_i x_i^2 + y_i^2}\)

Previous topic

Cython module: gauss_c

Next topic

Cython module: util_c

This Page