GOQuadMatrix: GOffice Reference Manual

## GOQuadMatrix GOQuadMatrix |

## Functions

gboolean | go_quad_matrix_back_solve ()
gboolean | go_quad_matrix_back_solvel ()
gboolean | go_quad_matrix_back_solveD ()
void | go_quad_matrix_copy ()
void | go_quad_matrix_copyl ()
void | go_quad_matrix_copyD ()
void | go_quad_matrix_determinant ()
void | go_quad_matrix_determinantl ()
void | go_quad_matrix_determinantD ()
void | go_quad_matrix_dump ()
void | go_quad_matrix_dumpl ()
void | go_quad_matrix_dumpD ()
GOQuadMatrix * | go_quad_matrix_dup ()
GOQuadMatrixl * | go_quad_matrix_dupl ()
GOQuadMatrixD * | go_quad_matrix_dupD ()
void | go_quad_matrix_eigen_range ()
void | go_quad_matrix_eigen_rangel ()
void | go_quad_matrix_eigen_rangeD ()
void | go_quad_matrix_free ()
void | go_quad_matrix_freel ()
void | go_quad_matrix_freeD ()
gboolean | go_quad_matrix_fwd_solve ()
gboolean | go_quad_matrix_fwd_solvel ()
gboolean | go_quad_matrix_fwd_solveD ()
GOQuadMatrix * | go_quad_matrix_inverse ()
GOQuadMatrixl * | go_quad_matrix_inversel ()
GOQuadMatrixD * | go_quad_matrix_inverseD ()
void | go_quad_matrix_multiply ()
void | go_quad_matrix_multiplyl ()
void | go_quad_matrix_multiplyD ()
GOQuadMatrix * | go_quad_matrix_new ()
GOQuadMatrixl * | go_quad_matrix_newl ()
GOQuadMatrixD * | go_quad_matrix_newD ()
GOQuadMatrix * | go_quad_matrix_pseudo_inverse ()
GOQuadMatrixl * | go_quad_matrix_pseudo_inversel ()
GOQuadMatrixD * | go_quad_matrix_pseudo_inverseD ()
void | go_quad_matrix_transpose ()
void | go_quad_matrix_transposel ()
void | go_quad_matrix_transposeD ()

## Description

## Functions

### go_quad_matrix_back_solve ()

    gboolean
    go_quad_matrix_back_solve (const GOQuadMatrix *R,
                               GOQuad *x,
                               const GOQuad *b,
                               gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system R*x=b.

### go_quad_matrix_back_solvel ()

    gboolean
    go_quad_matrix_back_solvel (const GOQuadMatrixl *R,
                                GOQuadl *x,
                                const GOQuadl *b,
                                gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system R*x=b.

### go_quad_matrix_back_solveD ()

    gboolean
    go_quad_matrix_back_solveD (const GOQuadMatrixD *R,
                                GOQuadD *x,
                                const GOQuadD *b,
                                gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system R*x=b.

### go_quad_matrix_copy ()

    void
    go_quad_matrix_copy (GOQuadMatrix *A,
                         const GOQuadMatrix *B);

Copies B to A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]

### go_quad_matrix_copyl ()

    void
    go_quad_matrix_copyl (GOQuadMatrixl *A,
                          const GOQuadMatrixl *B);

Copies B to A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]

### go_quad_matrix_copyD ()

    void
    go_quad_matrix_copyD (GOQuadMatrixD *A,
                          const GOQuadMatrixD *B);

Copies B to A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]

### go_quad_matrix_determinant ()

    void
    go_quad_matrix_determinant (const GOQuadMatrix *A,
                                GOQuad *res);

### go_quad_matrix_determinantl ()

    void
    go_quad_matrix_determinantl (const GOQuadMatrixl *A,
                                 GOQuadl *res);

### go_quad_matrix_determinantD ()

    void
    go_quad_matrix_determinantD (const GOQuadMatrixD *A,
                                 GOQuadD *res);

### go_quad_matrix_dump ()

    void
    go_quad_matrix_dump (const GOQuadMatrix *A,
                         const char *fmt);

### go_quad_matrix_dumpl ()

    void
    go_quad_matrix_dumpl (const GOQuadMatrixl *A,
                          const char *fmt);

### go_quad_matrix_dumpD ()

    void
    go_quad_matrix_dumpD (const GOQuadMatrixD *A,
                          const char *fmt);

### go_quad_matrix_dup ()

    GOQuadMatrix *
    go_quad_matrix_dup (const GOQuadMatrix *A);

[skip]

#### Parameters

A | Matrix to duplicate |

#### Returns

a new matrix.

### go_quad_matrix_dupl ()

    GOQuadMatrixl *
    go_quad_matrix_dupl (const GOQuadMatrixl *A);

[skip]

#### Parameters

A | Matrix to duplicate |

#### Returns

a new matrix.

### go_quad_matrix_dupD ()

    GOQuadMatrixD *
    go_quad_matrix_dupD (const GOQuadMatrixD *A);

[skip]

#### Parameters

A | Matrix to duplicate |

#### Returns

a new matrix.

### go_quad_matrix_eigen_range ()

    void
    go_quad_matrix_eigen_range (const GOQuadMatrix *A,
                                double *emin,
                                double *emax);

#### Parameters

A | Triangular matrix. |
emin | Smallest absolute eigen value. | [out]
emax | Largest absolute eigen value. | [out]

### go_quad_matrix_eigen_rangel ()

    void
    go_quad_matrix_eigen_rangel (const GOQuadMatrixl *A,
                                 long double *emin,
                                 long double *emax);

#### Parameters

A | Triangular matrix. |
emin | Smallest absolute eigen value. | [out]
emax | Largest absolute eigen value. | [out]

### go_quad_matrix_eigen_rangeD ()

    void
    go_quad_matrix_eigen_rangeD (const GOQuadMatrixD *A,
                                 _Decimal64 *emin,
                                 _Decimal64 *emax);

#### Parameters

A | Triangular matrix. |
emin | Smallest absolute eigen value. | [out]
emax | Largest absolute eigen value. | [out]

### go_quad_matrix_free ()

    void
    go_quad_matrix_free (GOQuadMatrix *A);

### go_quad_matrix_freel ()

    void
    go_quad_matrix_freel (GOQuadMatrixl *A);

### go_quad_matrix_freeD ()

    void
    go_quad_matrix_freeD (GOQuadMatrixD *A);

### go_quad_matrix_fwd_solve ()

    gboolean
    go_quad_matrix_fwd_solve (const GOQuadMatrix *R,
                              GOQuad *x,
                              const GOQuad *b,
                              gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system RT*x=b.

### go_quad_matrix_fwd_solvel ()

    gboolean
    go_quad_matrix_fwd_solvel (const GOQuadMatrixl *R,
                               GOQuadl *x,
                               const GOQuadl *b,
                               gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system RT*x=b.

### go_quad_matrix_fwd_solveD ()

    gboolean
    go_quad_matrix_fwd_solveD (const GOQuadMatrixD *R,
                               GOQuadD *x,
                               const GOQuadD *b,
                               gboolean allow_degenerate);

#### Parameters

R | An upper triangular matrix. |
x | Result vector. | [out]
b | Input vector. |
allow_degenerate | If `TRUE`, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. |

#### Returns

`TRUE` on error.

This function solves the triangular system RT*x=b.

### go_quad_matrix_inverse ()

    GOQuadMatrix *
    go_quad_matrix_inverse (const GOQuadMatrix *A,
                            double threshold);

[skip]

#### Parameters

A | Source matrix. |
threshold | condition number threshold. |

#### Returns

The inverse matrix of A. If any eigenvalues divided by the largest eigenvalue is less than or equal to the given threshold, `NULL` is returned indicating a matrix that cannot be inverted. (Note: this doesn't actually use the eigenvalues of A, but of A after an orthogonal transformation.)

### go_quad_matrix_inversel ()

    GOQuadMatrixl *
    go_quad_matrix_inversel (const GOQuadMatrixl *A,
                             long double threshold);

[skip]

#### Parameters

A | Source matrix. |
threshold | condition number threshold. |

#### Returns

The inverse matrix of A. If any eigenvalues divided by the largest eigenvalue is less than or equal to the given threshold, `NULL` is returned indicating a matrix that cannot be inverted. (Note: this doesn't actually use the eigenvalues of A, but of A after an orthogonal transformation.)

### go_quad_matrix_inverseD ()

    GOQuadMatrixD *
    go_quad_matrix_inverseD (const GOQuadMatrixD *A,
                             _Decimal64 threshold);

[skip]

#### Parameters

A | Source matrix. |
threshold | condition number threshold. |

#### Returns

The inverse matrix of A. If any eigenvalues divided by the largest eigenvalue is less than or equal to the given threshold, `NULL` is returned indicating a matrix that cannot be inverted. (Note: this doesn't actually use the eigenvalues of A, but of A after an orthogonal transformation.)

### go_quad_matrix_multiply ()

    void
    go_quad_matrix_multiply (GOQuadMatrix *C,
                             const GOQuadMatrix *A,
                             const GOQuadMatrix *B);

Multiplies A*B and stores the result in C.

#### Parameters

C | Destination matrix. | [out]
A | Source matrix. |
B | Source matrix. |

### go_quad_matrix_multiplyl ()

    void
    go_quad_matrix_multiplyl (GOQuadMatrixl *C,
                              const GOQuadMatrixl *A,
                              const GOQuadMatrixl *B);

Multiplies A*B and stores the result in C.

#### Parameters

C | Destination matrix. | [out]
A | Source matrix. |
B | Source matrix. |

### go_quad_matrix_multiplyD ()

    void
    go_quad_matrix_multiplyD (GOQuadMatrixD *C,
                              const GOQuadMatrixD *A,
                              const GOQuadMatrixD *B);

Multiplies A*B and stores the result in C.

#### Parameters

C | Destination matrix. | [out]
A | Source matrix. |
B | Source matrix. |

### go_quad_matrix_new ()

    GOQuadMatrix *
    go_quad_matrix_new (int m,
                        int n);

[skip]

#### Parameters

m | number of rows |
n | number of columns |

#### Returns

a new zero matrix.

### go_quad_matrix_newl ()

    GOQuadMatrixl *
    go_quad_matrix_newl (int m,
                         int n);

[skip]

#### Parameters

m | number of rows |
n | number of columns |

#### Returns

a new zero matrix.

### go_quad_matrix_newD ()

    GOQuadMatrixD *
    go_quad_matrix_newD (int m,
                         int n);

[skip]

#### Parameters

m | number of rows |
n | number of columns |

#### Returns

a new zero matrix.

### go_quad_matrix_pseudo_inverse ()

    GOQuadMatrix *
    go_quad_matrix_pseudo_inverse (const GOQuadMatrix *A,
                                   double threshold);

[skip]

#### Parameters

A | An arbitrary matrix. |
threshold | condition number threshold. |

#### Returns

`A` 's pseudo-inverse.

### go_quad_matrix_pseudo_inversel ()

    GOQuadMatrixl *
    go_quad_matrix_pseudo_inversel (const GOQuadMatrixl *A,
                                    long double threshold);

[skip]

#### Parameters

A | An arbitrary matrix. |
threshold | condition number threshold. |

#### Returns

`A` 's pseudo-inverse.

### go_quad_matrix_pseudo_inverseD ()

    GOQuadMatrixD *
    go_quad_matrix_pseudo_inverseD (const GOQuadMatrixD *A,
                                    _Decimal64 threshold);

[skip]

#### Parameters

A | An arbitrary matrix. |
threshold | condition number threshold. |

#### Returns

`A` 's pseudo-inverse.

### go_quad_matrix_transpose ()

    void
    go_quad_matrix_transpose (GOQuadMatrix *A,
                              const GOQuadMatrix *B);

Transposes B into A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]

### go_quad_matrix_transposel ()

    void
    go_quad_matrix_transposel (GOQuadMatrixl *A,
                               const GOQuadMatrixl *B);

Transposes B into A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]

### go_quad_matrix_transposeD ()

    void
    go_quad_matrix_transposeD (GOQuadMatrixD *A,
                               const GOQuadMatrixD *B);

Transposes B into A.

#### Parameters

A | Destination matrix. | [out]
B | Source matrix. | [transfer none]