KmlScadssSolve
To perform back substitution on a matrix, you need to call KmlScadssFactorize to factorize the matrix first.
Interface Definition
C interface:
int KmlScadssSolve(KmlScadssSolver *solver, KmlScasolverMatrix *b, KmlScasolverMatrix *x, const KmlDssSolveOption *basicOptions, const KmlScadssSolveOption *scaOptions);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
solver |
KmlScadssSolver * |
Solver handle created by KmlScadssInit. |
Input |
b |
KmlScasolverMatrix * |
Pointer to the RHS vector structure, which is essentially a matrix and is created by the KmlScasolverMatrixCreate function. The pointer cannot be null. |
Input |
x |
KmlScasolverMatrix * |
Pointer to the solution space structure, which is essentially a matrix and is created by the KmlScasolverMatrixCreate function. The input cannot be a null pointer, and the output is a numerical array containing the solved x. |
Output |
basicOptions |
KmlDssSolveOption * |
Basic configuration options in the factorization phase, which cannot be a null pointer. For details, see Table 1. |
Input |
scaOptions |
KmlScadssSolveOption * |
Distributed configuration options in the factorization phase. For details, see Table 1. (No configuration items are available currently.) |
Input |
Field |
Type |
Description |
|---|---|---|
fieldMask |
uint64_t |
Mask that determines to which fields the configuration is applied. A non-zero bit indicates that the value specified by the corresponding field is used, and a zero bit indicates that the default value is used. Currently, no mask bit can be configured. |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
Normal execution. |
KMLSS_INTERNAL_ERROR |
int |
Internal error. |
KMLSS_NULL_ARGUMENT |
int |
A null argument exists in {solver, b, x, basicOptions, scaOptions}. |
Dependencies
#include "kml_scadss.h"