Ejemplo n.º 1
0
def R_solve(R, b):
    """
    returns x
    
    This function solves the triangular system R x = b for the N-by-N
    matrix R.
    """
    x = zeros(R.shape[1], get_typecode(R))
    _gslwrap.gsl_linalg_QR_QRsolve(R, b, x)
    return x
Ejemplo n.º 2
0
def R_solve(R, b):
    """
    returns x
    
    This function solves the triangular system R x = b for the N-by-N
    matrix R.
    """
    x = zeros(R.shape[1], get_typecode(R))
    _gslwrap.gsl_linalg_QR_QRsolve(R, b, x)
    return x
Ejemplo n.º 3
0
def QR_QRsolve(Q, R, b):
    """
    returns x
    
    This function solves the system R x = Q^T b for x. It can be used when
    the QR decomposition of a matrix is available in unpacked form as (Q,R).
    """
    x = zeros(R.shape[1], get_typecode(R))
    _gslwrap.gsl_linalg_QR_QRsolve(Q, R, b, x)
    return x
Ejemplo n.º 4
0
def QR_QRsolve(Q, R, b):
    """
    returns x
    
    This function solves the system R x = Q^T b for x. It can be used when
    the QR decomposition of a matrix is available in unpacked form as (Q,R).
    """
    x = zeros(R.shape[1], get_typecode(R))
    _gslwrap.gsl_linalg_QR_QRsolve(Q, R, b, x)
    return x