Expose SLVS_RESULT_REDUNDANT_DIDNT_CONVERGE.

This commit is contained in:
whitequark 2016-10-25 13:53:36 +00:00
parent cf7db87b38
commit 7e64c405dd
2 changed files with 9 additions and 5 deletions

View File

@ -182,9 +182,10 @@ typedef struct {
// The solver indicates whether the solution succeeded.
#define SLVS_RESULT_OKAY 0
#define SLVS_RESULT_INCONSISTENT 1
#define SLVS_RESULT_DIDNT_CONVERGE 2
#define SLVS_RESULT_TOO_MANY_UNKNOWNS 3
#define SLVS_RESULT_REDUNDANT_OKAY 1
#define SLVS_RESULT_REDUNDANT_DIDNT_CONVERGE 2
#define SLVS_RESULT_DIDNT_CONVERGE 3
#define SLVS_RESULT_TOO_MANY_UNKNOWNS 4
int result;
} Slvs_System;

View File

@ -212,9 +212,12 @@ default: dbp("bad constraint type %d", sc->type); return;
ssys->result = SLVS_RESULT_DIDNT_CONVERGE;
break;
case System::REDUNDANT_DIDNT_CONVERGE:
case System::REDUNDANT_OKAY:
ssys->result = SLVS_RESULT_INCONSISTENT;
ssys->result = SLVS_RESULT_REDUNDANT_OKAY;
break;
case System::REDUNDANT_DIDNT_CONVERGE:
ssys->result = SLVS_RESULT_REDUNDANT_DIDNT_CONVERGE;
break;
case System::TOO_MANY_UNKNOWNS: