Validate ParameterBlocks before solve.

Ensure that all parameter blocks have finite values
before the minimizer is called.

Change-Id: I15fd9c487247989626f799496bb8f5ea8728d6f0
This commit is contained in:
Sameer Agarwal
2014-01-22 17:23:27 -08:00
parent 63cff485b6
commit 5e8321c39a
6 changed files with 102 additions and 25 deletions
+8
View File
@@ -57,6 +57,14 @@ void InvalidateArray(int size, double* x);
// equal to the "impossible" value used by InvalidateArray.
bool IsArrayValid(int size, const double* x);
// If the array contains an invalid value, return the index for it,
// otherwise return size.
int FindInvalidValue(const int size, const double* x);
// Utility routine to print an array of doubles to a string. If the
// array pointer is NULL, it is treated as an array of zeros.
void AppendArrayToString(const int size, const double* x, string* result);
extern const double kImpossibleValue;
} // namespace internal