mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Addressing comments from Jim Roseborough.
Change-Id: I9f5bdb4a81cd25ee4ea5de65aeddcaa0c5d18197
This commit is contained in:
@@ -67,12 +67,19 @@ void AppendArrayToString(const int size, const double* x, string* result);
|
||||
|
||||
extern const double kImpossibleValue;
|
||||
|
||||
// array contains a list of (possibly repeating) non-negative
|
||||
// integers. Let us assume that we have constructed another array `p`
|
||||
// by sorting and uniquing the entries of array.
|
||||
// This routine takes an array of integer values, sorts and uniques
|
||||
// them and then maps each value in the array to its position in the
|
||||
// sorted+uniqued array. By doing this, if there are are k unique
|
||||
// values in the array, each value is replaced by an integer in the
|
||||
// range [0, k-1], while preserving their relative order.
|
||||
//
|
||||
// MapValuesToContiguousRange replaces each entry in "array" with its
|
||||
// position in `p`.
|
||||
// For example
|
||||
//
|
||||
// [1 0 3 5 0 1 5]
|
||||
//
|
||||
// gets mapped to
|
||||
//
|
||||
// [1 0 2 3 0 1 3]
|
||||
void MapValuesToContiguousRange(int size, int* array);
|
||||
|
||||
} // namespace internal
|
||||
|
||||
Reference in New Issue
Block a user